Class: QgsCadUtils

class qgis.core.QgsCadUtils

Bases: sip.wrapper

The QgsCadUtils class provides routines for CAD editing.

Methods

alignMapPoint

Applies X/Y/angle/distance constraints from the given context to a map point.

class AlignMapPointConstraint(locked: bool = False, relative: bool = False, value: float = 0)

Bases: sip.wrapper

QgsCadUtils.AlignMapPointConstraint(QgsCadUtils.AlignMapPointConstraint)

Parameters
  • locked (bool = False) –

  • relative (bool = False) –

  • value (float = 0) –

locked
relative
value
class AlignMapPointContext

Bases: sip.wrapper

QgsCadUtils.AlignMapPointContext(QgsCadUtils.AlignMapPointContext)

angleConstraint
cadPointList
commonAngleConstraint
distanceConstraint
mapUnitsPerPixel
snappingUtils
xConstraint
yConstraint
class AlignMapPointOutput

Bases: sip.wrapper

QgsCadUtils.AlignMapPointOutput(QgsCadUtils.AlignMapPointOutput)

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
Return type

QgsCadUtils.AlignMapPointOutput