Class: QgsCadUtils¶
Provides routines for CAD editing.
List of all members, including inherited members
Classes
Structure with details of one constraint. |
|
Defines constraints for the |
|
Structure returned from |
Static Methods
Applies X/Y/angle/distance constraints from the given context to a map point. |
- class qgis.core.QgsCadUtils[source]¶
Bases:
object- class AlignMapPointConstraint[source]¶
Bases:
objectStructure with details of one constraint.
- __init__(locked: bool = False, relative: bool = False, value: float = 0)
Constructor for AlignMapPointConstraint.
- Parameters:
locked (bool = False)
relative (bool = False)
value (float = 0)
- __init__(a0: QgsCadUtils.AlignMapPointConstraint)
- Parameters:
- locked: bool¶
- relative: bool¶
- value: float¶
- class AlignMapPointContext[source]¶
Bases:
objectDefines constraints for the
QgsCadUtils.alignMapPoint()method.- angleConstraint: AlignMapPointConstraint¶
- cadPoint(self, index: int) QgsPoint[source]¶
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¶
- 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: AlignMapPointConstraint¶
- distanceConstraint: AlignMapPointConstraint¶
- lineExtensionConstraint¶
- mConstraint: AlignMapPointConstraint¶
- mapUnitsPerPixel: float¶
- setCadPoint(self, index: int, point: QgsPoint)[source]¶
Sets the recent CAD point at the specified
indextopoint(in map coordinates).See also
Added in version 3.22.
- Parameters:
index (int)
point (QgsPoint)
- setCadPoints(self, points: Iterable[QgsPoint])[source]¶
Sets the list of recent CAD
points(in map coordinates).See also
Added in version 3.22.
- Parameters:
points (Iterable[QgsPoint])
- snappingToFeaturesOverridesCommonAngle: bool¶
- snappingUtils: QgsSnappingUtils¶
- xConstraint: AlignMapPointConstraint¶
- xyVertexConstraint¶
- yConstraint: AlignMapPointConstraint¶
- zConstraint: AlignMapPointConstraint¶
- class AlignMapPointOutput[source]¶
Bases:
objectStructure returned from
alignMapPoint()method.- finalMapPoint: QgsPointXY¶
- softLockCommonAngle: float¶
- softLockLineExtension¶
- softLockX¶
- softLockY¶
- valid: bool¶
- static alignMapPoint(originalMapPoint: QgsPointXY, ctx: QgsCadUtils.AlignMapPointContext) QgsCadUtils.AlignMapPointOutput[source]¶
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: