#include <GCS.h>
Public Member Functions | |
int | addConstraint (Constraint *constr) |
int | addConstraintAngleViaPoint (Curve &crv1, Curve &crv2, Point &p, double *angle, int tagId=0, bool driving=true) |
int | addConstraintArcDiameter (Arc &a, double *radius, int tagId=0, bool driving=true) |
int | addConstraintArcOfEllipseRules (ArcOfEllipse &a, int tagId=0, bool driving=true) |
int | addConstraintArcOfHyperbolaRules (ArcOfHyperbola &a, int tagId=0, bool driving=true) |
int | addConstraintArcOfParabolaRules (ArcOfParabola &a, int tagId=0, bool driving=true) |
int | addConstraintArcRadius (Arc &a, double *radius, int tagId=0, bool driving=true) |
int | addConstraintArcRules (Arc &a, int tagId=0, bool driving=true) |
int | addConstraintCircleDiameter (Circle &c, double *radius, int tagId=0, bool driving=true) |
int | addConstraintCircleRadius (Circle &c, double *radius, int tagId=0, bool driving=true) |
int | addConstraintCoordinateX (Point &p, double *x, int tagId=0, bool driving=true) |
int | addConstraintCoordinateY (Point &p, double *y, int tagId=0, bool driving=true) |
int | addConstraintCurveValue (Point &p, Curve &a, double *u, int tagId=0, bool driving=true) |
int | addConstraintDifference (double *param1, double *param2, double *difference, int tagId=0, bool driving=true) |
int | addConstraintEqual (double *param1, double *param2, int tagId=0, bool driving=true) |
int | addConstraintEqualFocus (ArcOfParabola &a1, ArcOfParabola &a2, int tagId=0, bool driving=true) |
int | addConstraintEqualLength (Line &l1, Line &l2, double *length, int tagId=0, bool driving=true) |
int | addConstraintEqualRadii (ArcOfHyperbola &a1, ArcOfHyperbola &a2, int tagId=0, bool driving=true) |
int | addConstraintEqualRadii (Ellipse &e1, Ellipse &e2, int tagId=0, bool driving=true) |
int | addConstraintEqualRadius (Arc &a1, Arc &a2, int tagId=0, bool driving=true) |
int | addConstraintEqualRadius (Circle &c1, Arc &a2, int tagId=0, bool driving=true) |
int | addConstraintEqualRadius (Circle &c1, Circle &c2, int tagId=0, bool driving=true) |
int | addConstraintHorizontal (Line &l, int tagId=0, bool driving=true) |
int | addConstraintHorizontal (Point &p1, Point &p2, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentBSplineControlPoint (BSpline &b, Circle &c, int poleindex, int tag=0, bool driving=true) |
int | addConstraintInternalAlignmentEllipseFocus1 (Ellipse &e, Point &p1, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentEllipseFocus2 (Ellipse &e, Point &p1, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentEllipseMajorDiameter (Ellipse &e, Point &p1, Point &p2, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentEllipseMinorDiameter (Ellipse &e, Point &p1, Point &p2, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentHyperbolaFocus (Hyperbola &e, Point &p1, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentHyperbolaMajorDiameter (Hyperbola &e, Point &p1, Point &p2, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentHyperbolaMinorDiameter (Hyperbola &e, Point &p1, Point &p2, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentParabolaFocus (Parabola &e, Point &p1, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentPoint2Ellipse (Ellipse &e, Point &p1, InternalAlignmentType alignmentType, int tagId=0, bool driving=true) |
int | addConstraintInternalAlignmentPoint2Hyperbola (Hyperbola &e, Point &p1, InternalAlignmentType alignmentType, int tagId=0, bool driving=true) |
int | addConstraintL2LAngle (Line &l1, Line &l2, double *angle, int tagId=0, bool driving=true) |
int | addConstraintL2LAngle (Point &l1p1, Point &l1p2, Point &l2p1, Point &l2p2, double *angle, int tagId=0, bool driving=true) |
int | addConstraintMidpointOnLine (Line &l1, Line &l2, int tagId=0, bool driving=true) |
int | addConstraintMidpointOnLine (Point &l1p1, Point &l1p2, Point &l2p1, Point &l2p2, int tagId=0, bool driving=true) |
int | addConstraintP2LDistance (Point &p, Line &l, double *distance, int tagId=0, bool driving=true) |
int | addConstraintP2PAngle (Point &p1, Point &p2, double *angle, double incrAngle, int tagId=0, bool driving=true) |
int | addConstraintP2PAngle (Point &p1, Point &p2, double *angle, int tagId=0, bool driving=true) |
int | addConstraintP2PCoincident (Point &p1, Point &p2, int tagId=0, bool driving=true) |
int | addConstraintP2PDistance (Point &p1, Point &p2, double *distance, int tagId=0, bool driving=true) |
int | addConstraintP2PSymmetric (Point &p1, Point &p2, Line &l, int tagId=0, bool driving=true) |
int | addConstraintP2PSymmetric (Point &p1, Point &p2, Point &p, int tagId=0, bool driving=true) |
int | addConstraintParallel (Line &l1, Line &l2, int tagId=0, bool driving=true) |
int | addConstraintPerpendicular (Line &l1, Line &l2, int tagId=0, bool driving=true) |
int | addConstraintPerpendicular (Point &l1p1, Point &l1p2, Point &l2p1, Point &l2p2, int tagId=0, bool driving=true) |
int | addConstraintPerpendicularArc2Arc (Arc &a1, bool reverse1, Arc &a2, bool reverse2, int tagId=0, bool driving=true) |
int | addConstraintPerpendicularArc2Circle (Arc &a, Point ¢er, double *radius, int tagId=0, bool driving=true) |
int | addConstraintPerpendicularArc2Line (Arc &a, Point &p1, Point &p2, int tagId=0, bool driving=true) |
int | addConstraintPerpendicularCircle2Arc (Point ¢er, double *radius, Arc &a, int tagId=0, bool driving=true) |
int | addConstraintPerpendicularLine2Arc (Point &p1, Point &p2, Arc &a, int tagId=0, bool driving=true) |
int | addConstraintPointOnArc (Point &p, Arc &a, int tagId=0, bool driving=true) |
int | addConstraintPointOnCircle (Point &p, Circle &c, int tagId=0, bool driving=true) |
int | addConstraintPointOnEllipse (Point &p, Ellipse &e, int tagId=0, bool driving=true) |
int | addConstraintPointOnHyperbolicArc (Point &p, ArcOfHyperbola &e, int tagId=0, bool driving=true) |
int | addConstraintPointOnLine (Point &p, Line &l, int tagId=0, bool driving=true) |
int | addConstraintPointOnLine (Point &p, Point &lp1, Point &lp2, int tagId=0, bool driving=true) |
int | addConstraintPointOnParabolicArc (Point &p, ArcOfParabola &e, int tagId=0, bool driving=true) |
int | addConstraintPointOnPerpBisector (Point &p, Line &l, int tagId=0, bool driving=true) |
int | addConstraintPointOnPerpBisector (Point &p, Point &lp1, Point &lp2, int tagId=0, bool driving=true) |
int | addConstraintProportional (double *param1, double *param2, double ratio, int tagId, bool driving=true) |
int | addConstraintSnellsLaw (Curve &ray1, Curve &ray2, Curve &boundary, Point p, double *n1, double *n2, bool flipn1, bool flipn2, int tagId, bool driving=true) |
int | addConstraintTangent (Arc &a1, Arc &a2, int tagId=0, bool driving=true) |
int | addConstraintTangent (Circle &c, Arc &a, int tagId=0, bool driving=true) |
int | addConstraintTangent (Circle &c1, Circle &c2, int tagId=0, bool driving=true) |
int | addConstraintTangent (Line &l, Arc &a, int tagId=0, bool driving=true) |
int | addConstraintTangent (Line &l, Circle &c, int tagId=0, bool driving=true) |
int | addConstraintTangent (Line &l, Ellipse &e, int tagId=0, bool driving=true) |
int | addConstraintTangentCircumf (Point &p1, Point &p2, double *rd1, double *rd2, bool internal=false, int tagId=0, bool driving=true) |
int | addConstraintVertical (Line &l, int tagId=0, bool driving=true) |
int | addConstraintVertical (Point &p1, Point &p2, int tagId=0, bool driving=true) |
void | applySolution () |
double | calculateAngleViaPoint (Curve &crv1, Curve &crv2, Point &p) |
double | calculateAngleViaPoint (Curve &crv1, Curve &crv2, Point &p1, Point &p2) |
double | calculateConstraintErrorByTag (int tagId) |
void | calculateNormalAtPoint (Curve &crv, Point &p, double &rtnX, double &rtnY) |
void | clear () |
void | clearByTag (int tagId) |
void | declareDrivenParams (VEC_pD ¶ms) |
void | declareUnknowns (VEC_pD ¶ms) |
int | diagnose (Algorithm alg=DogLeg) |
int | dofsNumber () const |
void | getConflicting (VEC_I &conflictingOut) const |
void | getDependentParams (VEC_pD &pconstraintplistOut) const |
double | getFinePrecision () |
void | getRedundant (VEC_I &redundantOut) const |
void | initSolution (Algorithm alg=DogLeg) |
void | removeConstraint (Constraint *constr) |
void | rescaleConstraint (int id, double coeff) |
int | solve (bool isFine=true, Algorithm alg=DogLeg, bool isRedundantsolving=false) |
int | solve (SubSystem *subsys, bool isFine=true, Algorithm alg=DogLeg, bool isRedundantsolving=false) |
int | solve (SubSystem *subsysA, SubSystem *subsysB, bool isFine=true, bool isRedundantsolving=false) |
int | solve (VEC_pD ¶ms, bool isFine=true, Algorithm alg=DogLeg, bool isRedundantsolving=false) |
System () | |
void | undoSolution () |
~System () | |
Public Attributes | |
double | convergence |
double | convergenceRedundant |
DebugMode | debugMode |
double | DL_tolf |
double | DL_tolfRedundant |
double | DL_tolg |
double | DL_tolgRedundant |
double | DL_tolx |
double | DL_tolxRedundant |
DogLegGaussStep | dogLegGaussStep |
double | LM_eps |
double | LM_eps1 |
double | LM_eps1Redundant |
double | LM_epsRedundant |
double | LM_tau |
double | LM_tauRedundant |
int | maxIter |
int | maxIterRedundant |
QRAlgorithm | qrAlgorithm |
double | qrpivotThreshold |
bool | sketchSizeMultiplier |
bool | sketchSizeMultiplierRedundant |
Constructor & Destructor Documentation
◆ System()
GCS::System::System | ( | ) |
◆ ~System()
GCS::System::~System | ( | ) |
References clear().
Member Function Documentation
◆ addConstraint()
int GCS::System::addConstraint | ( | Constraint * | constr | ) |
References GCS::Constraint::getTag(), and GCS::Constraint::params().
Referenced by addConstraintAngleViaPoint(), addConstraintCurveValue(), addConstraintDifference(), addConstraintEqual(), addConstraintEqualFocus(), addConstraintEqualRadii(), addConstraintInternalAlignmentPoint2Ellipse(), addConstraintInternalAlignmentPoint2Hyperbola(), addConstraintL2LAngle(), addConstraintMidpointOnLine(), addConstraintP2LDistance(), addConstraintP2PAngle(), addConstraintP2PDistance(), addConstraintParallel(), addConstraintPerpendicular(), addConstraintPointOnEllipse(), addConstraintPointOnHyperbolicArc(), addConstraintPointOnLine(), addConstraintPointOnParabolicArc(), addConstraintPointOnPerpBisector(), addConstraintProportional(), addConstraintSnellsLaw(), addConstraintTangent(), and addConstraintTangentCircumf().
◆ addConstraintAngleViaPoint()
int GCS::System::addConstraintAngleViaPoint | ( | Curve & | crv1, |
Curve & | crv2, | ||
Point & | p, | ||
double * | angle, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintArcDiameter()
int GCS::System::addConstraintArcDiameter | ( | Arc & | a, |
double * | radius, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintProportional().
◆ addConstraintArcOfEllipseRules()
int GCS::System::addConstraintArcOfEllipseRules | ( | ArcOfEllipse & | a, |
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintCurveValue().
◆ addConstraintArcOfHyperbolaRules()
int GCS::System::addConstraintArcOfHyperbolaRules | ( | ArcOfHyperbola & | a, |
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintCurveValue().
◆ addConstraintArcOfParabolaRules()
int GCS::System::addConstraintArcOfParabolaRules | ( | ArcOfParabola & | a, |
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintCurveValue().
◆ addConstraintArcRadius()
int GCS::System::addConstraintArcRadius | ( | Arc & | a, |
double * | radius, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual().
◆ addConstraintArcRules()
References addConstraintCurveValue().
◆ addConstraintCircleDiameter()
int GCS::System::addConstraintCircleDiameter | ( | Circle & | c, |
double * | radius, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintProportional().
◆ addConstraintCircleRadius()
int GCS::System::addConstraintCircleRadius | ( | Circle & | c, |
double * | radius, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual().
◆ addConstraintCoordinateX()
int GCS::System::addConstraintCoordinateX | ( | Point & | p, |
double * | x, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual().
◆ addConstraintCoordinateY()
int GCS::System::addConstraintCoordinateY | ( | Point & | p, |
double * | y, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual().
◆ addConstraintCurveValue()
◆ addConstraintDifference()
int GCS::System::addConstraintDifference | ( | double * | param1, |
double * | param2, | ||
double * | difference, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintEqual()
int GCS::System::addConstraintEqual | ( | double * | param1, |
double * | param2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintArcRadius(), addConstraintCircleRadius(), addConstraintCoordinateX(), addConstraintCoordinateY(), addConstraintEqualRadii(), addConstraintEqualRadius(), addConstraintHorizontal(), addConstraintInternalAlignmentBSplineControlPoint(), addConstraintInternalAlignmentEllipseFocus1(), addConstraintInternalAlignmentHyperbolaFocus(), addConstraintInternalAlignmentParabolaFocus(), addConstraintP2PCoincident(), and addConstraintVertical().
◆ addConstraintEqualFocus()
int GCS::System::addConstraintEqualFocus | ( | ArcOfParabola & | a1, |
ArcOfParabola & | a2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintEqualLength()
int GCS::System::addConstraintEqualLength | ( | Line & | l1, |
Line & | l2, | ||
double * | length, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PDistance().
◆ addConstraintEqualRadii() [1/2]
int GCS::System::addConstraintEqualRadii | ( | ArcOfHyperbola & | a1, |
ArcOfHyperbola & | a2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
◆ addConstraintEqualRadii() [2/2]
◆ addConstraintEqualRadius() [1/3]
int GCS::System::addConstraintEqualRadius | ( | Arc & | a1, |
Arc & | a2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual().
◆ addConstraintEqualRadius() [2/3]
int GCS::System::addConstraintEqualRadius | ( | Circle & | c1, |
Arc & | a2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual().
◆ addConstraintEqualRadius() [3/3]
int GCS::System::addConstraintEqualRadius | ( | Circle & | c1, |
Circle & | c2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual(), and GCS::Circle::rad.
◆ addConstraintHorizontal() [1/2]
References addConstraintEqual().
◆ addConstraintHorizontal() [2/2]
int GCS::System::addConstraintHorizontal | ( | Point & | p1, |
Point & | p2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual(), and GCS::Point::y.
◆ addConstraintInternalAlignmentBSplineControlPoint()
int GCS::System::addConstraintInternalAlignmentBSplineControlPoint | ( | BSpline & | b, |
Circle & | c, | ||
int | poleindex, | ||
int | tag = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual().
◆ addConstraintInternalAlignmentEllipseFocus1()
int GCS::System::addConstraintInternalAlignmentEllipseFocus1 | ( | Ellipse & | e, |
Point & | p1, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual(), GCS::Point::x, and GCS::Point::y.
◆ addConstraintInternalAlignmentEllipseFocus2()
◆ addConstraintInternalAlignmentEllipseMajorDiameter()
◆ addConstraintInternalAlignmentEllipseMinorDiameter()
◆ addConstraintInternalAlignmentHyperbolaFocus()
int GCS::System::addConstraintInternalAlignmentHyperbolaFocus | ( | Hyperbola & | e, |
Point & | p1, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual(), GCS::Point::x, and GCS::Point::y.
◆ addConstraintInternalAlignmentHyperbolaMajorDiameter()
◆ addConstraintInternalAlignmentHyperbolaMinorDiameter()
◆ addConstraintInternalAlignmentParabolaFocus()
int GCS::System::addConstraintInternalAlignmentParabolaFocus | ( | Parabola & | e, |
Point & | p1, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual(), GCS::Point::x, and GCS::Point::y.
◆ addConstraintInternalAlignmentPoint2Ellipse()
int GCS::System::addConstraintInternalAlignmentPoint2Ellipse | ( | Ellipse & | e, |
Point & | p1, | ||
InternalAlignmentType | alignmentType, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
◆ addConstraintInternalAlignmentPoint2Hyperbola()
int GCS::System::addConstraintInternalAlignmentPoint2Hyperbola | ( | Hyperbola & | e, |
Point & | p1, | ||
InternalAlignmentType | alignmentType, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
◆ addConstraintL2LAngle() [1/2]
int GCS::System::addConstraintL2LAngle | ( | Line & | l1, |
Line & | l2, | ||
double * | angle, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintL2LAngle() [2/2]
int GCS::System::addConstraintL2LAngle | ( | Point & | l1p1, |
Point & | l1p2, | ||
Point & | l2p1, | ||
Point & | l2p2, | ||
double * | angle, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintMidpointOnLine() [1/2]
int GCS::System::addConstraintMidpointOnLine | ( | Line & | l1, |
Line & | l2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintP2PSymmetric().
◆ addConstraintMidpointOnLine() [2/2]
int GCS::System::addConstraintMidpointOnLine | ( | Point & | l1p1, |
Point & | l1p2, | ||
Point & | l2p1, | ||
Point & | l2p2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintP2LDistance()
int GCS::System::addConstraintP2LDistance | ( | Point & | p, |
Line & | l, | ||
double * | distance, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintTangent().
◆ addConstraintP2PAngle() [1/2]
◆ addConstraintP2PAngle() [2/2]
int GCS::System::addConstraintP2PAngle | ( | Point & | p1, |
Point & | p2, | ||
double * | angle, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PAngle().
◆ addConstraintP2PCoincident()
int GCS::System::addConstraintP2PCoincident | ( | Point & | p1, |
Point & | p2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual(), GCS::Point::x, and GCS::Point::y.
Referenced by addConstraintPerpendicularArc2Arc(), addConstraintPerpendicularArc2Line(), and addConstraintPerpendicularLine2Arc().
◆ addConstraintP2PDistance()
◆ addConstraintP2PSymmetric() [1/2]
int GCS::System::addConstraintP2PSymmetric | ( | Point & | p1, |
Point & | p2, | ||
Line & | l, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintMidpointOnLine(), and addConstraintPerpendicular().
◆ addConstraintP2PSymmetric() [2/2]
int GCS::System::addConstraintP2PSymmetric | ( | Point & | p1, |
Point & | p2, | ||
Point & | p, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintPointOnLine(), and addConstraintPointOnPerpBisector().
◆ addConstraintParallel()
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintPerpendicular() [1/2]
int GCS::System::addConstraintPerpendicular | ( | Line & | l1, |
Line & | l2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintP2PSymmetric(), and addConstraintPerpendicularArc2Arc().
◆ addConstraintPerpendicular() [2/2]
int GCS::System::addConstraintPerpendicular | ( | Point & | l1p1, |
Point & | l1p2, | ||
Point & | l2p1, | ||
Point & | l2p2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintPerpendicularArc2Arc()
int GCS::System::addConstraintPerpendicularArc2Arc | ( | Arc & | a1, |
bool | reverse1, | ||
Arc & | a2, | ||
bool | reverse2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PCoincident(), and addConstraintPerpendicular().
◆ addConstraintPerpendicularArc2Circle()
int GCS::System::addConstraintPerpendicularArc2Circle | ( | Arc & | a, |
Point & | center, | ||
double * | radius, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PAngle(), and addConstraintP2PDistance().
◆ addConstraintPerpendicularArc2Line()
int GCS::System::addConstraintPerpendicularArc2Line | ( | Arc & | a, |
Point & | p1, | ||
Point & | p2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PAngle(), addConstraintP2PCoincident(), GCS::Point::x, and GCS::Point::y.
◆ addConstraintPerpendicularCircle2Arc()
int GCS::System::addConstraintPerpendicularCircle2Arc | ( | Point & | center, |
double * | radius, | ||
Arc & | a, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PAngle(), and addConstraintP2PDistance().
◆ addConstraintPerpendicularLine2Arc()
int GCS::System::addConstraintPerpendicularLine2Arc | ( | Point & | p1, |
Point & | p2, | ||
Arc & | a, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PAngle(), addConstraintP2PCoincident(), GCS::Point::x, and GCS::Point::y.
◆ addConstraintPointOnArc()
References addConstraintP2PDistance().
◆ addConstraintPointOnCircle()
int GCS::System::addConstraintPointOnCircle | ( | Point & | p, |
Circle & | c, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintP2PDistance().
◆ addConstraintPointOnEllipse()
int GCS::System::addConstraintPointOnEllipse | ( | Point & | p, |
Ellipse & | e, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintPointOnHyperbolicArc()
int GCS::System::addConstraintPointOnHyperbolicArc | ( | Point & | p, |
ArcOfHyperbola & | e, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintPointOnLine() [1/2]
int GCS::System::addConstraintPointOnLine | ( | Point & | p, |
Line & | l, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintP2PSymmetric().
◆ addConstraintPointOnLine() [2/2]
int GCS::System::addConstraintPointOnLine | ( | Point & | p, |
Point & | lp1, | ||
Point & | lp2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintPointOnParabolicArc()
int GCS::System::addConstraintPointOnParabolicArc | ( | Point & | p, |
ArcOfParabola & | e, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintPointOnPerpBisector() [1/2]
int GCS::System::addConstraintPointOnPerpBisector | ( | Point & | p, |
Line & | l, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintP2PSymmetric().
◆ addConstraintPointOnPerpBisector() [2/2]
int GCS::System::addConstraintPointOnPerpBisector | ( | Point & | p, |
Point & | lp1, | ||
Point & | lp2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintProportional()
int GCS::System::addConstraintProportional | ( | double * | param1, |
double * | param2, | ||
double | ratio, | ||
int | tagId, | ||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintArcDiameter(), and addConstraintCircleDiameter().
◆ addConstraintSnellsLaw()
int GCS::System::addConstraintSnellsLaw | ( | Curve & | ray1, |
Curve & | ray2, | ||
Curve & | boundary, | ||
Point | p, | ||
double * | n1, | ||
double * | n2, | ||
bool | flipn1, | ||
bool | flipn2, | ||
int | tagId, | ||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintTangent() [1/6]
References addConstraintTangentCircumf().
◆ addConstraintTangent() [2/6]
References addConstraintTangentCircumf().
◆ addConstraintTangent() [3/6]
int GCS::System::addConstraintTangent | ( | Circle & | c1, |
Circle & | c2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintTangentCircumf(), GCS::Circle::center, GCS::Circle::rad, GCS::Point::x, and GCS::Point::y.
◆ addConstraintTangent() [4/6]
References addConstraintP2LDistance().
◆ addConstraintTangent() [5/6]
References addConstraintP2LDistance().
◆ addConstraintTangent() [6/6]
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
◆ addConstraintTangentCircumf()
int GCS::System::addConstraintTangentCircumf | ( | Point & | p1, |
Point & | p2, | ||
double * | rd1, | ||
double * | rd2, | ||
bool | internal = false , |
||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraint(), GCS::Constraint::setDriving(), and GCS::Constraint::setTag().
Referenced by addConstraintTangent().
◆ addConstraintVertical() [1/2]
References addConstraintEqual().
◆ addConstraintVertical() [2/2]
int GCS::System::addConstraintVertical | ( | Point & | p1, |
Point & | p2, | ||
int | tagId = 0 , |
||
bool | driving = true |
||
) |
References addConstraintEqual(), and GCS::Point::x.
◆ applySolution()
void GCS::System::applySolution | ( | ) |
◆ calculateAngleViaPoint() [1/2]
◆ calculateAngleViaPoint() [2/2]
References GCS::Curve::CalculateNormal(), GCS::DeriVector2::x, and GCS::DeriVector2::y.
◆ calculateConstraintErrorByTag()
double GCS::System::calculateConstraintErrorByTag | ( | int | tagId | ) |
◆ calculateNormalAtPoint()
References GCS::Curve::CalculateNormal(), GCS::DeriVector2::x, and GCS::DeriVector2::y.
◆ clear()
void GCS::System::clear | ( | ) |
References GCS::free().
Referenced by ~System().
◆ clearByTag()
void GCS::System::clearByTag | ( | int | tagId | ) |
References removeConstraint().
◆ declareDrivenParams()
void GCS::System::declareDrivenParams | ( | VEC_pD & | params | ) |
◆ declareUnknowns()
◆ diagnose()
References GCS::SubSystem::applySolution(), Base::Console(), convergenceRedundant, debugMode, GCS::EigenDenseQR, GCS::EigenSparseQR, GCS::Constraint::getTag(), GCS::IterationLevel, Base::ConsoleSingleton::Log(), GCS::SolverReportingManager::LogGroupOfConstraints(), GCS::SolverReportingManager::LogMatrix(), GCS::SolverReportingManager::LogQRSystemInformation(), GCS::SolverReportingManager::LogString(), GCS::SolverReportingManager::LogToFile(), GCS::SolverReportingManager::Manager(), GCS::Minimal, qrAlgorithm, qrpivotThreshold, solve(), GCS::Success, and Base::ConsoleSingleton::Warning().
Referenced by initSolution().
◆ dofsNumber()
int GCS::System::dofsNumber | ( | ) | const |
◆ getConflicting()
void GCS::System::getConflicting | ( | VEC_I & | conflictingOut | ) | const |
◆ getDependentParams()
void GCS::System::getDependentParams | ( | VEC_pD & | pconstraintplistOut | ) | const |
◆ getFinePrecision()
double GCS::System::getFinePrecision | ( | ) |
◆ getRedundant()
void GCS::System::getRedundant | ( | VEC_I & | redundantOut | ) | const |
◆ initSolution()
References diagnose(), and GCS::Equal.
Referenced by solve().
◆ removeConstraint()
void GCS::System::removeConstraint | ( | Constraint * | constr | ) |
References DraftVecUtils::find(), GCS::free(), and GCS::Constraint::getTag().
Referenced by clearByTag().
◆ rescaleConstraint()
void GCS::System::rescaleConstraint | ( | int | id, |
double | coeff | ||
) |
◆ solve() [1/4]
int GCS::System::solve | ( | bool | isFine = true , |
Algorithm | alg = DogLeg , |
||
bool | isRedundantsolving = false |
||
) |
References GCS::Converged, convergence, convergenceRedundant, GCS::Failed, and GCS::Success.
Referenced by diagnose(), and solve().
◆ solve() [2/4]
int GCS::System::solve | ( | SubSystem * | subsys, |
bool | isFine = true , |
||
Algorithm | alg = DogLeg , |
||
bool | isRedundantsolving = false |
||
) |
References GCS::BFGS, GCS::DogLeg, GCS::Failed, and GCS::LevenbergMarquardt.
◆ solve() [3/4]
int GCS::System::solve | ( | SubSystem * | subsysA, |
SubSystem * | subsysB, | ||
bool | isFine = true , |
||
bool | isRedundantsolving = false |
||
) |
References GCS::SubSystem::calcGrad(), GCS::SubSystem::calcJacobi(), GCS::SubSystem::calcResidual(), GCS::Converged, convergence, convergenceRedundant, GCS::SubSystem::cSize(), GCS::SubSystem::error(), GCS::Failed, GCS::SubSystem::getParamList(), GCS::SubSystem::getParams(), maxIter, maxIterRedundant, GCS::SubSystem::maxStep(), GCS::SubSystem::pSize(), GCS::SubSystem::redirectParams(), GCS::SubSystem::revertParams(), GCS::SubSystem::setParams(), sketchSizeMultiplier, sketchSizeMultiplierRedundant, and GCS::Success.
◆ solve() [4/4]
int GCS::System::solve | ( | VEC_pD & | params, |
bool | isFine = true , |
||
Algorithm | alg = DogLeg , |
||
bool | isRedundantsolving = false |
||
) |
References declareUnknowns(), initSolution(), and solve().
◆ undoSolution()
void GCS::System::undoSolution | ( | ) |
Member Data Documentation
◆ convergence
double GCS::System::convergence |
Referenced by solve().
◆ convergenceRedundant
double GCS::System::convergenceRedundant |
Referenced by diagnose(), and solve().
◆ debugMode
DebugMode GCS::System::debugMode |
Referenced by diagnose().
◆ DL_tolf
double GCS::System::DL_tolf |
◆ DL_tolfRedundant
double GCS::System::DL_tolfRedundant |
◆ DL_tolg
double GCS::System::DL_tolg |
◆ DL_tolgRedundant
double GCS::System::DL_tolgRedundant |
◆ DL_tolx
double GCS::System::DL_tolx |
◆ DL_tolxRedundant
double GCS::System::DL_tolxRedundant |
◆ dogLegGaussStep
DogLegGaussStep GCS::System::dogLegGaussStep |
Referenced by Sketcher::Sketch::ConstrDef::ConstrDef().
◆ LM_eps
double GCS::System::LM_eps |
◆ LM_eps1
double GCS::System::LM_eps1 |
◆ LM_eps1Redundant
double GCS::System::LM_eps1Redundant |
◆ LM_epsRedundant
double GCS::System::LM_epsRedundant |
◆ LM_tau
double GCS::System::LM_tau |
◆ LM_tauRedundant
double GCS::System::LM_tauRedundant |
◆ maxIter
int GCS::System::maxIter |
Referenced by solve().
◆ maxIterRedundant
int GCS::System::maxIterRedundant |
Referenced by solve().
◆ qrAlgorithm
QRAlgorithm GCS::System::qrAlgorithm |
Referenced by diagnose(), and GCS::SolverReportingManager::LogQRSystemInformation().
◆ qrpivotThreshold
double GCS::System::qrpivotThreshold |
Referenced by diagnose(), and GCS::SolverReportingManager::LogQRSystemInformation().
◆ sketchSizeMultiplier
◆ sketchSizeMultiplierRedundant
The documentation for this class was generated from the following files:
- src/Mod/Sketcher/App/planegcs/GCS.h
- src/Mod/Sketcher/App/planegcs/GCS.cpp