Class: QgsCadUtils¶
- class qgis.core.QgsCadUtils¶
Bases:
sip.wrapper
The
QgsCadUtils
class provides routines for CAD editing.Added in version 3.0:
Methods
Applies X/Y/angle/distance constraints from the given context to a map point.
- class AlignMapPointConstraint¶
Bases:
sip.wrapper
Structure with details of one constraint
Added in version 3.0.
QgsCadUtils.AlignMapPointConstraint(locked: bool = False, relative: bool = False, value: float = 0) Constructor for AlignMapPointConstraint.
QgsCadUtils.AlignMapPointConstraint(a0: QgsCadUtils.AlignMapPointConstraint)
- locked¶
- relative¶
- value¶
- class AlignMapPointContext¶
Bases:
sip.wrapper
Defines constraints for the
QgsCadUtils.alignMapPoint()
method.Added in version 3.0.
- angleConstraint¶
- cadPoint(self, index: int) QgsPoint ¶
Returns the recent CAD point at the specified
index
(in map coordinates).See also
Added in version 3.22.
- Parameters:
index (int)
- Return type:
- property cadPointList¶
_cadPointList(self) -> List[QgsPointXY]
- Return type:
List[QgsPointXY]
- cadPoints(self) List[QgsPoint] ¶
Returns the list of recent CAD points in map coordinates.
These are used to turn relative constraints to absolute. The first point is the most recent point.
See also
Added in version 3.22.
- Return type:
List[QgsPoint]
- commonAngleConstraint¶
- distanceConstraint¶
- lineExtensionConstraint¶
- mConstraint¶
- mapUnitsPerPixel¶
- setCadPoint(self, index: int, point: QgsPoint)¶
Sets the recent CAD point at the specified
index
topoint
(in map coordinates).See also
Added in version 3.22.
- Parameters:
index (int)
point (QgsPoint)
- setCadPoints(self, points: Iterable[QgsPoint])¶
Sets the list of recent CAD
points
(in map coordinates).See also
Added in version 3.22.
- Parameters:
points (Iterable[QgsPoint])
- snappingToFeaturesOverridesCommonAngle¶
- snappingUtils¶
- xConstraint¶
- xyVertexConstraint¶
- yConstraint¶
- zConstraint¶
- class AlignMapPointOutput¶
Bases:
sip.wrapper
Structure returned from
alignMapPoint()
methodAdded in version 3.0.
- edgeMatch¶
- finalMapPoint¶
- snapMatch¶
- softLockCommonAngle¶
- softLockLineExtension¶
- softLockX¶
- softLockY¶
- valid¶
- alignMapPoint(originalMapPoint: QgsPointXY, ctx: QgsCadUtils.AlignMapPointContext) QgsCadUtils.AlignMapPointOutput ¶
Applies X/Y/angle/distance constraints from the given context to a map point. Returns a structure containing aligned map point, whether the constraints are valid and some extra information.
- Parameters:
originalMapPoint (QgsPointXY)
- Return type: