50 , relative( relative )
137 bool snappingToFeaturesOverridesCommonAngle =
false;
154 QList< QgsPoint >
cadPoints()
const {
return mCadPointList; } ;
162 void setCadPoints(
const QList< QgsPoint > &points ) { mCadPointList = points; };
199 SIP_PROPERTY( name = cadPointList, get = _cadPointList, set = _setCadPointList )
202 void _setCadPointList(
const QList< QgsPointXY > &list ) { mCadPointList.clear();
for (
const auto &pointxy : list ) { mCadPointList.append(
QgsPoint( pointxy ) );} }
203 QList< QgsPointXY > _cadPointList()
const { QList< QgsPointXY> list;
for (
const auto &point : mCadPointList ) { list.append(
QgsPointXY( point.x(), point.y() ) ); };
return list; }
213 QList<QgsPoint> mCadPointList;
214 QQueue< QgsPointLocator::Match > mLockedSnapVertices;
LineExtensionSide
Designates whether the line extension constraint is currently soft locked with the previous or next v...
Structure with details of one constraint.
AlignMapPointConstraint(bool locked=false, bool relative=false, double value=0)
Constructor for AlignMapPointConstraint.
bool locked
Whether the constraint is active, i.e. should be considered.
double value
Numeric value of the constraint (coordinate/distance in map units or angle in degrees)
bool relative
Whether the value is relative to previous value.
Defines constraints for the QgsCadUtils::alignMapPoint() method.
QgsCadUtils::AlignMapPointConstraint xyVertexConstraint
QgsCadUtils::AlignMapPointConstraint yConstraint
Constraint for Y coordinate.
QgsCadUtils::AlignMapPointConstraint xConstraint
Constraint for X coordinate.
double mapUnitsPerPixel
Map units/pixel ratio from map canvas.
void setCadPoints(const QList< QgsPoint > &points)
Sets the list of recent CAD points (in map coordinates).
void setLockedSnapVertices(const QQueue< QgsPointLocator::Match > &lockedSnapVertices)
Sets the queue of locked vertices.
QgsCadUtils::AlignMapPointConstraint mConstraint
Constraint for M coordinate.
QgsPoint cadPoint(int index) const
Returns the recent CAD point at the specified index (in map coordinates).
void setCadPoint(int index, const QgsPoint &point)
Sets the recent CAD point at the specified index to point (in map coordinates).
QgsCadUtils::AlignMapPointConstraint distanceConstraint
Constraint for distance.
QgsCadUtils::AlignMapPointConstraint zConstraint
Constraint for Z coordinate.
QgsCadUtils::AlignMapPointConstraint commonAngleConstraint
Constraint for soft lock to a common angle.
QQueue< QgsPointLocator::Match > lockedSnapVertices() const
Returns the queue of point locator matches that contain the locked vertices.
QgsCadUtils::AlignMapPointConstraint lineExtensionConstraint
QList< QgsPoint > cadPoints() const
Returns the list of recent CAD points in map coordinates.
QgsCadUtils::AlignMapPointConstraint angleConstraint
Constraint for angle.
Structure returned from alignMapPoint() method.
Qgis::LineExtensionSide softLockLineExtension
QgsPointXY finalMapPoint
map point aligned according to the constraints
bool valid
Whether the combination of constraints is actually valid.
QgsPointLocator::Match snapMatch
Snapped point - only valid if actually used for something.
QgsPointLocator::Match edgeMatch
Snapped segment - only valid if actually used for something.
double softLockCommonAngle
Angle (in degrees) to which we have soft-locked ourselves (if not set it is -1)
The QgsCadUtils class provides routines for CAD editing.
A class to represent a 2D point.
Point geometry type, with support for z-dimension and m-values.
This class has all the configuration of snapping and can return answers to snapping queries.
#define SIP_PROPERTY(name, getter, setter)