Class: QgsCadUtils¶
- class qgis.core.QgsCadUtils¶
Bases:
sip.wrapper
The
QgsCadUtils
class provides routines for CAD editing.New 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
New in version 3.0.
QgsCadUtils.AlignMapPointConstraint(locked: bool = False, relative: bool = False, value: float = 0) Constructor for AlignMapPointConstraint.
QgsCadUtils.AlignMapPointConstraint(QgsCadUtils.AlignMapPointConstraint)
- locked¶
- relative¶
- value¶
- class AlignMapPointContext¶
Bases:
sip.wrapper
Defines constraints for the
QgsCadUtils.alignMapPoint()
method.New in version 3.0.
- angleConstraint¶
- cadPoint(self, index: int) QgsPoint ¶
Returns the recent CAD point at the specified
index
(in map coordinates).See also
New 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
New in version 3.22.
- Return type:
List[QgsPoint]
- commonAngleConstraint¶
- distanceConstraint¶
- mConstraint¶
- mapUnitsPerPixel¶
- setCadPoint(self, index: int, point: QgsPoint)¶
Sets the recent CAD point at the specified
index
topoint
(in map coordinates).See also
New 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
New in version 3.22.
- Parameters:
points (Iterable[QgsPoint]) –
- snappingUtils¶
- xConstraint¶
- yConstraint¶
- zConstraint¶
- class AlignMapPointOutput¶
Bases:
sip.wrapper
Structure returned from
alignMapPoint()
methodNew in version 3.0.
- edgeMatch¶
- finalMapPoint¶
- snapMatch¶
- softLockCommonAngle¶
- 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) –
ctx (QgsCadUtils.AlignMapPointContext) –
- Return type: