Typedefs | |
typedef Gui::ViewProviderPythonFeatureT< ViewProviderCustom > ViewProviderCustomPython | |
typedef Gui::ViewProviderPythonFeatureT< ViewProviderSketch > ViewProviderPython | |
Enumerations | |
enum ConstraintCreationMode { Driving, Reference } | |
enum GeometryCreationMode { Normal, Construction } | |
enum SelType { SelUnknown = 0, SelVertex = 1, SelVertexOrRoot = 64, SelRoot = 2, SelEdge = 4, SelEdgeOrAxis = 128, SelHAxis = 8, SelVAxis = 16, SelExternalEdge = 32 } | |
The SelType enum Types of sketch elements that can be (pre)selected. More... | |
Functions | |
void addSketcherWorkbenchBSplines (Gui::MenuItem &bspline) | |
void addSketcherWorkbenchBSplines (Gui::ToolBarItem &bspline) | |
void addSketcherWorkbenchConstraints (Gui::MenuItem &cons) | |
void addSketcherWorkbenchConstraints (Gui::ToolBarItem &cons) | |
void addSketcherWorkbenchGeometries (Gui::MenuItem &geom) | |
void addSketcherWorkbenchGeometries (Gui::ToolBarItem &geom) | |
void addSketcherWorkbenchSketchActions (Gui::MenuItem &sketch) | |
void addSketcherWorkbenchSketchActions (Gui::ToolBarItem &sketch) | |
void addSketcherWorkbenchTools (Gui::MenuItem &consaccel) | |
void addSketcherWorkbenchTools (Gui::ToolBarItem &consaccel) | |
void addSketcherWorkbenchVirtualSpace (Gui::MenuItem &virtualspace) | |
void addSketcherWorkbenchVirtualSpace (Gui::ToolBarItem &virtualspace) | |
bool areAllPointsOrSegmentsFixed (const Sketcher::SketchObject *Obj, int GeoId1, int GeoId2, int GeoId3) | |
bool areBothPointsOrSegmentsFixed (const Sketcher::SketchObject *Obj, int GeoId1, int GeoId2) | |
bool checkBothExternal (int GeoId1, int GeoId2) | |
bool checkBothExternalOrConstructionPoints (const Sketcher::SketchObject *Obj, int GeoId1, int GeoId2) | |
bool checkConstraint (const std::vector< Sketcher::Constraint * > &vals, Sketcher::ConstraintType type, int geoid, Sketcher::PointPos pos) | |
Checks whether there is a constraint of the given type with a First element geoid and a FirstPos PosId. More... | |
void doEndpointTangency (Sketcher::SketchObject *Obj, Gui::SelectionObject &selection, int GeoId1, int GeoId2, Sketcher::PointPos PosId1, Sketcher::PointPos PosId2) | |
Does an endpoint-to-endpoint tangency. More... | |
void getIdsFromName (const std::string &name, const Sketcher::SketchObject *Obj, int &GeoId, Sketcher::PointPos &PosId) | |
std::string getStrippedPythonExceptionString (const Base::Exception &) | |
PyObject * initModule () | |
bool isConstructionPoint (const Sketcher::SketchObject *Obj, int GeoId) | |
bool isEdge (int GeoId, Sketcher::PointPos PosId) | |
bool IsPointAlreadyOnCurve (int GeoIdCurve, int GeoIdPoint, Sketcher::PointPos PosIdPoint, Sketcher::SketchObject *Obj) | |
bool isPointOrSegmentFixed (const Sketcher::SketchObject *Obj, int GeoId) | |
bool isSimpleVertex (const Sketcher::SketchObject *Obj, int GeoId, Sketcher::PointPos PosId) | |
bool isVertex (int GeoId, Sketcher::PointPos PosId) | |
void makeTangentToArcOfEllipseviaNewPoint (Sketcher::SketchObject *Obj, const Part::GeomArcOfEllipse *aoe, const Part::Geometry *geom2, int geoId1, int geoId2) | |
Makes a tangency constraint using external construction line between aoe => an arc of ellipse geom2 => any of an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of ellipse geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate. More... | |
void makeTangentToArcOfHyperbolaviaNewPoint (Sketcher::SketchObject *Obj, const Part::GeomArcOfHyperbola *aoh, const Part::Geometry *geom2, int geoId1, int geoId2) | |
Makes a tangency constraint using external construction line between aoh => an arc of hyperbola geom2 => any of an arc of hyperbola, an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of hyperbola geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate. More... | |
void makeTangentToArcOfParabolaviaNewPoint (Sketcher::SketchObject *Obj, const Part::GeomArcOfParabola *aop, const Part::Geometry *geom2, int geoId1, int geoId2) | |
Makes a simple tangency constraint using extra point + tangent via point aop => an arc of parabola geom2 => any of an arc of parabola, an arc of hyperbola an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of parabola geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate. More... | |
void makeTangentToEllipseviaNewPoint (Sketcher::SketchObject *Obj, const Part::GeomEllipse *ellipse, const Part::Geometry *geom2, int geoId1, int geoId2) | |
Makes a tangency constraint using external construction line between ellipse => an ellipse geom2 => any of an ellipse, an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the ellipse geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate. More... | |
template<typename T > | |
void Sketcher_addWorkbenchSketchActions (T &sketch) | |
template<typename T > | |
void SketcherAddWorkbenchBSplines (T &bspline) | |
template<> | |
void SketcherAddWorkbenchBSplines< Gui::MenuItem > (Gui::MenuItem &bspline) | |
template<> | |
void SketcherAddWorkbenchBSplines< Gui::ToolBarItem > (Gui::ToolBarItem &bspline) | |
template<typename T > | |
void SketcherAddWorkbenchConstraints (T &cons) | |
template<> | |
void SketcherAddWorkbenchConstraints< Gui::MenuItem > (Gui::MenuItem &cons) | |
template<> | |
void SketcherAddWorkbenchConstraints< Gui::ToolBarItem > (Gui::ToolBarItem &cons) | |
template<typename T > | |
void SketcherAddWorkbenchGeometries (T &geom) | |
template<typename T > | |
void SketcherAddWorkbenchTools (T &consaccel) | |
template<> | |
void SketcherAddWorkbenchTools< Gui::MenuItem > (Gui::MenuItem &consaccel) | |
template<> | |
void SketcherAddWorkbenchTools< Gui::ToolBarItem > (Gui::ToolBarItem &consaccel) | |
template<typename T > | |
void SketcherAddWorkbenchVirtualSpace (T &virtualspace) | |
template<> | |
void SketcherAddWorkbenchVirtualSpace< Gui::MenuItem > (Gui::MenuItem &virtualspace) | |
template<> | |
void SketcherAddWorkbenchVirtualSpace< Gui::ToolBarItem > (Gui::ToolBarItem &virtualspace) | |
template<typename T > | |
void SketcherAddWorkspaceArcs (T &geom) | |
template<> | |
void SketcherAddWorkspaceArcs< Gui::MenuItem > (Gui::MenuItem &geom) | |
template<> | |
void SketcherAddWorkspaceArcs< Gui::ToolBarItem > (Gui::ToolBarItem &geom) | |
template<typename T > | |
void SketcherAddWorkspaceRegularPolygon (T &geom) | |
template<> | |
void SketcherAddWorkspaceRegularPolygon< Gui::MenuItem > (Gui::MenuItem &geom) | |
template<> | |
void SketcherAddWorkspaceRegularPolygon< Gui::ToolBarItem > (Gui::ToolBarItem &geom) | |
template<typename T > | |
void SketcherAddWorkspaceSketchExtra (T &) | |
template<> | |
void SketcherAddWorkspaceSketchExtra< Gui::MenuItem > (Gui::MenuItem &sketch) | |
Attacher::eMapMode SuggestAutoMapMode (Attacher::SuggestResult::eSuggestResult *pMsgId=0, QString *message=0, std::vector< Attacher::eMapMode > *allmodes=0) | |
bool tryAutoRecompute (Sketcher::SketchObject *obj) | |
This function tries to auto-recompute the active document if the option is set in the user parameter. More... | |
bool tryAutoRecompute (Sketcher::SketchObject *obj, bool &autoremoveredundants) | |
Same as the other overload, but also returns whether redundants shall be removed or not. More... | |
void tryAutoRecomputeIfNotSolve (Sketcher::SketchObject *obj) | |
This function tries to auto-recompute as tryAutoRecompute. More... | |
Variables | |
GeometryCreationMode geometryCreationMode =Normal | |
Typedef Documentation
◆ ViewProviderCustomPython
◆ ViewProviderPython
Enumeration Type Documentation
◆ ConstraintCreationMode
◆ GeometryCreationMode
◆ SelType
enum SketcherGui::SelType |
The SelType enum Types of sketch elements that can be (pre)selected.
The root/origin and the axes are put up separately so that they can be specifically disallowed, for example, when in lock, horizontal, or vertical constraint modes.
Enumerator | |
---|---|
SelUnknown | |
SelVertex | |
SelVertexOrRoot | |
SelRoot | |
SelEdge | |
SelEdgeOrAxis | |
SelHAxis | |
SelVAxis | |
SelExternalEdge |
Function Documentation
◆ addSketcherWorkbenchBSplines() [1/2]
void SketcherGui::addSketcherWorkbenchBSplines | ( | Gui::MenuItem & | bspline | ) |
References SketcherAddWorkbenchBSplines().
Referenced by SketcherGui::Workbench::setupMenuBar(), and SketcherGui::Workbench::setupToolBars().
◆ addSketcherWorkbenchBSplines() [2/2]
void SketcherGui::addSketcherWorkbenchBSplines | ( | Gui::ToolBarItem & | bspline | ) |
References SketcherAddWorkbenchBSplines().
◆ addSketcherWorkbenchConstraints() [1/2]
void SketcherGui::addSketcherWorkbenchConstraints | ( | Gui::MenuItem & | cons | ) |
References SketcherAddWorkbenchConstraints().
Referenced by SketcherGui::Workbench::setupMenuBar(), and SketcherGui::Workbench::setupToolBars().
◆ addSketcherWorkbenchConstraints() [2/2]
void SketcherGui::addSketcherWorkbenchConstraints | ( | Gui::ToolBarItem & | cons | ) |
References SketcherAddWorkbenchConstraints().
◆ addSketcherWorkbenchGeometries() [1/2]
void SketcherGui::addSketcherWorkbenchGeometries | ( | Gui::MenuItem & | geom | ) |
References SketcherAddWorkbenchGeometries().
Referenced by SketcherGui::Workbench::setupMenuBar(), and SketcherGui::Workbench::setupToolBars().
◆ addSketcherWorkbenchGeometries() [2/2]
void SketcherGui::addSketcherWorkbenchGeometries | ( | Gui::ToolBarItem & | geom | ) |
References SketcherAddWorkbenchGeometries().
◆ addSketcherWorkbenchSketchActions() [1/2]
void SketcherGui::addSketcherWorkbenchSketchActions | ( | Gui::MenuItem & | sketch | ) |
References Sketcher_addWorkbenchSketchActions().
Referenced by SketcherGui::Workbench::setupMenuBar(), and SketcherGui::Workbench::setupToolBars().
◆ addSketcherWorkbenchSketchActions() [2/2]
void SketcherGui::addSketcherWorkbenchSketchActions | ( | Gui::ToolBarItem & | sketch | ) |
References Sketcher_addWorkbenchSketchActions().
◆ addSketcherWorkbenchTools() [1/2]
void SketcherGui::addSketcherWorkbenchTools | ( | Gui::MenuItem & | consaccel | ) |
References SketcherAddWorkbenchTools().
Referenced by SketcherGui::Workbench::setupMenuBar(), and SketcherGui::Workbench::setupToolBars().
◆ addSketcherWorkbenchTools() [2/2]
void SketcherGui::addSketcherWorkbenchTools | ( | Gui::ToolBarItem & | consaccel | ) |
References SketcherAddWorkbenchTools().
◆ addSketcherWorkbenchVirtualSpace() [1/2]
void SketcherGui::addSketcherWorkbenchVirtualSpace | ( | Gui::MenuItem & | virtualspace | ) |
References SketcherAddWorkbenchVirtualSpace().
Referenced by SketcherGui::Workbench::setupMenuBar(), and SketcherGui::Workbench::setupToolBars().
◆ addSketcherWorkbenchVirtualSpace() [2/2]
void SketcherGui::addSketcherWorkbenchVirtualSpace | ( | Gui::ToolBarItem & | virtualspace | ) |
References SketcherAddWorkbenchVirtualSpace().
◆ areAllPointsOrSegmentsFixed()
bool SketcherGui::areAllPointsOrSegmentsFixed | ( | const Sketcher::SketchObject * | Obj, |
int | GeoId1, | ||
int | GeoId2, | ||
int | GeoId3 | ||
) |
References Sketcher::Block, checkConstraint(), Sketcher::SketchObject::Constraints, Sketcher::PropertyConstraintList::getValues(), isConstructionPoint(), Sketcher::none, and Sketcher::GeoEnum::RefExt.
Referenced by CmdSketcherConstrainSymmetric::activated(), and CmdSketcherConstrainSymmetric::applyConstraint().
◆ areBothPointsOrSegmentsFixed()
bool SketcherGui::areBothPointsOrSegmentsFixed | ( | const Sketcher::SketchObject * | Obj, |
int | GeoId1, | ||
int | GeoId2 | ||
) |
References Sketcher::Block, checkConstraint(), Sketcher::SketchObject::Constraints, Sketcher::PropertyConstraintList::getValues(), isConstructionPoint(), Sketcher::none, and Sketcher::GeoEnum::RefExt.
Referenced by CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainCoincident::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainDistanceX::applyConstraint(), CmdSketcherConstrainDistanceY::applyConstraint(), CmdSketcherConstrainParallel::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainAngle::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), and CmdSketcherConstrainSymmetric::applyConstraint().
◆ checkBothExternal()
bool SketcherGui::checkBothExternal | ( | int | GeoId1, |
int | GeoId2 | ||
) |
◆ checkBothExternalOrConstructionPoints()
bool SketcherGui::checkBothExternalOrConstructionPoints | ( | const Sketcher::SketchObject * | Obj, |
int | GeoId1, | ||
int | GeoId2 | ||
) |
References isConstructionPoint().
◆ checkConstraint()
bool SketcherGui::checkConstraint | ( | const std::vector< Sketcher::Constraint * > & | vals, |
Sketcher::ConstraintType | type, | ||
int | geoid, | ||
Sketcher::PointPos | pos | ||
) |
Checks whether there is a constraint of the given type with a First element geoid and a FirstPos PosId.
Referenced by CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainBlock::applyConstraint(), areAllPointsOrSegmentsFixed(), areBothPointsOrSegmentsFixed(), and isPointOrSegmentFixed().
◆ doEndpointTangency()
void SketcherGui::doEndpointTangency | ( | Sketcher::SketchObject * | Obj, |
Gui::SelectionObject & | selection, | ||
int | GeoId1, | ||
int | GeoId2, | ||
Sketcher::PointPos | PosId1, | ||
Sketcher::PointPos | PosId2 | ||
) |
Does an endpoint-to-endpoint tangency.
Referenced by CmdSketcherConstrainCoincident::activated(), and CmdSketcherConstrainTangent::activated().
◆ getIdsFromName()
void SketcherGui::getIdsFromName | ( | const std::string & | name, |
const Sketcher::SketchObject * | Obj, | ||
int & | GeoId, | ||
Sketcher::PointPos & | PosId | ||
) |
Referenced by CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), and CmdSketcherConstrainSymmetric::activated().
◆ getStrippedPythonExceptionString()
std::string SketcherGui::getStrippedPythonExceptionString | ( | const Base::Exception & | e | ) |
◆ initModule()
PyObject* SketcherGui::initModule | ( | ) |
◆ isConstructionPoint()
bool SketcherGui::isConstructionPoint | ( | const Sketcher::SketchObject * | Obj, |
int | GeoId | ||
) |
References Part::Geometry::Construction, Base::Persistence::getClassTypeId(), Sketcher::SketchObject::getGeometry(), and Base::Persistence::getTypeId().
Referenced by CmdSketcherConstrainLock::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainDistance::applyConstraint(), areAllPointsOrSegmentsFixed(), areBothPointsOrSegmentsFixed(), checkBothExternalOrConstructionPoints(), and isPointOrSegmentFixed().
◆ isEdge()
bool SketcherGui::isEdge | ( | int | GeoId, |
Sketcher::PointPos | PosId | ||
) |
Referenced by CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), and CmdSketcherConstrainAngle::applyConstraint().
◆ IsPointAlreadyOnCurve()
bool SketcherGui::IsPointAlreadyOnCurve | ( | int | GeoIdCurve, |
int | GeoIdPoint, | ||
Sketcher::PointPos | PosIdPoint, | ||
Sketcher::SketchObject * | Obj | ||
) |
References Sketcher::SketchObject::getPoint(), and Sketcher::SketchObject::isPointOnCurve().
Referenced by CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), and CmdSketcherConstrainAngle::applyConstraint().
◆ isPointOrSegmentFixed()
bool SketcherGui::isPointOrSegmentFixed | ( | const Sketcher::SketchObject * | Obj, |
int | GeoId | ||
) |
References Sketcher::Block, checkConstraint(), Sketcher::SketchObject::Constraints, Sketcher::PropertyConstraintList::getValues(), isConstructionPoint(), Sketcher::none, and Sketcher::GeoEnum::RefExt.
Referenced by CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainLock::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), and CmdSketcherConstrainDiameter::applyConstraint().
◆ isSimpleVertex()
bool SketcherGui::isSimpleVertex | ( | const Sketcher::SketchObject * | Obj, |
int | GeoId, | ||
Sketcher::PointPos | PosId | ||
) |
◆ isVertex()
bool SketcherGui::isVertex | ( | int | GeoId, |
Sketcher::PointPos | PosId | ||
) |
Referenced by CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), and CmdSketcherConstrainAngle::applyConstraint().
◆ makeTangentToArcOfEllipseviaNewPoint()
void SketcherGui::makeTangentToArcOfEllipseviaNewPoint | ( | Sketcher::SketchObject * | Obj, |
const Part::GeomArcOfEllipse * | aoe, | ||
const Part::Geometry * | geom2, | ||
int | geoId1, | ||
int | geoId2 | ||
) |
Makes a tangency constraint using external construction line between aoe => an arc of ellipse geom2 => any of an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of ellipse geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate.
Makes a simple tangency constraint using extra point + tangent via point aoe => an arc of ellipse geom2 => any of an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of ellipse geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate.
The reason is for compatibility reasons with other code e.g. "Autoconstraints" in DrawSketchHandler.cpp
References Gui::Command::abortCommand(), Gui::cmdAppObjectArgs(), Gui::Command::commitCommand(), Base::Console(), Base::ConsoleSingleton::Error(), Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Sketcher::SketchObject::getHighestCurveIndex(), Part::GeomArcOfEllipse::getMajorAxisDir(), Part::GeomArcOfEllipse::getMajorRadius(), Part::GeomArcOfEllipse::getMinorRadius(), Base::Persistence::getTypeId(), Sketcher::start, tryAutoRecompute(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by CmdSketcherConstrainTangent::activated(), and SketcherGui::DrawSketchHandler::createAutoConstraints().
◆ makeTangentToArcOfHyperbolaviaNewPoint()
void SketcherGui::makeTangentToArcOfHyperbolaviaNewPoint | ( | Sketcher::SketchObject * | Obj, |
const Part::GeomArcOfHyperbola * | aoh, | ||
const Part::Geometry * | geom2, | ||
int | geoId1, | ||
int | geoId2 | ||
) |
Makes a tangency constraint using external construction line between aoh => an arc of hyperbola geom2 => any of an arc of hyperbola, an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of hyperbola geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate.
Makes a simple tangency constraint using extra point + tangent via point aoh => an arc of hyperbola geom2 => any of an arc of hyperbola, an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of hyperbola geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate.
The reason is for compatibility reasons with other code e.g. "Autoconstraints" in DrawSketchHandler.cpp
References Gui::Command::abortCommand(), Gui::cmdAppObjectArgs(), Gui::Command::commitCommand(), Base::Console(), Base::ConsoleSingleton::Error(), Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Sketcher::SketchObject::getHighestCurveIndex(), Part::GeomArcOfHyperbola::getMajorAxisDir(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), Base::Persistence::getTypeId(), Sketcher::start, tryAutoRecompute(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by CmdSketcherConstrainTangent::activated(), and CmdSketcherConstrainTangent::applyConstraint().
◆ makeTangentToArcOfParabolaviaNewPoint()
void SketcherGui::makeTangentToArcOfParabolaviaNewPoint | ( | Sketcher::SketchObject * | Obj, |
const Part::GeomArcOfParabola * | aop, | ||
const Part::Geometry * | geom2, | ||
int | geoId1, | ||
int | geoId2 | ||
) |
Makes a simple tangency constraint using extra point + tangent via point aop => an arc of parabola geom2 => any of an arc of parabola, an arc of hyperbola an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the arc of parabola geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate.
The reason is for compatibility reasons with other code e.g. "Autoconstraints" in DrawSketchHandler.cpp
References Gui::Command::abortCommand(), Gui::cmdAppObjectArgs(), Gui::Command::commitCommand(), Base::Console(), Base::ConsoleSingleton::Error(), Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Part::GeomArcOfParabola::getFocus(), Sketcher::SketchObject::getHighestCurveIndex(), Part::GeomArcOfHyperbola::getMajorAxisDir(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), Base::Persistence::getTypeId(), Sketcher::start, tryAutoRecompute(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by CmdSketcherConstrainTangent::activated(), and CmdSketcherConstrainTangent::applyConstraint().
◆ makeTangentToEllipseviaNewPoint()
void SketcherGui::makeTangentToEllipseviaNewPoint | ( | Sketcher::SketchObject * | Obj, |
const Part::GeomEllipse * | ellipse, | ||
const Part::Geometry * | geom2, | ||
int | geoId1, | ||
int | geoId2 | ||
) |
Makes a tangency constraint using external construction line between ellipse => an ellipse geom2 => any of an ellipse, an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the ellipse geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate.
Makes a simple tangency constraint using extra point + tangent via point ellipse => an ellipse geom2 => any of an ellipse, an arc of ellipse, a circle, or an arc (of circle) geoId1 => geoid of the ellipse geoId2 => geoid of geom2 NOTE: A command must be opened before calling this function, which this function commits or aborts as appropriate.
The reason is for compatibility reasons with other code e.g. "Autoconstraints" in DrawSketchHandler.cpp
References Gui::Command::abortCommand(), Gui::cmdAppObjectArgs(), Gui::Command::commitCommand(), Base::Console(), Base::ConsoleSingleton::Error(), Base::Persistence::getClassTypeId(), Sketcher::SketchObject::getHighestCurveIndex(), Base::Persistence::getTypeId(), Sketcher::start, tryAutoRecompute(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainTangent::applyConstraint(), and SketcherGui::DrawSketchHandler::createAutoConstraints().
◆ Sketcher_addWorkbenchSketchActions()
void SketcherGui::Sketcher_addWorkbenchSketchActions | ( | T & | sketch | ) |
References SketcherAddWorkspaceSketchExtra().
Referenced by addSketcherWorkbenchSketchActions().
◆ SketcherAddWorkbenchBSplines()
void SketcherGui::SketcherAddWorkbenchBSplines | ( | T & | bspline | ) |
Referenced by addSketcherWorkbenchBSplines().
◆ SketcherAddWorkbenchBSplines< Gui::MenuItem >()
void SketcherGui::SketcherAddWorkbenchBSplines< Gui::MenuItem > | ( | Gui::MenuItem & | bspline | ) |
◆ SketcherAddWorkbenchBSplines< Gui::ToolBarItem >()
void SketcherGui::SketcherAddWorkbenchBSplines< Gui::ToolBarItem > | ( | Gui::ToolBarItem & | bspline | ) |
◆ SketcherAddWorkbenchConstraints()
void SketcherGui::SketcherAddWorkbenchConstraints | ( | T & | cons | ) |
Referenced by addSketcherWorkbenchConstraints().
◆ SketcherAddWorkbenchConstraints< Gui::MenuItem >()
void SketcherGui::SketcherAddWorkbenchConstraints< Gui::MenuItem > | ( | Gui::MenuItem & | cons | ) |
◆ SketcherAddWorkbenchConstraints< Gui::ToolBarItem >()
void SketcherGui::SketcherAddWorkbenchConstraints< Gui::ToolBarItem > | ( | Gui::ToolBarItem & | cons | ) |
◆ SketcherAddWorkbenchGeometries()
void SketcherGui::SketcherAddWorkbenchGeometries | ( | T & | geom | ) |
References SketcherAddWorkspaceArcs(), and SketcherAddWorkspaceRegularPolygon().
Referenced by addSketcherWorkbenchGeometries().
◆ SketcherAddWorkbenchTools()
void SketcherGui::SketcherAddWorkbenchTools | ( | T & | consaccel | ) |
Referenced by addSketcherWorkbenchTools().
◆ SketcherAddWorkbenchTools< Gui::MenuItem >()
void SketcherGui::SketcherAddWorkbenchTools< Gui::MenuItem > | ( | Gui::MenuItem & | consaccel | ) |
◆ SketcherAddWorkbenchTools< Gui::ToolBarItem >()
void SketcherGui::SketcherAddWorkbenchTools< Gui::ToolBarItem > | ( | Gui::ToolBarItem & | consaccel | ) |
◆ SketcherAddWorkbenchVirtualSpace()
void SketcherGui::SketcherAddWorkbenchVirtualSpace | ( | T & | virtualspace | ) |
Referenced by addSketcherWorkbenchVirtualSpace().
◆ SketcherAddWorkbenchVirtualSpace< Gui::MenuItem >()
void SketcherGui::SketcherAddWorkbenchVirtualSpace< Gui::MenuItem > | ( | Gui::MenuItem & | virtualspace | ) |
◆ SketcherAddWorkbenchVirtualSpace< Gui::ToolBarItem >()
void SketcherGui::SketcherAddWorkbenchVirtualSpace< Gui::ToolBarItem > | ( | Gui::ToolBarItem & | virtualspace | ) |
◆ SketcherAddWorkspaceArcs()
void SketcherGui::SketcherAddWorkspaceArcs | ( | T & | geom | ) |
Referenced by SketcherAddWorkbenchGeometries().
◆ SketcherAddWorkspaceArcs< Gui::MenuItem >()
void SketcherGui::SketcherAddWorkspaceArcs< Gui::MenuItem > | ( | Gui::MenuItem & | geom | ) |
◆ SketcherAddWorkspaceArcs< Gui::ToolBarItem >()
void SketcherGui::SketcherAddWorkspaceArcs< Gui::ToolBarItem > | ( | Gui::ToolBarItem & | geom | ) |
◆ SketcherAddWorkspaceRegularPolygon()
void SketcherGui::SketcherAddWorkspaceRegularPolygon | ( | T & | geom | ) |
Referenced by SketcherAddWorkbenchGeometries().
◆ SketcherAddWorkspaceRegularPolygon< Gui::MenuItem >()
void SketcherGui::SketcherAddWorkspaceRegularPolygon< Gui::MenuItem > | ( | Gui::MenuItem & | geom | ) |
◆ SketcherAddWorkspaceRegularPolygon< Gui::ToolBarItem >()
void SketcherGui::SketcherAddWorkspaceRegularPolygon< Gui::ToolBarItem > | ( | Gui::ToolBarItem & | geom | ) |
◆ SketcherAddWorkspaceSketchExtra()
void SketcherGui::SketcherAddWorkspaceSketchExtra | ( | T & | ) |
Referenced by Sketcher_addWorkbenchSketchActions().
◆ SketcherAddWorkspaceSketchExtra< Gui::MenuItem >()
void SketcherGui::SketcherAddWorkspaceSketchExtra< Gui::MenuItem > | ( | Gui::MenuItem & | sketch | ) |
◆ SuggestAutoMapMode()
Attacher::eMapMode SketcherGui::SuggestAutoMapMode | ( | Attacher::SuggestResult::eSuggestResult * | pMsgId = 0 , |
QString * | message = 0 , |
||
std::vector< Attacher::eMapMode > * | allmodes = 0 |
||
) |
References Attacher::SuggestResult::allApplicableModes, Attacher::SuggestResult::bestFitMode, Gui::SelectionSingleton::getAsPropertyLinkSubList(), App::PropertyLinkSubList::getSubValues(), Attacher::SuggestResult::message, Gui::Selection(), Attacher::AttachEngine::setUp(), Attacher::SuggestResult::srIncompatibleGeometry, Attacher::SuggestResult::srLinkBroken, Attacher::SuggestResult::srNoModesFit, Attacher::SuggestResult::srOK, Attacher::SuggestResult::srUnexpectedError, SuggestAutoMapMode(), and Attacher::AttachEngine::suggestMapModes().
Referenced by SuggestAutoMapMode().
◆ tryAutoRecompute() [1/2]
bool SketcherGui::tryAutoRecompute | ( | Sketcher::SketchObject * | obj | ) |
This function tries to auto-recompute the active document if the option is set in the user parameter.
If the option is not set nothing will be done
- Returns
- true if a recompute was undertaken, false if not.
References tryAutoRecompute().
Referenced by CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainHorizontal::applyConstraint(), CmdSketcherConstrainVertical::applyConstraint(), CmdSketcherConstrainBlock::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainParallel::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), makeTangentToArcOfEllipseviaNewPoint(), makeTangentToArcOfHyperbolaviaNewPoint(), makeTangentToArcOfParabolaviaNewPoint(), makeTangentToEllipseviaNewPoint(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerSlot::releaseButton(), DrawSketchHandlerRegularPolygon::releaseButton(), tryAutoRecompute(), and tryAutoRecomputeIfNotSolve().
◆ tryAutoRecompute() [2/2]
bool SketcherGui::tryAutoRecompute | ( | Sketcher::SketchObject * | obj, |
bool & | autoremoveredundants | ||
) |
Same as the other overload, but also returns whether redundants shall be removed or not.
References App::GetApplication(), ParameterGrp::GetBool(), App::Application::GetParameterGroupByPath(), and Gui::Command::updateActive().
◆ tryAutoRecomputeIfNotSolve()
void SketcherGui::tryAutoRecomputeIfNotSolve | ( | Sketcher::SketchObject * | obj | ) |
This function tries to auto-recompute as tryAutoRecompute.
If tryAutoRecompute is not enabled, then it solves the SketchObject.
References tryAutoRecompute().
Referenced by CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), SketcherGui::ViewProviderSketch::mouseButtonPressed(), DrawSketchHandlerExternal::onSelectionChanged(), DrawSketchHandlerCarbonCopy::onSelectionChanged(), DrawSketchHandlerBSpline::quit(), DrawSketchHandlerLine::releaseButton(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerArc::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), DrawSketchHandler3PointArc::releaseButton(), DrawSketchHandlerCircle::releaseButton(), DrawSketchHandlerArcOfEllipse::releaseButton(), DrawSketchHandlerArcOfHyperbola::releaseButton(), DrawSketchHandlerArcOfParabola::releaseButton(), DrawSketchHandlerBSpline::releaseButton(), DrawSketchHandler3PointCircle::releaseButton(), DrawSketchHandlerPoint::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerSlot::releaseButton(), and DrawSketchHandlerRegularPolygon::releaseButton().
Variable Documentation
◆ geometryCreationMode
GeometryCreationMode SketcherGui::geometryCreationMode =Normal |
Referenced by DrawSketchHandlerCarbonCopy::onSelectionChanged(), DrawSketchHandlerLine::releaseButton(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), DrawSketchHandlerArc::releaseButton(), DrawSketchHandler3PointArc::releaseButton(), DrawSketchHandlerCircle::releaseButton(), DrawSketchHandlerArcOfEllipse::releaseButton(), DrawSketchHandlerArcOfHyperbola::releaseButton(), DrawSketchHandlerArcOfParabola::releaseButton(), DrawSketchHandlerBSpline::releaseButton(), DrawSketchHandler3PointCircle::releaseButton(), DrawSketchHandlerSlot::releaseButton(), and DrawSketchHandlerRegularPolygon::releaseButton().