#include <Sketch.h>
Classes | |
struct | ConstrDef |
container element to store and work with the constraints of this sketch More... | |
struct | GeoDef |
container element to store and work with the geometric elements of this sketch More... | |
Public Types | |
enum | GeoType { } |
Public Member Functions | |
int | addAngleAtPointConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2, int geoId3, PointPos pos3, double *value, ConstraintType cTyp, bool driving=true) |
int | addAngleConstraint (int geoId, double *value, bool driving=true) |
add an angle constraint on a line or between two lines More... | |
int | addAngleConstraint (int geoId1, int geoId2, double *value, bool driving=true) |
add an angle constraint on a line or between two lines More... | |
int | addAngleConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2, double *value, bool driving=true) |
add an angle constraint on a line or between two lines More... | |
int | addAngleViaPointConstraint (int geoId1, int geoId2, int geoId3, PointPos pos3, double value, bool driving=true) |
add angle-via-point constraint between any two curves More... | |
int | addArc (const Part::GeomArcOfCircle &circleSegment, bool fixed=false) |
add a arc (circle segment) More... | |
int | addArcOfEllipse (const Part::GeomArcOfEllipse &ellipseSegment, bool fixed=false) |
add an arc of ellipse More... | |
int | addArcOfHyperbola (const Part::GeomArcOfHyperbola &hyperbolaSegment, bool fixed=false) |
add an arc of hyperbola More... | |
int | addArcOfParabola (const Part::GeomArcOfParabola ¶bolaSegment, bool fixed=false) |
add an arc of parabola More... | |
int | addBSpline (const Part::GeomBSplineCurve &spline, bool fixed=false) |
add a BSpline More... | |
int | addCircle (const Part::GeomCircle &circle, bool fixed=false) |
add a circle More... | |
int | addConstraint (const Constraint *constraint) |
add one constraint to the sketch More... | |
int | addConstraints (const std::vector< Constraint * > &ConstraintList) |
constraints More... | |
int | addConstraints (const std::vector< Constraint * > &ConstraintList, const std::vector< bool > &unenforceableConstraints) |
add all constraints in the list, provided that are enforceable More... | |
int | addCoordinateXConstraint (int geoId, PointPos pos, double *value, bool driving=true) |
add a fixed X coordinate constraint to a point More... | |
int | addCoordinateYConstraint (int geoId, PointPos pos, double *value, bool driving=true) |
add a fixed Y coordinate constraint to a point More... | |
int | addDiameterConstraint (int geoId, double *value, bool driving=true) |
add a radius constraint on a circle or an arc More... | |
int | addDistanceConstraint (int geoId1, double *value, bool driving=true) |
add a length or distance constraint More... | |
int | addDistanceConstraint (int geoId1, PointPos pos1, int geoId2, double *value, bool driving=true) |
add a length or distance constraint More... | |
int | addDistanceConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2, double *value, bool driving=true) |
add a length or distance constraint More... | |
int | addDistanceXConstraint (int geoId, double *value, bool driving=true) |
add a horizontal distance constraint to two points or line ends More... | |
int | addDistanceXConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2, double *value, bool driving=true) |
add a horizontal distance constraint to two points or line ends More... | |
int | addDistanceYConstraint (int geoId, double *value, bool driving=true) |
add a vertical distance constraint to two points or line ends More... | |
int | addDistanceYConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2, double *value, bool driving=true) |
add a vertical distance constraint to two points or line ends More... | |
int | addEllipse (const Part::GeomEllipse &ellipse, bool fixed=false) |
add an ellipse More... | |
int | addEqualConstraint (int geoId1, int geoId2) |
add an equal length or radius constraints between two lines or between circles and arcs More... | |
int | addGeometry (const Part::Geometry *geo, bool fixed=false) |
add unspecified geometry More... | |
int | addGeometry (const std::vector< Part::Geometry * > &geo, bool fixed=false) |
add unspecified geometry More... | |
int | addGeometry (const std::vector< Part::Geometry * > &geo, const std::vector< bool > &blockedGeometry) |
add unspecified geometry, where each element's "fixed" status is given by the blockedGeometry array More... | |
int | addHorizontalConstraint (int geoId) |
add a horizontal constraint to a geometry More... | |
int | addHorizontalConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2) |
int | addInternalAlignmentBSplineControlPoint (int geoId1, int geoId2, int poleindex) |
int | addInternalAlignmentEllipseFocus1 (int geoId1, int geoId2) |
int | addInternalAlignmentEllipseFocus2 (int geoId1, int geoId2) |
int | addInternalAlignmentEllipseMajorDiameter (int geoId1, int geoId2) |
Internal Alignment constraints. More... | |
int | addInternalAlignmentEllipseMinorDiameter (int geoId1, int geoId2) |
int | addInternalAlignmentHyperbolaFocus (int geoId1, int geoId2) |
int | addInternalAlignmentHyperbolaMajorDiameter (int geoId1, int geoId2) |
add InternalAlignmentHyperbolaMajorRadius to a line and a hyperbola More... | |
int | addInternalAlignmentHyperbolaMinorDiameter (int geoId1, int geoId2) |
int | addInternalAlignmentKnotPoint (int geoId1, int geoId2, int knotindex) |
int | addInternalAlignmentParabolaFocus (int geoId1, int geoId2) |
int | addLine (const Part::GeomLineSegment &line, bool fixed=false) |
add an infinite line More... | |
int | addLineSegment (const Part::GeomLineSegment &lineSegment, bool fixed=false) |
add a line segment More... | |
int | addParallelConstraint (int geoId1, int geoId2) |
add a parallel constraint between two lines More... | |
int | addPerpendicularConstraint (int geoId1, int geoId2) |
add a perpendicular constraint between two lines More... | |
int | addPoint (const Part::GeomPoint &point, bool fixed=false) |
add dedicated geometry More... | |
int | addPointCoincidentConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2) |
add a coincident constraint to two points of two geometries More... | |
int | addPointOnObjectConstraint (int geoId1, PointPos pos1, int geoId2, bool driving=true) |
add a point on line constraint More... | |
int | addRadiusConstraint (int geoId, double *value, bool driving=true) |
add a radius constraint on a circle or an arc More... | |
int | addSnellsLawConstraint (int geoIdRay1, PointPos posRay1, int geoIdRay2, PointPos posRay2, int geoIdBnd, double *value, double *second, bool driving=true) |
add a snell's law constraint More... | |
int | addSymmetricConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2, int geoId3) |
add a symmetric constraint between two points with respect to a line More... | |
int | addSymmetricConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2, int geoId3, PointPos pos3) |
add a symmetric constraint between three points, the last point is in the middle of the first two More... | |
int | addTangentConstraint (int geoId1, int geoId2) |
add a tangency constraint between two geometries More... | |
int | addVerticalConstraint (int geoId) |
add a vertical constraint to a geometry More... | |
int | addVerticalConstraint (int geoId1, PointPos pos1, int geoId2, PointPos pos2) |
double | calculateAngleViaPoint (int geoId1, int geoId2, double px, double py) |
double | calculateConstraintError (int icstr) |
Base::Vector3d | calculateNormalAtPoint (int geoIdCurve, double px, double py) const |
void | clear (void) |
delete all geometry and constraints, leave an empty sketch More... | |
GeoListFacade | extractGeoListFacade () const |
std::vector< Part::Geometry * > | extractGeometry (bool withConstructionElements=true, bool withExternalElements=false) const |
returns the actual geometry More... | |
void | getBlockedGeometry (std::vector< bool > &blockedGeometry, std::vector< bool > &unenforceableConstraints, const std::vector< Constraint * > &ConstraintList) const |
get boolean list indicating whether the geometry is to be blocked or not More... | |
const std::vector< int > & | getConflicting (void) const |
GCS::DebugMode | getDebugMode (void) |
std::set< std::pair< int, Sketcher::PointPos > > | getDependencyGroup (int geoId, PointPos pos) const |
int | getGeometrySize (void) const |
Returns the size of the Geometry. More... | |
const std::vector< int > & | getMalformedConstraints (void) const |
virtual unsigned int | getMemSize (void) const |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More... | |
const std::vector< int > & | getPartiallyRedundant (void) const |
Base::Vector3d | getPoint (int geoId, PointPos pos) const |
retrieves a point More... | |
int | getPointId (int geoId, PointPos pos) const |
retrieves the index of a point More... | |
Py::Tuple | getPyGeometry (void) const |
get the geometry as python objects More... | |
GCS::QRAlgorithm | getQRAlgorithm () |
bool | getRecalculateInitialSolutionWhileMovingPoint () const |
Sets whether the initial solution should be recalculated while dragging after a certain distance from the previous drag point for smoother dragging operation. More... | |
const std::vector< int > & | getRedundant (void) const |
std::shared_ptr< SolverGeometryExtension > | getSolverExtension (int geoId) const |
double | getSolverPrecision () |
get standard (aka fine) solver precision More... | |
float | getSolveTime () const |
bool | hasConflicts (void) const |
bool | hasMalformedConstraints (void) const |
bool | hasPartialRedundancies (void) const |
bool | hasRedundancies (void) const |
int | initBSplinePieceMove (int geoId, PointPos pos, const Base::Vector3d &firstPoint, bool fine=true) |
Initializes a B-spline piece drag by setting the current sketch status as a reference. More... | |
int | initMove (int geoId, PointPos pos, bool fine=true) |
initializes a point (or curve) drag by setting the current sketch status as a reference More... | |
int | limitBSplineMove (int geoId, PointPos pos, const Base::Vector3d &firstPoint) |
Limits a b-spline drag to the segment around firstPoint . More... | |
int | movePoint (int geoId, PointPos pos, Base::Vector3d toPoint, bool relative=false) |
move this point (or curve) to a new location and solve. More... | |
void | resetInitMove () |
Resets the initialization of a point or curve drag. More... | |
int | resetSolver () |
resets the solver More... | |
virtual void | Restore (Base::XMLReader &) |
This method is used to restore properties from an XML document. More... | |
virtual void | Save (Base::Writer &) const |
This method is used to save properties to an XML document. More... | |
void | setConvergence (double conv) |
void | setConvergenceRedundant (double conv) |
int | setDatum (int constrId, double value) |
set the datum of a distance or angle constraint to a certain value and solve This can cause the solving to fail! More... | |
void | setDebugMode (GCS::DebugMode mode) |
void | setDL_tolf (double val) |
void | setDL_tolfRedundant (double val) |
void | setDL_tolg (double val) |
void | setDL_tolgRedundant (double val) |
void | setDL_tolx (double val) |
void | setDL_tolxRedundant (double val) |
void | setDogLegGaussStep (GCS::DogLegGaussStep mode) |
void | setLM_eps (double val) |
void | setLM_eps1 (double val) |
void | setLM_eps1Redundant (double val) |
void | setLM_epsRedundant (double val) |
void | setLM_tau (double val) |
void | setLM_tauRedundant (double val) |
void | setMaxIter (int maxiter) |
void | setMaxIterRedundant (int maxiter) |
void | setQRAlgorithm (GCS::QRAlgorithm alg) |
void | setQRPivotThreshold (double val) |
void | setRecalculateInitialSolutionWhileMovingPoint (bool recalculateInitialSolutionWhileMovingPoint) |
void | setSketchSizeMultiplier (bool mult) |
void | setSketchSizeMultiplierRedundant (bool mult) |
int | setUpSketch (const std::vector< Part::Geometry * > &GeoList, const std::vector< Constraint * > &ConstraintList, int extGeoCount=0) |
set the sketch up with geoms and constraints More... | |
Sketch () | |
int | solve (void) |
solve the actual set up sketch More... | |
Part::TopoShape | toShape (void) const |
return the actual geometry of the sketch a TopoShape More... | |
void | updateExtension (int geoId, std::unique_ptr< Part::GeometryExtension > &&ext) |
~Sketch () | |
Public Member Functions inherited from Base::Persistence | |
void | dumpToStream (std::ostream &stream, int compression) |
virtual unsigned int | getMemSize () const =0 |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More... | |
virtual Base::Type | getTypeId (void) const |
virtual void | Restore (XMLReader &)=0 |
This method is used to restore properties from an XML document. More... | |
virtual void | RestoreDocFile (Reader &) |
This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More... | |
void | restoreFromStream (std::istream &stream) |
virtual void | Save (Writer &) const =0 |
This method is used to save properties to an XML document. More... | |
virtual void | SaveDocFile (Writer &) const |
This method is used to save large amounts of data to a binary file. More... | |
Public Member Functions inherited from Base::BaseClass | |
BaseClass () | |
Construction. More... | |
BaseClass (const BaseClass &)=default | |
virtual PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (const BaseClass &)=default |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Public Attributes | |
GCS::Algorithm | defaultSolver |
GCS::Algorithm | defaultSolverRedundant |
Additional Inherited Members | |
Static Public Member Functions inherited from Base::Persistence | |
static void * | create (void) |
static std::string | encodeAttribute (const std::string &) |
Encodes an attribute upon saving. More... | |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Static Public Member Functions inherited from Base::BaseClass | |
static void * | create () |
static Type | getClassTypeId () |
static void | init () |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
Sketch::Sketch | ( | ) |
Sketch::~Sketch | ( | ) |
References clear().
int Sketch::addAngleAtPointConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
PointPos | pos2, | ||
int | geoId3, | ||
PointPos | pos3, | ||
double * | value, | ||
ConstraintType | cTyp, | ||
bool | driving = true |
||
) |
References GCS::System::addConstraintAngleViaPoint(), GCS::System::addConstraintP2PCoincident(), addPointOnObjectConstraint(), Sketcher::Angle, GCS::System::calculateAngleViaPoint(), Base::Console(), ConstraintsCounter, Base::ConsoleSingleton::Error(), GCSsys, Geoms, getPointId(), Sketcher::none, Sketcher::Perpendicular, and Sketcher::Tangent.
Referenced by addConstraint().
add an angle constraint on a line or between two lines
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintL2LAngle(), GCS::System::addConstraintP2PAngle(), Arc, Arcs, ConstraintsCounter, GCSsys, Geoms, and Lines.
Referenced by addConstraint().
add an angle constraint on a line or between two lines
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintL2LAngle(), ConstraintsCounter, GCSsys, Geoms, and Lines.
int Sketch::addAngleConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
PointPos | pos2, | ||
double * | value, | ||
bool | driving = true |
||
) |
add an angle constraint on a line or between two lines
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintL2LAngle(), ConstraintsCounter, Sketcher::end, GCSsys, Geoms, and Sketcher::start.
int Sketcher::Sketch::addAngleViaPointConstraint | ( | int | geoId1, |
int | geoId2, | ||
int | geoId3, | ||
PointPos | pos3, | ||
double | value, | ||
bool | driving = true |
||
) |
add angle-via-point constraint between any two curves
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
int Sketch::addArc | ( | const Part::GeomArcOfCircle & | circleSegment, |
bool | fixed = false |
||
) |
add a arc (circle segment)
References GCS::System::addConstraintArcRules(), Arc, Arcs, Part::Geometry::clone(), Sketcher::end, Sketcher::Sketch::GeoDef::endPointId, FixParameters, GCSsys, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomArcOfConic::getCenter(), Part::GeomArcOfConic::getEndPoint(), Part::GeomArcOfCircle::getRadius(), Part::GeomArcOfCircle::getRange(), Part::GeomArcOfConic::getStartPoint(), Sketcher::Sketch::GeoDef::index, Sketcher::mid, Sketcher::Sketch::GeoDef::midPointId, Sketcher::none, param2geoelement, Parameters, Sketcher::start, GCS::Arc::start, Sketcher::Sketch::GeoDef::startPointId, Sketcher::Sketch::GeoDef::type, Base::Vector3< _Precision >::x, GCS::Point::x, Base::Vector3< _Precision >::y, and GCS::Point::y.
Referenced by addGeometry().
int Sketch::addArcOfEllipse | ( | const Part::GeomArcOfEllipse & | ellipseSegment, |
bool | fixed = false |
||
) |
add an arc of ellipse
References GCS::System::addConstraintArcOfEllipseRules(), ArcOfEllipse, ArcsOfEllipse, Part::Geometry::clone(), Sketcher::end, Sketcher::Sketch::GeoDef::endPointId, FixParameters, GCSsys, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomArcOfConic::getCenter(), Part::GeomArcOfConic::getEndPoint(), Part::GeomArcOfEllipse::getMajorAxisDir(), Part::GeomArcOfEllipse::getMajorRadius(), Part::GeomArcOfEllipse::getMinorRadius(), Part::GeomArcOfEllipse::getRange(), Part::GeomArcOfConic::getStartPoint(), Sketcher::Sketch::GeoDef::index, Sketcher::mid, Sketcher::Sketch::GeoDef::midPointId, Sketcher::none, param2geoelement, Parameters, Sketcher::start, GCS::ArcOfEllipse::start, Sketcher::Sketch::GeoDef::startPointId, Sketcher::Sketch::GeoDef::type, Base::Vector3< _Precision >::x, GCS::Point::x, Base::Vector3< _Precision >::y, and GCS::Point::y.
Referenced by addGeometry().
int Sketch::addArcOfHyperbola | ( | const Part::GeomArcOfHyperbola & | hyperbolaSegment, |
bool | fixed = false |
||
) |
add an arc of hyperbola
References GCS::System::addConstraintArcOfHyperbolaRules(), ArcOfHyperbola, ArcsOfHyperbola, Part::Geometry::clone(), Sketcher::end, Sketcher::Sketch::GeoDef::endPointId, FixParameters, GCSsys, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomArcOfConic::getCenter(), Part::GeomArcOfConic::getEndPoint(), Part::GeomArcOfHyperbola::getMajorAxisDir(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), Part::GeomArcOfHyperbola::getRange(), Part::GeomArcOfConic::getStartPoint(), Sketcher::Sketch::GeoDef::index, Sketcher::mid, Sketcher::Sketch::GeoDef::midPointId, Sketcher::none, param2geoelement, Parameters, Sketcher::start, GCS::ArcOfHyperbola::start, Sketcher::Sketch::GeoDef::startPointId, Sketcher::Sketch::GeoDef::type, Base::Vector3< _Precision >::x, GCS::Point::x, Base::Vector3< _Precision >::y, and GCS::Point::y.
Referenced by addGeometry().
int Sketch::addArcOfParabola | ( | const Part::GeomArcOfParabola & | parabolaSegment, |
bool | fixed = false |
||
) |
add an arc of parabola
References GCS::System::addConstraintArcOfParabolaRules(), ArcOfParabola, ArcsOfParabola, Part::Geometry::clone(), Sketcher::end, Sketcher::Sketch::GeoDef::endPointId, FixParameters, GCSsys, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomArcOfConic::getCenter(), Part::GeomArcOfConic::getEndPoint(), Part::GeomArcOfParabola::getFocus(), Part::GeomArcOfParabola::getRange(), Part::GeomArcOfConic::getStartPoint(), Sketcher::Sketch::GeoDef::index, Sketcher::mid, Sketcher::Sketch::GeoDef::midPointId, Sketcher::none, param2geoelement, Parameters, Sketcher::start, GCS::ArcOfParabola::start, Sketcher::Sketch::GeoDef::startPointId, Sketcher::Sketch::GeoDef::type, Base::Vector3< _Precision >::x, GCS::Point::x, Base::Vector3< _Precision >::y, and GCS::Point::y.
Referenced by addGeometry().
int Sketch::addBSpline | ( | const Part::GeomBSplineCurve & | spline, |
bool | fixed = false |
||
) |
add a BSpline
References GCS::System::addConstraintP2PCoincident(), BSpline, BSplines, Sketcher::end, Sketcher::Sketch::GeoDef::endPointId, FixParameters, GCSsys, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomBSplineCurve::getDegree(), Part::GeomBoundedCurve::getEndPoint(), Part::GeomBSplineCurve::getKnots(), Part::GeomBSplineCurve::getMultiplicities(), Part::GeomBSplineCurve::getPoles(), Part::GeomBoundedCurve::getStartPoint(), Part::GeomBSplineCurve::getWeights(), Sketcher::Sketch::GeoDef::index, Part::GeomBSplineCurve::isPeriodic(), Sketcher::none, param2geoelement, Parameters, Sketcher::start, Sketcher::Sketch::GeoDef::startPointId, Sketcher::Sketch::GeoDef::type, Base::Vector3< _Precision >::x, GCS::Point::x, Base::Vector3< _Precision >::y, and GCS::Point::y.
Referenced by addGeometry().
int Sketch::addCircle | ( | const Part::GeomCircle & | circle, |
bool | fixed = false |
||
) |
add a circle
References GCS::Circle::center, Circle, Circles, Part::Geometry::clone(), FixParameters, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomConic::getCenter(), Part::GeomCircle::getRadius(), Sketcher::Sketch::GeoDef::index, Sketcher::mid, Sketcher::Sketch::GeoDef::midPointId, Sketcher::none, param2geoelement, Parameters, Sketcher::Sketch::GeoDef::type, GCS::Point::x, and GCS::Point::y.
Referenced by addGeometry().
int Sketch::addConstraint | ( | const Constraint * | constraint | ) |
add one constraint to the sketch
References addAngleAtPointConstraint(), addAngleConstraint(), addCoordinateXConstraint(), addCoordinateYConstraint(), addDiameterConstraint(), addDistanceConstraint(), addDistanceXConstraint(), addDistanceYConstraint(), addEqualConstraint(), addHorizontalConstraint(), addInternalAlignmentBSplineControlPoint(), addInternalAlignmentEllipseFocus1(), addInternalAlignmentEllipseFocus2(), addInternalAlignmentEllipseMajorDiameter(), addInternalAlignmentEllipseMinorDiameter(), addInternalAlignmentHyperbolaFocus(), addInternalAlignmentHyperbolaMajorDiameter(), addInternalAlignmentHyperbolaMinorDiameter(), addInternalAlignmentKnotPoint(), addInternalAlignmentParabolaFocus(), addParallelConstraint(), addPerpendicularConstraint(), addPointCoincidentConstraint(), addPointOnObjectConstraint(), addRadiusConstraint(), addSnellsLawConstraint(), addSymmetricConstraint(), addTangentConstraint(), addVerticalConstraint(), Sketcher::Constraint::AlignmentType, Sketcher::Angle, Sketcher::Block, Sketcher::BSplineControlPoint, Sketcher::BSplineKnotPoint, Sketcher::Coincident, Sketcher::Sketch::ConstrDef::constr, Constrs, Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, DrivenParameters, Sketcher::EllipseFocus1, Sketcher::EllipseFocus2, Sketcher::EllipseMajorDiameter, Sketcher::EllipseMinorDiameter, Sketcher::Equal, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, FixParameters, Geoms, Sketcher::Constraint::getValue(), Sketcher::Horizontal, Sketcher::HyperbolaFocus, Sketcher::HyperbolaMajor, Sketcher::HyperbolaMinor, Sketcher::InternalAlignment, Sketcher::Constraint::InternalAlignmentIndex, Sketcher::Constraint::isDriving, Sketcher::none, Sketcher::NumConstraintTypes, Sketcher::ParabolaFocus, Sketcher::Parallel, Parameters, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::Radius, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::SnellsLaw, Sketcher::Symmetric, Sketcher::Tangent, Sketcher::Constraint::Third, Sketcher::Constraint::ThirdPos, Sketcher::Constraint::Type, Sketcher::Vertical, and Sketcher::Weight.
Referenced by addConstraints(), and Sketcher::SketchObject::calculateConstraintError().
int Sketch::addConstraints | ( | const std::vector< Constraint * > & | ConstraintList | ) |
constraints
add all constraints in the list
References addConstraint(), Base::Console(), Base::ConsoleSingleton::Error(), and MalformedConstraints.
Referenced by setUpSketch().
int Sketch::addConstraints | ( | const std::vector< Constraint * > & | ConstraintList, |
const std::vector< bool > & | unenforceableConstraints | ||
) |
add all constraints in the list, provided that are enforceable
References addConstraint(), Sketcher::Block, Base::Console(), ConstraintsCounter, Base::ConsoleSingleton::Error(), and MalformedConstraints.
int Sketch::addCoordinateXConstraint | ( | int | geoId, |
PointPos | pos, | ||
double * | value, | ||
bool | driving = true |
||
) |
add a fixed X coordinate constraint to a point
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintCoordinateX(), ConstraintsCounter, GCSsys, and getPointId().
Referenced by addConstraint().
int Sketch::addCoordinateYConstraint | ( | int | geoId, |
PointPos | pos, | ||
double * | value, | ||
bool | driving = true |
||
) |
add a fixed Y coordinate constraint to a point
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintCoordinateY(), ConstraintsCounter, GCSsys, and getPointId().
Referenced by addConstraint().
add a radius constraint on a circle or an arc
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintArcDiameter(), GCS::System::addConstraintCircleDiameter(), Arc, Arcs, Circles, ConstraintsCounter, GCSsys, and Geoms.
Referenced by addConstraint().
add a length or distance constraint
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintP2PDistance(), ConstraintsCounter, GCSsys, Geoms, and Lines.
Referenced by addConstraint().
int Sketch::addDistanceConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
double * | value, | ||
bool | driving = true |
||
) |
add a length or distance constraint
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintP2LDistance(), ConstraintsCounter, GCSsys, Geoms, getPointId(), and Lines.
int Sketch::addDistanceConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
PointPos | pos2, | ||
double * | value, | ||
bool | driving = true |
||
) |
add a length or distance constraint
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintP2PDistance(), ConstraintsCounter, GCSsys, and getPointId().
add a horizontal distance constraint to two points or line ends
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintDifference(), ConstraintsCounter, GCSsys, Geoms, and Lines.
Referenced by addConstraint().
int Sketch::addDistanceXConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
PointPos | pos2, | ||
double * | value, | ||
bool | driving = true |
||
) |
add a horizontal distance constraint to two points or line ends
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintDifference(), ConstraintsCounter, GCSsys, getPointId(), and GCS::Point::x.
add a vertical distance constraint to two points or line ends
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintDifference(), ConstraintsCounter, GCSsys, Geoms, and Lines.
Referenced by addConstraint().
int Sketch::addDistanceYConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
PointPos | pos2, | ||
double * | value, | ||
bool | driving = true |
||
) |
add a vertical distance constraint to two points or line ends
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintDifference(), ConstraintsCounter, GCSsys, getPointId(), and GCS::Point::y.
int Sketch::addEllipse | ( | const Part::GeomEllipse & | ellipse, |
bool | fixed = false |
||
) |
add an ellipse
References Part::Geometry::clone(), Ellipse, Ellipses, FixParameters, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomConic::getCenter(), Part::GeomEllipse::getMajorAxisDir(), Part::GeomEllipse::getMajorRadius(), Part::GeomEllipse::getMinorRadius(), Sketcher::Sketch::GeoDef::index, Sketcher::mid, Sketcher::Sketch::GeoDef::midPointId, Sketcher::none, param2geoelement, Parameters, Sketcher::Sketch::GeoDef::type, Base::Vector3< _Precision >::x, GCS::Point::x, and Base::Vector3< _Precision >::y.
Referenced by addGeometry().
add an equal length or radius constraints between two lines or between circles and arcs
References GCS::System::addConstraintEqualFocus(), GCS::System::addConstraintEqualLength(), GCS::System::addConstraintEqualRadii(), GCS::System::addConstraintEqualRadius(), Arc, ArcOfEllipse, ArcOfHyperbola, ArcOfParabola, Arcs, ArcsOfEllipse, ArcsOfHyperbola, ArcsOfParabola, Circles, Base::Console(), ConstraintsCounter, Ellipses, GCSsys, Geoms, Lines, and Base::ConsoleSingleton::Warning().
Referenced by addConstraint().
int Sketch::addGeometry | ( | const Part::Geometry * | geo, |
bool | fixed = false |
||
) |
add unspecified geometry
References addArc(), addArcOfEllipse(), addArcOfHyperbola(), addArcOfParabola(), addBSpline(), addCircle(), addEllipse(), addLineSegment(), addPoint(), Sketcher::InternalType::BSplineKnotPoint, Sketcher::GeometryFacade::getFacade(), Base::Persistence::getTypeId(), and resolveAfterGeometryUpdated.
Referenced by addGeometry(), Sketcher::SketchObject::calculateAngleViaPoint(), Sketcher::SketchObject::calculateConstraintError(), Sketcher::SketchObject::isPointOnCurve(), and setUpSketch().
int Sketch::addGeometry | ( | const std::vector< Part::Geometry * > & | geo, |
bool | fixed = false |
||
) |
add unspecified geometry
References addGeometry().
int Sketch::addGeometry | ( | const std::vector< Part::Geometry * > & | geo, |
const std::vector< bool > & | blockedGeometry | ||
) |
add unspecified geometry, where each element's "fixed" status is given by the blockedGeometry array
References addGeometry().
add a horizontal constraint to a geometry
References GCS::System::addConstraintHorizontal(), ConstraintsCounter, GCSsys, Geoms, and Lines.
Referenced by addConstraint().
References GCS::System::addConstraintHorizontal(), ConstraintsCounter, GCSsys, and getPointId().
References GCS::System::addConstraintInternalAlignmentBSplineControlPoint(), BSpline, BSplines, Circles, ConstraintsCounter, GCSsys, Geoms, getPointId(), and Sketcher::mid.
Referenced by addConstraint().
References GCS::System::addConstraintInternalAlignmentEllipseFocus1(), ArcOfEllipse, ArcsOfEllipse, ConstraintsCounter, Ellipses, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
References GCS::System::addConstraintInternalAlignmentEllipseFocus2(), ArcOfEllipse, ArcsOfEllipse, ConstraintsCounter, Ellipses, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
Internal Alignment constraints.
add InternalAlignmentEllipseMajorDiameter to a line and an ellipse
References GCS::System::addConstraintInternalAlignmentEllipseMajorDiameter(), ArcOfEllipse, ArcsOfEllipse, ConstraintsCounter, Ellipses, Sketcher::end, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
References GCS::System::addConstraintInternalAlignmentEllipseMinorDiameter(), ArcOfEllipse, ArcsOfEllipse, ConstraintsCounter, Ellipses, Sketcher::end, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
References GCS::System::addConstraintInternalAlignmentHyperbolaFocus(), ArcOfHyperbola, ArcsOfHyperbola, ConstraintsCounter, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
add InternalAlignmentHyperbolaMajorRadius to a line and a hyperbola
References GCS::System::addConstraintInternalAlignmentHyperbolaMajorDiameter(), ArcOfHyperbola, ArcsOfHyperbola, ConstraintsCounter, Sketcher::end, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
References GCS::System::addConstraintInternalAlignmentHyperbolaMinorDiameter(), ArcOfHyperbola, ArcsOfHyperbola, ConstraintsCounter, Sketcher::end, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
References BSpline, BSplines, ConstraintsCounter, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
References GCS::System::addConstraintInternalAlignmentParabolaFocus(), ArcOfParabola, ArcsOfParabola, ConstraintsCounter, GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
int Sketch::addLine | ( | const Part::GeomLineSegment & | line, |
bool | fixed = false |
||
) |
add an infinite line
References Geoms.
int Sketch::addLineSegment | ( | const Part::GeomLineSegment & | lineSegment, |
bool | fixed = false |
||
) |
add a line segment
References Part::Geometry::clone(), Sketcher::end, Sketcher::Sketch::GeoDef::endPointId, FixParameters, Sketcher::Sketch::GeoDef::geo, Geoms, Part::GeomLineSegment::getEndPoint(), Part::GeomLineSegment::getStartPoint(), Sketcher::Sketch::GeoDef::index, Line, Lines, param2geoelement, Parameters, Sketcher::start, Sketcher::Sketch::GeoDef::startPointId, Sketcher::Sketch::GeoDef::type, GCS::Point::x, and GCS::Point::y.
Referenced by addGeometry().
add a parallel constraint between two lines
References GCS::System::addConstraintParallel(), ConstraintsCounter, GCSsys, Geoms, and Lines.
Referenced by addConstraint().
add a perpendicular constraint between two lines
References GCS::System::addConstraintPerpendicular(), GCS::System::addConstraintPointOnLine(), Arc, Base::Console(), ConstraintsCounter, GCSsys, Geoms, Lines, and Base::ConsoleSingleton::Warning().
Referenced by addConstraint().
int Sketch::addPoint | ( | const Part::GeomPoint & | point, |
bool | fixed = false |
||
) |
add dedicated geometry
add a point
References Sketcher::Sketch::GeoDef::endPointId, FixParameters, Sketcher::Sketch::GeoDef::geo, Geoms, Sketcher::Sketch::GeoDef::midPointId, param2geoelement, Parameters, Point, Sketcher::start, Sketcher::Sketch::GeoDef::startPointId, Sketcher::Sketch::GeoDef::type, GCS::Point::x, and GCS::Point::y.
Referenced by draftguitools.gui_stretch.Stretch::action(), addGeometry(), Sketcher::SketchObject::isPointOnCurve(), and draftguitools.gui_stretch.Stretch::numericInput().
add a coincident constraint to two points of two geometries
References GCS::System::addConstraintP2PCoincident(), ConstraintsCounter, GCSsys, and getPointId().
Referenced by addConstraint().
int Sketch::addPointOnObjectConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
bool | driving = true |
||
) |
add a point on line constraint
References GCS::System::addConstraintPointOnArc(), GCS::System::addConstraintPointOnCircle(), GCS::System::addConstraintPointOnEllipse(), GCS::System::addConstraintPointOnHyperbolicArc(), GCS::System::addConstraintPointOnLine(), GCS::System::addConstraintPointOnParabolicArc(), Arc, ArcOfEllipse, ArcOfHyperbola, ArcOfParabola, Arcs, ArcsOfEllipse, ArcsOfHyperbola, ArcsOfParabola, Circles, ConstraintsCounter, Ellipses, GCSsys, Geoms, getPointId(), and Lines.
Referenced by addAngleAtPointConstraint(), addConstraint(), and Sketcher::SketchObject::isPointOnCurve().
add a radius constraint on a circle or an arc
double * value is a pointer to double allocated in the heap, containing the constraint value and already inserted into either the FixParameters or Parameters array, as the case may be.
References GCS::System::addConstraintArcRadius(), GCS::System::addConstraintCircleRadius(), Arc, Arcs, Circles, ConstraintsCounter, GCSsys, and Geoms.
Referenced by addConstraint().
int Sketch::addSnellsLawConstraint | ( | int | geoIdRay1, |
PointPos | posRay1, | ||
int | geoIdRay2, | ||
PointPos | posRay2, | ||
int | geoIdBnd, | ||
double * | value, | ||
double * | second, | ||
bool | driving = true |
||
) |
add a snell's law constraint
double * value and double * second are each a pointer to double allocated in the heap and already inserted into either the FixParameters or Parameters array, as the case may be.
value must contain the constraint value (the ratio of n2/n1) second may be initialized to any value, however the solver will provide n1 in value and n2 in second.
References GCS::System::addConstraintSnellsLaw(), Base::Console(), ConstraintsCounter, Sketcher::end, Base::ConsoleSingleton::Error(), GCSsys, Geoms, getPointId(), and Sketcher::start.
Referenced by addConstraint().
int Sketch::addSymmetricConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
PointPos | pos2, | ||
int | geoId3 | ||
) |
add a symmetric constraint between two points with respect to a line
References GCS::System::addConstraintP2PSymmetric(), ConstraintsCounter, GCSsys, Geoms, getPointId(), and Lines.
Referenced by addConstraint().
int Sketch::addSymmetricConstraint | ( | int | geoId1, |
PointPos | pos1, | ||
int | geoId2, | ||
PointPos | pos2, | ||
int | geoId3, | ||
PointPos | pos3 | ||
) |
add a symmetric constraint between three points, the last point is in the middle of the first two
References GCS::System::addConstraintP2PSymmetric(), ConstraintsCounter, GCSsys, and getPointId().
add a tangency constraint between two geometries
References GCS::System::addConstraintPointOnLine(), GCS::System::addConstraintTangent(), Arc, ArcOfEllipse, Arcs, ArcsOfEllipse, Circles, Base::Console(), ConstraintsCounter, Ellipses, Base::ConsoleSingleton::Error(), GCSsys, Geoms, and Lines.
Referenced by addConstraint().
add a vertical constraint to a geometry
References GCS::System::addConstraintVertical(), ConstraintsCounter, GCSsys, Geoms, and Lines.
Referenced by addConstraint().
References GCS::System::addConstraintVertical(), ConstraintsCounter, GCSsys, and getPointId().
References GCS::System::calculateAngleViaPoint(), GCSsys, and GCS::Point::x.
Referenced by Sketcher::SketchObject::calculateAngleViaPoint().
double Sketcher::Sketch::calculateConstraintError | ( | int | icstr | ) |
Base::Vector3d Sketch::calculateNormalAtPoint | ( | int | geoIdCurve, |
double | px, | ||
double | py | ||
) | const |
References GCS::System::calculateNormalAtPoint(), GCSsys, and GCS::Point::x.
void Sketch::clear | ( | void | ) |
delete all geometry and constraints, leave an empty sketch
References Arcs, ArcsOfEllipse, ArcsOfHyperbola, ArcsOfParabola, BSplines, Circles, GCS::System::clear(), Conflicting, ConstraintsCounter, Constrs, DrivenParameters, Ellipses, FixParameters, GCSsys, Geoms, isInitMove, Lines, MalformedConstraints, param2geoelement, Parameters, PartiallyRedundant, pDependencyGroups, Redundant, resolveAfterGeometryUpdated, and solverExtensions.
Referenced by setUpSketch(), and ~Sketch().
GeoListFacade Sketch::extractGeoListFacade | ( | ) | const |
std::vector< Part::Geometry * > Sketch::extractGeometry | ( | bool | withConstructionElements = true , |
bool | withExternalElements = false |
||
) | const |
returns the actual geometry
References Geoms, and Sketcher::GeometryFacade::getFacade().
Referenced by Sketcher::SketchObject::movePoint(), and Sketcher::SketchObject::solve().
void Sketch::getBlockedGeometry | ( | std::vector< bool > & | blockedGeometry, |
std::vector< bool > & | unenforceableConstraints, | ||
const std::vector< Constraint * > & | ConstraintList | ||
) | const |
get boolean list indicating whether the geometry is to be blocked or not
References Sketcher::Block, and Sketcher::InternalAlignment.
const std::vector< int > & Sketcher::Sketch::getConflicting | ( | void | ) | const |
Referenced by Sketcher::SketchObject::retrieveSolverDiagnostics().
GCS::DebugMode Sketcher::Sketch::getDebugMode | ( | void | ) |
std::set< std::pair< int, Sketcher::PointPos > > Sketch::getDependencyGroup | ( | int | geoId, |
PointPos | pos | ||
) | const |
References pDependencyGroups.
Referenced by SketcherGui::ViewProviderSketch::mouseMove().
int Sketcher::Sketch::getGeometrySize | ( | void | ) | const |
Returns the size of the Geometry.
const std::vector< int > & Sketcher::Sketch::getMalformedConstraints | ( | void | ) | const |
Referenced by Sketcher::SketchObject::retrieveSolverDiagnostics().
|
virtual |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB?
Implements Base::Persistence.
const std::vector< int > & Sketcher::Sketch::getPartiallyRedundant | ( | void | ) | const |
Referenced by Sketcher::SketchObject::retrieveSolverDiagnostics().
Base::Vector3d Sketch::getPoint | ( | int | geoId, |
PointPos | pos | ||
) | const |
retrieves a point
References getPointId().
Referenced by ArchStructure.CommandStructuralSystem::Activated(), PathScripts.PathOpGui.TaskPanelBaseLocationPage::addLocation(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::addNewTag(), PathScripts.PathOpGui.TaskPanelBaseLocationPage::editLocation(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::editTag(), draftguitools.gui_arcs.Arc_3Points::getPoint(), ArchCurtainWall.CommandArchCurtainWall::getPoint(), ArchTruss.CommandArchTruss::getPoint(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::modifyStandardButtons(), and PathScripts.PathOpGui.TaskPanelBaseLocationPage::modifyStandardButtons().
retrieves the index of a point
References Sketcher::end, Geoms, Sketcher::mid, Sketcher::none, and Sketcher::start.
Referenced by addAngleAtPointConstraint(), addCoordinateXConstraint(), addCoordinateYConstraint(), addDistanceConstraint(), addDistanceXConstraint(), addDistanceYConstraint(), addHorizontalConstraint(), addInternalAlignmentBSplineControlPoint(), addInternalAlignmentEllipseFocus1(), addInternalAlignmentEllipseFocus2(), addInternalAlignmentEllipseMajorDiameter(), addInternalAlignmentEllipseMinorDiameter(), addInternalAlignmentHyperbolaFocus(), addInternalAlignmentHyperbolaMajorDiameter(), addInternalAlignmentHyperbolaMinorDiameter(), addInternalAlignmentKnotPoint(), addInternalAlignmentParabolaFocus(), addPointCoincidentConstraint(), addPointOnObjectConstraint(), addSnellsLawConstraint(), addSymmetricConstraint(), addVerticalConstraint(), and getPoint().
Py::Tuple Sketch::getPyGeometry | ( | void | ) | const |
get the geometry as python objects
References Arc, ArcOfEllipse, ArcOfHyperbola, ArcOfParabola, BSpline, and Geoms.
GCS::QRAlgorithm Sketcher::Sketch::getQRAlgorithm | ( | ) |
References GCS::System::qrAlgorithm.
bool Sketcher::Sketch::getRecalculateInitialSolutionWhileMovingPoint | ( | ) | const |
Sets whether the initial solution should be recalculated while dragging after a certain distance from the previous drag point for smoother dragging operation.
const std::vector< int > & Sketcher::Sketch::getRedundant | ( | void | ) | const |
Referenced by Sketcher::SketchObject::retrieveSolverDiagnostics().
std::shared_ptr< SolverGeometryExtension > Sketch::getSolverExtension | ( | int | geoId | ) | const |
References solverExtensions.
double Sketcher::Sketch::getSolverPrecision | ( | ) |
get standard (aka fine) solver precision
Referenced by Sketcher::SketchObject::isPointOnCurve().
float Sketcher::Sketch::getSolveTime | ( | ) | const |
Referenced by Sketcher::SketchObject::solve().
bool Sketcher::Sketch::hasConflicts | ( | void | ) | const |
bool Sketcher::Sketch::hasMalformedConstraints | ( | void | ) | const |
Referenced by Sketcher::SketchObject::retrieveSolverDiagnostics().
bool Sketcher::Sketch::hasPartialRedundancies | ( | void | ) | const |
Referenced by Sketcher::SketchObject::retrieveSolverDiagnostics().
bool Sketcher::Sketch::hasRedundancies | ( | void | ) | const |
Referenced by Sketcher::SketchObject::retrieveSolverDiagnostics().
int Sketch::initBSplinePieceMove | ( | int | geoId, |
PointPos | pos, | ||
const Base::Vector3d & | firstPoint, | ||
bool | fine = true |
||
) |
Initializes a B-spline piece drag by setting the current sketch status as a reference.
Only moves piece around firstPoint
.
References GCS::System::addConstraintP2PCoincident(), BSpline, BSplines, Part::GeomCurve::closestParameter(), GCS::DefaultTemporaryConstraint, GCS::BSpline::degree, Sketcher::end, GCSsys, Geoms, hasConflicts(), initMove(), InitParameters, GCS::System::initSolution(), isFine, isInitMove, GCS::BSpline::knots, MoveParameters, GCS::BSpline::mult, GCS::BSpline::poles, Sketcher::start, GCS::Point::x, and GCS::Point::y.
Referenced by Sketcher::SketchObject::initTemporaryBSplinePieceMove().
initializes a point (or curve) drag by setting the current sketch status as a reference
References GCS::System::addConstraintP2PCoincident(), GCS::System::addConstraintPointOnArc(), GCS::System::addConstraintPointOnCircle(), Arc, ArcOfEllipse, ArcOfHyperbola, ArcOfParabola, Arcs, BSpline, BSplines, Circles, GCS::DefaultTemporaryConstraint, Sketcher::end, GCSsys, Geoms, hasConflicts(), InitParameters, GCS::System::initSolution(), isFine, isInitMove, Lines, Sketcher::mid, MoveParameters, Sketcher::none, GCS::BSpline::poles, GCS::System::rescaleConstraint(), Sketcher::start, GCS::Point::x, and GCS::Point::y.
Referenced by initBSplinePieceMove(), Sketcher::SketchObject::initTemporaryMove(), and movePoint().
int Sketcher::Sketch::limitBSplineMove | ( | int | geoId, |
PointPos | pos, | ||
const Base::Vector3d & | firstPoint | ||
) |
Limits a b-spline drag to the segment around firstPoint
.
int Sketch::movePoint | ( | int | geoId, |
PointPos | pos, | ||
Base::Vector3d | toPoint, | ||
bool | relative = false |
||
) |
move this point (or curve) to a new location and solve.
This will introduce some additional weak constraints expressing a condition for satisfying the new point location! The relative flag permits moving relatively to the current position
References Arc, ArcOfEllipse, ArcOfHyperbola, ArcOfParabola, BSpline, BSplines, Sketcher::end, Geoms, hasConflicts(), initMove(), InitParameters, initToPoint, isInitMove, Sketcher::mid, MoveParameters, moveStep, Sketcher::none, GCS::BSpline::poles, RecalculateInitialSolutionWhileMovingPoint, solve(), Sketcher::start, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by Sketcher::SketchObject::movePoint(), and Sketcher::SketchObject::moveTemporaryPoint().
void Sketch::resetInitMove | ( | ) |
Resets the initialization of a point or curve drag.
References isInitMove.
Referenced by Sketcher::SketchObject::movePoint(), and Sketcher::SketchObject::solve().
int Sketch::resetSolver | ( | ) |
resets the solver
References Conflicting, GCS::System::declareDrivenParams(), GCS::System::declareUnknowns(), defaultSolverRedundant, GCS::System::dofsNumber(), DrivenParameters, GCSsys, GCS::System::getConflicting(), GCS::System::getDependentParams(), GCS::System::getPartiallyRedundant(), GCS::System::getRedundant(), GCS::System::initSolution(), Parameters, PartiallyRedundant, pDependentParametersList, and Redundant.
|
virtual |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
Implements Base::Persistence.
|
virtual |
This method is used to save properties to an XML document.
A good example you'll find in PropertyStandard.cpp, e.g. the vector:
The writer.ind() expression writes the indentation, just for pretty printing of the XML. As you see, the writing of the XML document is not done with a DOM implementation because of performance reasons. Therefore the programmer has to take care that a valid XML document is written. This means closing tags and writing UTF-8.
Implements Base::Persistence.
void Sketcher::Sketch::setConvergence | ( | double | conv | ) |
References GCS::System::convergence.
void Sketcher::Sketch::setConvergenceRedundant | ( | double | conv | ) |
References GCS::System::convergenceRedundant.
set the datum of a distance or angle constraint to a certain value and solve This can cause the solving to fail!
void Sketcher::Sketch::setDebugMode | ( | GCS::DebugMode | mode | ) |
References GCS::System::debugMode.
void Sketcher::Sketch::setDL_tolf | ( | double | val | ) |
References GCS::System::DL_tolf.
void Sketcher::Sketch::setDL_tolfRedundant | ( | double | val | ) |
References GCS::System::DL_tolfRedundant.
void Sketcher::Sketch::setDL_tolg | ( | double | val | ) |
References GCS::System::DL_tolg.
void Sketcher::Sketch::setDL_tolgRedundant | ( | double | val | ) |
References GCS::System::DL_tolgRedundant.
void Sketcher::Sketch::setDL_tolx | ( | double | val | ) |
References GCS::System::DL_tolx.
void Sketcher::Sketch::setDL_tolxRedundant | ( | double | val | ) |
References GCS::System::DL_tolxRedundant.
void Sketcher::Sketch::setDogLegGaussStep | ( | GCS::DogLegGaussStep | mode | ) |
References GCS::System::dogLegGaussStep.
void Sketcher::Sketch::setLM_eps | ( | double | val | ) |
References GCS::System::LM_eps.
void Sketcher::Sketch::setLM_eps1 | ( | double | val | ) |
References GCS::System::LM_eps1.
void Sketcher::Sketch::setLM_eps1Redundant | ( | double | val | ) |
References GCS::System::LM_eps1Redundant.
void Sketcher::Sketch::setLM_epsRedundant | ( | double | val | ) |
References GCS::System::LM_epsRedundant.
void Sketcher::Sketch::setLM_tau | ( | double | val | ) |
References GCS::System::LM_tau.
void Sketcher::Sketch::setLM_tauRedundant | ( | double | val | ) |
References GCS::System::LM_tauRedundant.
void Sketcher::Sketch::setMaxIter | ( | int | maxiter | ) |
References GCS::System::maxIter.
void Sketcher::Sketch::setMaxIterRedundant | ( | int | maxiter | ) |
References GCS::System::maxIterRedundant.
void Sketcher::Sketch::setQRAlgorithm | ( | GCS::QRAlgorithm | alg | ) |
References GCS::System::qrAlgorithm.
void Sketcher::Sketch::setQRPivotThreshold | ( | double | val | ) |
References GCS::System::qrpivotThreshold.
void Sketcher::Sketch::setRecalculateInitialSolutionWhileMovingPoint | ( | bool | recalculateInitialSolutionWhileMovingPoint | ) |
void Sketcher::Sketch::setSketchSizeMultiplier | ( | bool | mult | ) |
References GCS::System::sketchSizeMultiplier.
void Sketcher::Sketch::setSketchSizeMultiplierRedundant | ( | bool | mult | ) |
References GCS::System::sketchSizeMultiplierRedundant.
int Sketch::setUpSketch | ( | const std::vector< Part::Geometry * > & | GeoList, |
const std::vector< Constraint * > & | ConstraintList, | ||
int | extGeoCount = 0 |
||
) |
set the sketch up with geoms and constraints
returns the degree of freedom of a sketch and calculates a list of conflicting constraints
0 degrees of freedom correspond to a fully constrained sketch -1 degrees of freedom correspond to an over-constrained sketch positive degrees of freedom correspond to an under-constrained sketch
an over-constrained sketch will always contain conflicting constraints a fully constrained or under-constrained sketch may contain conflicting constraints or may not
References addConstraints(), addGeometry(), clear(), Conflicting, Base::Console(), debugMode, GCS::System::declareDrivenParams(), GCS::System::declareUnknowns(), defaultSolverRedundant, Base::TimeInfo::diffTime(), GCS::System::dofsNumber(), DrivenParameters, GCSsys, Geoms, GCS::System::getConflicting(), GCS::System::getDependentParams(), GCS::System::getDependentParamsGroups(), GCS::System::getPartiallyRedundant(), GCS::System::getRedundant(), GCS::System::initSolution(), GCS::IterationLevel, Base::ConsoleSingleton::Log(), GCS::Minimal, param2geoelement, Parameters, PartiallyRedundant, pDependentParametersList, and Redundant.
Referenced by Sketcher::SketchObject::diagnoseAdditionalConstraints(), Sketcher::SketchObject::movePoint(), Sketcher::SketchObject::setUpSketch(), and Sketcher::SketchObject::solve().
int Sketch::solve | ( | void | ) |
solve the actual set up sketch
References Base::Console(), debugMode, Base::TimeInfo::diffTime(), Base::TimeInfo::diffTimeF(), GCS::IterationLevel, Base::ConsoleSingleton::Log(), GCS::Minimal, and SolveTime.
Referenced by movePoint(), femsolver.run.Machine::reset(), and Sketcher::SketchObject::solve().
TopoShape Sketch::toShape | ( | void | ) | const |
return the actual geometry of the sketch a TopoShape
References Geoms, and Sketcher::GeometryFacade::getFacade().
Referenced by Sketcher::SketchObject::execute(), and Sketcher::SketchObject::restoreFinished().
void Sketch::updateExtension | ( | int | geoId, |
std::unique_ptr< Part::GeometryExtension > && | ext | ||
) |
References Geoms, and draftfunctions.move::move().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by addArcOfParabola(), addEqualConstraint(), addInternalAlignmentParabolaFocus(), addPointOnObjectConstraint(), and clear().
|
protected |
|
protected |
|
protected |
Referenced by clear(), resetSolver(), and setUpSketch().
|
protected |
Referenced by addAngleAtPointConstraint(), addAngleConstraint(), addConstraints(), addCoordinateXConstraint(), addCoordinateYConstraint(), addDiameterConstraint(), addDistanceConstraint(), addDistanceXConstraint(), addDistanceYConstraint(), addEqualConstraint(), addHorizontalConstraint(), addInternalAlignmentBSplineControlPoint(), addInternalAlignmentEllipseFocus1(), addInternalAlignmentEllipseFocus2(), addInternalAlignmentEllipseMajorDiameter(), addInternalAlignmentEllipseMinorDiameter(), addInternalAlignmentHyperbolaFocus(), addInternalAlignmentHyperbolaMajorDiameter(), addInternalAlignmentHyperbolaMinorDiameter(), addInternalAlignmentKnotPoint(), addInternalAlignmentParabolaFocus(), addParallelConstraint(), addPerpendicularConstraint(), addPointCoincidentConstraint(), addPointOnObjectConstraint(), addRadiusConstraint(), addSnellsLawConstraint(), addSymmetricConstraint(), addTangentConstraint(), addVerticalConstraint(), and clear().
|
protected |
Referenced by addConstraint(), and clear().
|
protected |
Referenced by setUpSketch(), and solve().
GCS::Algorithm Sketcher::Sketch::defaultSolver |
GCS::Algorithm Sketcher::Sketch::defaultSolverRedundant |
Referenced by resetSolver(), and setUpSketch().
|
protected |
Referenced by addConstraint(), clear(), resetSolver(), and setUpSketch().
|
protected |
|
protected |
Referenced by addArc(), addArcOfEllipse(), addArcOfHyperbola(), addArcOfParabola(), addBSpline(), addCircle(), addConstraint(), addEllipse(), addLineSegment(), addPoint(), and clear().
|
protected |
Referenced by addAngleAtPointConstraint(), addAngleConstraint(), addArc(), addArcOfEllipse(), addArcOfHyperbola(), addArcOfParabola(), addBSpline(), addCoordinateXConstraint(), addCoordinateYConstraint(), addDiameterConstraint(), addDistanceConstraint(), addDistanceXConstraint(), addDistanceYConstraint(), addEqualConstraint(), addHorizontalConstraint(), addInternalAlignmentBSplineControlPoint(), addInternalAlignmentEllipseFocus1(), addInternalAlignmentEllipseFocus2(), addInternalAlignmentEllipseMajorDiameter(), addInternalAlignmentEllipseMinorDiameter(), addInternalAlignmentHyperbolaFocus(), addInternalAlignmentHyperbolaMajorDiameter(), addInternalAlignmentHyperbolaMinorDiameter(), addInternalAlignmentParabolaFocus(), addParallelConstraint(), addPerpendicularConstraint(), addPointCoincidentConstraint(), addPointOnObjectConstraint(), addRadiusConstraint(), addSnellsLawConstraint(), addSymmetricConstraint(), addTangentConstraint(), addVerticalConstraint(), calculateAngleViaPoint(), calculateNormalAtPoint(), clear(), initBSplinePieceMove(), initMove(), resetSolver(), and setUpSketch().
|
protected |
Referenced by addAngleAtPointConstraint(), addAngleConstraint(), addArc(), addArcOfEllipse(), addArcOfHyperbola(), addArcOfParabola(), addBSpline(), addCircle(), addConstraint(), addDiameterConstraint(), addDistanceConstraint(), addDistanceXConstraint(), addDistanceYConstraint(), addEllipse(), addEqualConstraint(), addHorizontalConstraint(), addInternalAlignmentBSplineControlPoint(), addInternalAlignmentEllipseFocus1(), addInternalAlignmentEllipseFocus2(), addInternalAlignmentEllipseMajorDiameter(), addInternalAlignmentEllipseMinorDiameter(), addInternalAlignmentHyperbolaFocus(), addInternalAlignmentHyperbolaMajorDiameter(), addInternalAlignmentHyperbolaMinorDiameter(), addInternalAlignmentKnotPoint(), addInternalAlignmentParabolaFocus(), addLine(), addLineSegment(), addParallelConstraint(), addPerpendicularConstraint(), addPoint(), addPointOnObjectConstraint(), addRadiusConstraint(), addSnellsLawConstraint(), addSymmetricConstraint(), addTangentConstraint(), addVerticalConstraint(), clear(), extractGeoListFacade(), extractGeometry(), getPointId(), getPyGeometry(), initBSplinePieceMove(), initMove(), movePoint(), setUpSketch(), toShape(), and updateExtension().
|
protected |
Referenced by initBSplinePieceMove(), initMove(), and movePoint().
|
protected |
Referenced by movePoint().
|
protected |
Referenced by initBSplinePieceMove(), and initMove().
|
protected |
Referenced by clear(), initBSplinePieceMove(), initMove(), movePoint(), and resetInitMove().
|
protected |
Referenced by addAngleConstraint(), addDistanceConstraint(), addDistanceXConstraint(), addDistanceYConstraint(), addEqualConstraint(), addHorizontalConstraint(), addLineSegment(), addParallelConstraint(), addPerpendicularConstraint(), addPointOnObjectConstraint(), addSymmetricConstraint(), addTangentConstraint(), addVerticalConstraint(), clear(), and initMove().
|
protected |
Referenced by addConstraints(), and clear().
|
protected |
Referenced by initBSplinePieceMove(), initMove(), and movePoint().
|
protected |
Referenced by movePoint().
|
protected |
Referenced by addArc(), addArcOfEllipse(), addArcOfHyperbola(), addArcOfParabola(), addBSpline(), addCircle(), addEllipse(), addLineSegment(), addPoint(), clear(), and setUpSketch().
|
protected |
Referenced by addArc(), addArcOfEllipse(), addArcOfHyperbola(), addArcOfParabola(), addBSpline(), addCircle(), addConstraint(), addEllipse(), addLineSegment(), addPoint(), clear(), resetSolver(), and setUpSketch().
|
protected |
Referenced by clear(), resetSolver(), and setUpSketch().
|
protected |
Referenced by clear(), and getDependencyGroup().
|
protected |
Referenced by resetSolver(), and setUpSketch().
|
protected |
|
protected |
Referenced by movePoint().
|
protected |
Referenced by clear(), resetSolver(), and setUpSketch().
|
protected |
Referenced by addGeometry(), and clear().
|
protected |
Referenced by clear(), and getSolverExtension().
|
protected |
Referenced by solve().