#include <SketchObject.h>
Public Member Functions | |
SketchObject () | |
~SketchObject () | |
Public Member Functions inherited from Part::Part2DObject | |
virtual void | acceptGeometry () |
verify and accept the assigned geometry More... | |
virtual Base::Axis | getAxis (int axId) const |
retrieves an axis iterating through the construction lines of the sketch (indices start at 0) More... | |
virtual int | getAxisCount (void) const |
returns the number of construction lines (to be used as axes) More... | |
Part2DObject () | |
virtual void | transformPlacement (const Base::Placement &transform) override |
transformPlacement applies transform to placement of this shape. More... | |
Public Member Functions inherited from Part::Feature | |
Feature (void) | |
Constructor. More... | |
virtual | ~Feature () |
virtual const App::PropertyComplexGeoData * | getPropertyOfGeometry () const override |
This method returns the main property of a geometric object that holds the actual geometry. More... | |
TopLoc_Location | getLocation () const |
virtual DocumentObject * | getSubObject (const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const override |
Get the sub element/object by name. More... | |
Public Member Functions inherited from App::GeoFeature | |
GeoFeature (void) | |
Constructor. More... | |
virtual std::pair< std::string, std::string > | getElementName (const char *name, ElementNameType type=Normal) const |
Return the new and old style sub-element name. More... | |
virtual const PropertyComplexGeoData * | getPropertyOfGeometry () const |
This method returns the main property of a geometric object that holds the actual geometry. More... | |
virtual PyObject * | getPyObject (void) |
getPyObject returns the Python binding object More... | |
Base::Placement | globalPlacement () const |
Calculates the placement in the global reference coordinate system. More... | |
virtual void | transformPlacement (const Base::Placement &transform) |
transformPlacement applies transform to placement of this shape. More... | |
virtual | ~GeoFeature () |
Public Member Functions inherited from App::DocumentObject | |
virtual App::Property * | addDynamicProperty (const char *type, const char *name=nullptr, const char *group=nullptr, const char *doc=nullptr, short attr=0, bool ro=false, bool hidden=false) override |
virtual bool | adjustRelativeLinks (const std::set< App::DocumentObject * > &inList, std::set< App::DocumentObject * > *visited=nullptr) |
Called to adjust link properties to avoid cyclic links. More... | |
virtual bool | allowDuplicateLabel () const |
virtual bool | canLinkProperties () const |
virtual int | canLoadPartial () const |
allow partial loading of dependent objects More... | |
void | clearExpression (const ObjectIdentifier &path) |
void | clearOutListCache () const |
clear internal out list cache More... | |
virtual const char * | detachFromDocument () override |
DocumentObject (void) | |
Constructor. More... | |
void | enforceRecompute () |
Enforce this document object to be recomputed. More... | |
App::Document * | getDocument (void) const |
gets the document in which this Object is handled More... | |
std::string | getExportName (bool forced=false) const |
returns the name that is safe to be exported to other document More... | |
virtual const PropertyExpressionEngine::ExpressionInfo | getExpression (const ObjectIdentifier &path) const |
virtual std::string | getFullName () const override |
Return the object full name of the form DocName::ObjName. More... | |
DocumentObjectGroup * | getGroup () const |
get group if object is part of a group, otherwise 0 is returned More... | |
long | getID () const |
Return the object ID that is unique within its owner document. More... | |
const std::vector< App::DocumentObject * > & | getInList (void) const |
std::set< App::DocumentObject * > | getInListEx (bool recursive) const |
Return a set of all objects linking to this object, including possible external parent objects. More... | |
void | getInListEx (std::set< App::DocumentObject * > &inSet, bool recursive, std::vector< App::DocumentObject * > *inList=nullptr) const |
Get a set of all objects linking to this object, including possible external parent objects. More... | |
std::vector< App::DocumentObject * > | getInListRecursive (void) const |
get all objects link directly or indirectly to this object More... | |
virtual DocumentObject * | getLinkedObject (bool recurse=true, Base::Matrix4D *mat=nullptr, bool transform=false, int depth=0) const |
Return the linked object with optional transformation. More... | |
const char * | getNameInDocument (void) const |
returns the name which is set in the document for this object (not the name property!) More... | |
const std::string & | getOldLabel () const |
const std::vector< App::DocumentObject * > & | getOutList () const |
returns a list of objects this object is pointing to by Links More... | |
std::vector< App::DocumentObject * > | getOutList (int option) const |
void | getOutList (int option, std::vector< App::DocumentObject * > &res) const |
std::vector< App::DocumentObject * > | getOutListOfProperty (App::Property *) const |
returns a list of objects linked by the property More... | |
std::vector< App::DocumentObject * > | getOutListRecursive (void) const |
returns a list of objects this object is pointing to by Links and all further descended More... | |
std::vector< std::pair< App::DocumentObject *, std::string > > | getParents (int depth=0) const |
Obtain top parents and subnames of this object using its InList. More... | |
std::vector< std::list< App::DocumentObject * > > | getPathsByOutList (App::DocumentObject *to) const |
get all possible paths from this to another object following the OutList More... | |
virtual PyObject * | getPyObject (void) override |
This method returns the Python wrapper for a C++ object. More... | |
unsigned long | getStatus () const |
return the status bits More... | |
const char * | getStatusString (void) const |
get the status Message More... | |
virtual DocumentObject * | getSubObject (const char *subname, PyObject **pyObj=nullptr, Base::Matrix4D *mat=nullptr, bool transform=true, int depth=0) const |
Get the sub element/object by name. More... | |
std::vector< DocumentObject * > | getSubObjectList (const char *subname) const |
Return a list of objects referenced by a given subname including this object. More... | |
virtual std::vector< std::string > | getSubObjects (int reason=0) const |
Return name reference of all sub-objects. More... | |
virtual const char * | getViewProviderName (void) const |
returns the type name of the ViewProvider More... | |
virtual const char * | getViewProviderNameOverride () const |
This function is introduced to allow Python feature override its view provider. More... | |
const char * | getViewProviderNameStored () const |
virtual bool | hasChildElement () const |
return true to activate tree view group object handling and element visibility More... | |
virtual bool | isAttachedToDocument () const override |
virtual int | isElementVisible (const char *element) const |
Get sub-element visibility. More... | |
bool | isError (void) const |
set this feature to error More... | |
int | isExporting () const |
bool | isInInList (DocumentObject *objToTest) const |
test if this object is directly (non recursive) in the InList More... | |
bool | isInInListRecursive (DocumentObject *objToTest) const |
test if this object is in the InList and recursive further down More... | |
bool | isInOutList (DocumentObject *objToTest) const |
test if this object is directly (non recursive) in the OutList More... | |
bool | isInOutListRecursive (DocumentObject *objToTest) const |
test if the given object is in the OutList and recursive further down More... | |
bool | isRecomputing () const |
returns true if this objects is currently recomputing More... | |
bool | isRemoving () const |
returns true if this objects is currently removed from the document More... | |
bool | isRestoring () const |
returns true if this objects is currently restoring from file More... | |
bool | isTouched (void) const |
test if this document object is touched More... | |
bool | isValid (void) const |
virtual short | mustExecute (void) const |
mustExecute We call this method to check if the object was modified to be invoked. More... | |
bool | mustRecompute (void) const |
Test if this document object must be recomputed. More... | |
virtual void | onBeforeChangeLabel (std::string &newLabel) |
virtual void | onLostLinkToObject (DocumentObject *) |
Called in case of losing a link Get called by the document when a object got deleted a link property of this object ist pointing to. More... | |
virtual void | onUpdateElementReference (const Property *) |
void | purgeError (void) |
remove the error from the object More... | |
void | purgeTouched (void) |
reset this document object touched More... | |
bool | recomputeFeature (bool recursive=false) |
Recompute only this feature. More... | |
virtual bool | redirectSubName (std::ostringstream &ss, DocumentObject *topParent, DocumentObject *child) const |
Allow object to redirect a subname path. More... | |
virtual bool | removeDynamicProperty (const char *prop) override |
virtual void | renameObjectIdentifiers (const std::map< App::ObjectIdentifier, App::ObjectIdentifier > &paths) |
App::DocumentObject * | resolve (const char *subname, App::DocumentObject **parent=nullptr, std::string *childName=nullptr, const char **subElement=nullptr, PyObject **pyObj=nullptr, Base::Matrix4D *mat=nullptr, bool transform=true, int depth=0) const |
Resolve the last document object referenced in the subname. More... | |
App::DocumentObject * | resolveRelativeLink (std::string &subname, App::DocumentObject *&link, std::string &linkSub) const |
Resolve a link reference that is relative to this object reference. More... | |
virtual void | Save (Base::Writer &writer) const override |
This method is used to save properties to an XML document. More... | |
virtual int | setElementVisible (const char *element, bool visible) |
Child element handling. More... | |
virtual void | setExpression (const ObjectIdentifier &path, std::shared_ptr< App::Expression > expr) |
void | setStatus (ObjectStatus pos, bool on) |
bool | testIfLinkDAGCompatible (App::PropertyLinkSub &linkTo) const |
bool | testIfLinkDAGCompatible (App::PropertyLinkSubList &linksTo) const |
bool | testIfLinkDAGCompatible (const std::vector< DocumentObject * > &linksTo) const |
bool | testIfLinkDAGCompatible (DocumentObject *linkTo) const |
testIfLinkIsDAG tests a link that is about to be created for circular references. More... | |
bool | testStatus (ObjectStatus pos) const |
void | touch (bool noRecompute=false) |
Set the property touched -> changed, cause recomputation in Update() More... | |
virtual | ~DocumentObject () |
Public Member Functions inherited from App::TransactionalObject | |
virtual const char * | detachFromDocument () |
virtual bool | isAttachedToDocument () const |
TransactionalObject (void) | |
Constructor. More... | |
virtual | ~TransactionalObject () |
Public Member Functions inherited from App::ExtensionContainer | |
ExtensionIterator | extensionBegin () |
ExtensionContainer () | |
ExtensionIterator | extensionEnd () |
App::Extension * | getExtension (Base::Type, bool derived=true, bool no_except=false) const |
App::Extension * | getExtension (const std::string &name) const |
template<typename ExtensionT > | |
ExtensionT * | getExtensionByType (bool no_except=false, bool derived=true) const |
std::vector< Extension * > | getExtensionsDerivedFrom (Base::Type type) const |
template<typename ExtensionT > | |
std::vector< ExtensionT * > | getExtensionsDerivedFromType () const |
bool | hasExtension (Base::Type, bool derived=true) const |
bool | hasExtension (const std::string &name) const |
bool | hasExtensions () const |
void | registerExtension (Base::Type extension, App::Extension *ext) |
virtual | ~ExtensionContainer () |
virtual Property * | getPropertyByName (const char *name) const override |
find a property by its name More... | |
virtual const char * | getPropertyName (const Property *prop) const override |
get the name of a property More... | |
virtual void | getPropertyMap (std::map< std::string, Property * > &Map) const override |
get all properties of the class (including properties of the parent) More... | |
virtual void | getPropertyList (std::vector< Property * > &List) const override |
get all properties of the class (including properties of the parent) More... | |
virtual short | getPropertyType (const Property *prop) const override |
get the Type of a Property More... | |
virtual short | getPropertyType (const char *name) const override |
get the Type of a named Property More... | |
virtual const char * | getPropertyGroup (const Property *prop) const override |
get the Group of a Property More... | |
virtual const char * | getPropertyGroup (const char *name) const override |
get the Group of a named Property More... | |
virtual const char * | getPropertyDocumentation (const Property *prop) const override |
get the Group of a Property More... | |
virtual const char * | getPropertyDocumentation (const char *name) const override |
get the Group of a named Property More... | |
void | saveExtensions (Base::Writer &writer) const |
void | restoreExtensions (Base::XMLReader &reader) |
Public Member Functions inherited from App::PropertyContainer | |
virtual App::Property * | addDynamicProperty (const char *type, const char *name=nullptr, const char *group=nullptr, const char *doc=nullptr, short attr=0, bool ro=false, bool hidden=false) |
bool | changeDynamicProperty (const Property *prop, const char *group, const char *doc) |
virtual void | editProperty (const char *) |
virtual App::Property * | getDynamicPropertyByName (const char *name) const |
DynamicProperty::PropData | getDynamicPropertyData (const Property *prop) const |
virtual std::vector< std::string > | getDynamicPropertyNames () const |
virtual std::string | getFullName () 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... | |
virtual Property * | getPropertyByName (const char *name) const |
find a property by its name More... | |
virtual const char * | getPropertyDocumentation (const char *name) const |
get the Group of a named Property More... | |
virtual const char * | getPropertyDocumentation (const Property *prop) const |
get the Group of a Property More... | |
virtual const char * | getPropertyGroup (const char *name) const |
get the Group of a named Property More... | |
virtual const char * | getPropertyGroup (const Property *prop) const |
get the Group of a Property More... | |
virtual void | getPropertyList (std::vector< Property * > &List) const |
get all properties of the class (including properties of the parent) More... | |
virtual void | getPropertyMap (std::map< std::string, Property * > &Map) const |
get all properties of the class (including properties of the parent) More... | |
virtual const char * | getPropertyName (const Property *prop) const |
get the name of a property More... | |
virtual void | getPropertyNamedList (std::vector< std::pair< const char *, Property * > > &List) const |
get all properties with their names, may contain duplicates and aliases More... | |
const char * | getPropertyPrefix () const |
virtual short | getPropertyType (const char *name) const |
get the Type of a named Property More... | |
virtual short | getPropertyType (const Property *prop) const |
get the Type of a Property More... | |
bool | isHidden (const char *name) const |
check if the named property is hidden More... | |
bool | isHidden (const Property *prop) const |
check if the property is hidden More... | |
bool | isReadOnly (const char *name) const |
check if the named property is read-only More... | |
bool | isReadOnly (const Property *prop) const |
check if the property is read-only More... | |
virtual void | onPropertyStatusChanged (const Property &prop, unsigned long oldStatus) |
PropertyContainer () | |
A constructor. More... | |
virtual bool | removeDynamicProperty (const char *name) |
virtual void | Restore (Base::XMLReader &reader) |
This method is used to restore properties from an XML document. More... | |
virtual void | Save (Base::Writer &writer) const |
This method is used to save properties to an XML document. More... | |
void | setPropertyPrefix (const char *prefix) |
void | setPropertyStatus (unsigned char bit, bool value) |
set the Status bit of all properties at once More... | |
virtual | ~PropertyContainer () |
A destructor. More... | |
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 Member Functions inherited from Part::AttachExtension | |
Attacher::AttachEngine & | attacher (void) const |
AttachExtension () | |
bool | changeAttacherType (const char *typeName) |
changeAttacherType More... | |
virtual App::DocumentObjectExecReturn * | extensionExecute (void) |
virtual short int | extensionMustExecute (void) |
virtual PyObject * | getExtensionPyObject (void) |
bool | isAttacherActive () const |
Return whether this attacher is active. More... | |
virtual bool | isTouched_Mapping () |
virtual void | onExtendedDocumentRestored () |
get called after a document has been fully restored More... | |
virtual bool | positionBySupport (void) |
calculate and update the Placement property based on the Support, and mode. More... | |
virtual void | setAttacher (Attacher::AttachEngine *attacher) |
setAttacher sets the AttachEngine object. More... | |
void | updateAttacherVals () |
virtual | ~AttachExtension () |
Public Member Functions inherited from App::DocumentObjectExtension | |
DocumentObjectExtension () | |
virtual App::DocumentObjectExecReturn * | extensionExecute () |
virtual bool | extensionGetLinkedObject (DocumentObject *&ret, bool recursive, Base::Matrix4D *mat, bool transform, int depth) const |
Get the linked object. More... | |
virtual bool | extensionGetSubObject (DocumentObject *&ret, const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const |
Get the sub object by name. More... | |
virtual bool | extensionGetSubObjects (std::vector< std::string > &ret, int reason) const |
Get name references of all sub objects. More... | |
virtual bool | extensionHasChildElement () const |
virtual int | extensionIsElementVisible (const char *) |
virtual short | extensionMustExecute () |
virtual int | extensionSetElementVisible (const char *, bool) |
App::DocumentObject * | getExtendedObject () |
const App::DocumentObject * | getExtendedObject () const |
virtual PyObject * | getExtensionPyObject () override |
virtual const char * | getViewProviderExtensionName () const |
returns the type name of the ViewProviderExtension which is automatically attached to the viewprovider object when it is initiated More... | |
virtual void | onExtendedDocumentRestored () |
get called after a document has been fully restored More... | |
virtual void | onExtendedSettingDocument () |
get called after setting the document More... | |
virtual void | onExtendedSetupObject () |
get called after a brand new object was created More... | |
virtual void | onExtendedUnsetupObject () |
get called when object is going to be removed from the document More... | |
virtual | ~DocumentObjectExtension () |
Public Member Functions inherited from App::Extension | |
Extension () | |
App::ExtensionContainer * | getExtendedContainer () |
const App::ExtensionContainer * | getExtendedContainer () const |
virtual PyObject * | getExtensionPyObject () |
virtual void | initExtension (App::ExtensionContainer *obj) |
bool | isPythonExtension () |
std::string | name () const |
virtual | ~Extension () |
virtual Property * | extensionGetPropertyByName (const char *name) const |
find a property by its name More... | |
virtual const char * | extensionGetPropertyName (const Property *prop) const |
get the name of a property More... | |
virtual void | extensionGetPropertyMap (std::map< std::string, Property * > &Map) const |
get all properties of the class (including properties of the parent) More... | |
virtual void | extensionGetPropertyList (std::vector< Property * > &List) const |
get all properties of the class (including properties of the parent) More... | |
virtual short | extensionGetPropertyType (const Property *prop) const |
get the Type of a Property More... | |
virtual short | extensionGetPropertyType (const char *name) const |
get the Type of a named Property More... | |
virtual const char * | extensionGetPropertyGroup (const Property *prop) const |
get the Group of a Property More... | |
virtual const char * | extensionGetPropertyGroup (const char *name) const |
get the Group of a named Property More... | |
virtual const char * | extensionGetPropertyDocumentation (const Property *prop) const |
get the Group of a Property More... | |
virtual const char * | extensionGetPropertyDocumentation (const char *name) const |
get the Group of a named Property More... | |
virtual void | extensionSave (Base::Writer &) const |
virtual void | extensionRestore (Base::XMLReader &) |
bool | extensionIsDerivedFrom (const Base::Type type) const |
methods override Feature | |
enum | eReasonList { rlAllowed , rlOtherDoc , rlCircularReference , rlOtherPart , rlOtherBody , rlOtherBodyWithLinks , rlNotASketch , rlNonParallel , rlAxesMisaligned , rlOriginsMisaligned } |
bool | noRecomputes |
SketchObject can work in two modes: Recompute Mode and noRecomputes Mode. More... | |
short | mustExecute () const override |
mustExecute We call this method to check if the object was modified to be invoked. More... | |
App::DocumentObjectExecReturn * | execute (void) override |
recalculate the Feature (if no recompute is needed see also solve() and solverNeedsUpdate boolean) More... | |
const char * | getViewProviderName (void) const override |
returns the type name of the ViewProvider More... | |
bool | isSupportedGeometry (const Part::Geometry *geo) const |
Returns true if the sketcher supports the given geometry. More... | |
int | addGeometry (const Part::Geometry *geo, bool construction=false) |
Add geometry to a sketch. More... | |
int | addGeometry (const std::vector< Part::Geometry * > &geoList, bool construction=false) |
Add multiple geometry elements to a sketch. More... | |
int | delGeometry (int GeoId, bool deleteinternalgeo=true) |
Deletes indicated geometry (by geoid). More... | |
int | delGeometriesExclusiveList (const std::vector< int > &GeoIds) |
Deletes just the GeoIds indicated, it does not look for internal geometry. More... | |
int | delGeometries (const std::vector< int > &GeoIds) |
Does the same as delGeometry but allows to delete several geometries in one step. More... | |
int | deleteAllGeometry () |
deletes all the elements/constraints of the sketch except for external geometry More... | |
int | deleteAllConstraints () |
deletes all the constraints of the sketch More... | |
int | addConstraints (const std::vector< Constraint * > &ConstraintList) |
add all constraints in the list More... | |
int | addCopyOfConstraints (const SketchObject &orig) |
Copy the constraints instead of cloning them and copying the expressions if any. More... | |
int | addConstraint (const Constraint *constraint) |
add constraint More... | |
int | addConstraint (std::unique_ptr< Constraint > constraint) |
add constraint More... | |
int | delConstraint (int ConstrId) |
delete constraint More... | |
int | delConstraints (std::vector< int > ConstrIds, bool updategeometry=true) |
deletes a group of constraints at once, if norecomputes is active, the default behaviour is that it will solve the sketch. More... | |
int | delConstraintOnPoint (int GeoId, PointPos PosId, bool onlyCoincident=true) |
int | delConstraintOnPoint (int VertexId, bool onlyCoincident=true) |
int | delConstraintsToExternal () |
Deletes all constraints referencing an external geometry. More... | |
int | transferConstraints (int fromGeoId, PointPos fromPosId, int toGeoId, PointPos toPosId, bool doNotTransformTangencies=false) |
transfers all constraints of a point to a new point More... | |
int | carbonCopy (App::DocumentObject *pObj, bool construction=true) |
Carbon copy another sketch geometry and constraints. More... | |
int | addExternal (App::DocumentObject *Obj, const char *SubName) |
add an external geometry reference More... | |
int | delExternal (int ExtGeoId) |
delete external ExtGeoId >= 0 with 0 corresponding to the first user defined external geometry More... | |
int | delAllExternal () |
deletes all external geometry More... | |
template<typename GeometryT = Part::Geometry, typename = typename std::enable_if< std::is_base_of<Part::Geometry, typename std::decay<GeometryT>::type>::value >::type> | |
const GeometryT * | getGeometry (int GeoId) const |
returns a pointer to a given Geometry index, possible indexes are: id>=0 for user defined geometries, id==-1 for the horizontal sketch axis, id==-2 for the vertical sketch axis id<=-3 for user defined projected external geometries, More... | |
std::unique_ptr< const GeometryFacade > | getGeometryFacade (int GeoId) const |
const std::vector< Part::Geometry * > & | getInternalGeometry (void) const |
returns a list of all internal geometries More... | |
const std::vector< Part::Geometry * > & | getExternalGeometry (void) const |
returns a list of projected external geometries More... | |
void | rebuildExternalGeometry (void) |
rebuilds external geometry (projection onto the sketch plane) More... | |
int | getExternalGeometryCount (void) const |
returns the number of external Geometry entities More... | |
std::vector< Part::Geometry * > | getCompleteGeometry (void) const |
retrieves a vector containing both normal and external Geometry (including the sketch axes) More... | |
GeoListFacade | getGeoListFacade (void) const |
int | getCompleteGeometryIndex (int GeoId) const |
converts a GeoId index into an index of the CompleteGeometry vector More... | |
int | getGeoIdFromCompleteGeometryIndex (int completeGeometryIndex) const |
int | hasConflicts (void) const |
returns non zero if the sketch contains conflicting constraints More... | |
int | setUpSketch () |
sets the geometry of sketchObject as the solvedsketch geometry returns the DoF of such a geometry. More... | |
int | diagnoseAdditionalConstraints (std::vector< Sketcher::Constraint * > additionalconstraints) |
Performs a full analysis of the addition of additional constraints without adding them to the sketch object. More... | |
int | solve (bool updateGeoAfterSolving=true) |
solves the sketch and updates the geometry, but not all the dependent features (does not recompute) When a recompute is necessary, recompute triggers execute() which solves the sketch and updates all dependent features When a solve only is necessary (e.g. More... | |
int | setDatum (int ConstrId, double Datum) |
set the datum of a Distance or Angle constraint and solve More... | |
int | setDriving (int ConstrId, bool isdriving) |
set the driving status of this constraint and solve More... | |
int | getDriving (int ConstrId, bool &isdriving) |
get the driving status of this constraint More... | |
int | toggleDriving (int ConstrId) |
toggle the driving status of this constraint More... | |
int | setActive (int ConstrId, bool isactive) |
set the driving status of this constraint and solve More... | |
int | getActive (int ConstrId, bool &isactive) |
get the driving status of this constraint More... | |
int | toggleActive (int ConstrId) |
toggle the driving status of this constraint More... | |
int | setDatumsDriving (bool isdriving) |
Make all dimensionals Driving/non-Driving. More... | |
int | moveDatumsToEnd (void) |
Move Dimensional constraints at the end of the properties array. More... | |
int | setVirtualSpace (int ConstrId, bool isinvirtualspace) |
set the driving status of this constraint and solve More... | |
int | setVirtualSpace (std::vector< int > constrIds, bool isinvirtualspace) |
set the driving status of a group of constraints at once More... | |
int | getVirtualSpace (int ConstrId, bool &isinvirtualspace) const |
get the driving status of this constraint More... | |
int | toggleVirtualSpace (int ConstrId) |
toggle the driving status of this constraint More... | |
int | movePoint (int GeoId, PointPos PosId, const Base::Vector3d &toPoint, bool relative=false, bool updateGeoBeforeMoving=false) |
move this point to a new location and solve More... | |
Base::Vector3d | getPoint (int GeoId, PointPos PosId) const |
retrieves the coordinates of a point More... | |
int | toggleConstruction (int GeoId) |
toggle geometry to draft line More... | |
int | setConstruction (int GeoId, bool on) |
int | fillet (int geoId, PointPos pos, double radius, bool trim=true, bool preserveCorner=false) |
Create a sketch fillet from the point at the intersection of two lines. More... | |
int | fillet (int geoId1, int geoId2, const Base::Vector3d &refPnt1, const Base::Vector3d &refPnt2, double radius, bool trim=true, bool createCorner=false) |
More general form of fillet. More... | |
int | trim (int geoId, const Base::Vector3d &point) |
trim a curve More... | |
int | extend (int geoId, double increment, PointPos endPoint) |
extend a curve More... | |
int | split (int geoId, const Base::Vector3d &point) |
split a curve More... | |
int | addSymmetric (const std::vector< int > &geoIdList, int refGeoId, Sketcher::PointPos refPosId=Sketcher::PointPos::none) |
adds symmetric geometric elements with respect to the refGeoId (line or point) More... | |
int | addCopy (const std::vector< int > &geoIdList, const Base::Vector3d &displacement, bool moveonly=false, bool clone=false, int csize=2, int rsize=1, bool constraindisplacement=false, double perpscale=1.0) |
with default parameters adds a copy of the geometric elements displaced by the displacement vector. More... | |
int | removeAxesAlignment (const std::vector< int > &geoIdList) |
int | exposeInternalGeometry (int GeoId) |
Exposes all internal geometry of an object supporting internal geometry. More... | |
int | deleteUnusedInternalGeometry (int GeoId, bool delgeoid=false) |
Deletes all unused (not further constrained) internal geometry. More... | |
bool | convertToNURBS (int GeoId) |
Approximates the given geometry with a B-spline. More... | |
bool | increaseBSplineDegree (int GeoId, int degreeincrement=1) |
Increases the degree of a BSpline by degreeincrement, which defaults to 1. More... | |
bool | decreaseBSplineDegree (int GeoId, int degreedecrement=1) |
Decreases the degree of a BSpline by degreedecrement, which defaults to 1. More... | |
bool | modifyBSplineKnotMultiplicity (int GeoId, int knotIndex, int multiplicityincr=1) |
Increases or Decreases the multiplicity of a BSpline knot by the multiplicityincr param, which defaults to 1, if the result is multiplicity zero, the knot is removed. More... | |
bool | insertBSplineKnot (int GeoId, double param, int multiplicity=1) |
Inserts a knot in the BSpline at param with given multiplicity . If the knot already exists, its multiplicity is increased by multiplicity . More... | |
void | getGeoVertexIndex (int VertexId, int &GeoId, PointPos &PosId) const |
retrieves for a Vertex number the corresponding GeoId and PosId More... | |
int | getHighestVertexIndex (void) const |
int | getHighestCurveIndex (void) const |
void | rebuildVertexIndex (void) |
int | getVertexIndexGeoPos (int GeoId, PointPos PosId) const |
retrieves for a GeoId and PosId the Vertex number More... | |
const std::vector< std::map< int, Sketcher::PointPos > > | getCoincidenceGroups () |
void | isCoincidentWithExternalGeometry (int GeoId, bool &start_external, bool &mid_external, bool &end_external) |
const std::map< int, Sketcher::PointPos > | getAllCoincidentPoints (int GeoId, PointPos PosId) |
void | getDirectlyCoincidentPoints (int GeoId, PointPos PosId, std::vector< int > &GeoIdList, std::vector< PointPos > &PosIdList) |
retrieves for a Vertex number a list with all coincident points (sharing a single coincidence constraint) More... | |
void | getDirectlyCoincidentPoints (int VertexId, std::vector< int > &GeoIdList, std::vector< PointPos > &PosIdList) |
bool | arePointsCoincident (int GeoId1, PointPos PosId1, int GeoId2, PointPos PosId2) |
void | getConstraintIndices (int GeoId, std::vector< int > &constraintList) |
returns a list of indices of all constraints involving given GeoId More... | |
double | calculateAngleViaPoint (int geoId1, int geoId2, double px, double py) |
bool | isPointOnCurve (int geoIdCurve, double px, double py) |
double | calculateConstraintError (int ConstrId) |
int | changeConstraintsLocking (bool bLock) |
changeConstraintsLocking locks or unlocks all tangent and perpendicular constraints. More... | |
bool | constraintHasExpression (int constrid) const |
returns whether a given constraint has an associated expression or not More... | |
int | port_reversedExternalArcs (bool justAnalyze) |
porting functions More... | |
virtual PyObject * | getPyObject (void) override |
getPyObject returns the Python binding object More... | |
virtual unsigned int | getMemSize (void) const override |
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 void | Save (Base::Writer &) const override |
This method is used to save properties to an XML document. More... | |
virtual void | Restore (Base::XMLReader &) override |
This method is used to restore properties from an XML document. More... | |
virtual int | getAxisCount (void) const override |
returns the number of construction lines (to be used as axes) More... | |
virtual Base::Axis | getAxis (int axId) const override |
retrieves an axis iterating through the construction lines of the sketch (indices start at 0) More... | |
virtual void | acceptGeometry () override |
verify and accept the assigned geometry More... | |
bool | evaluateConstraint (const Constraint *constraint) const |
Check if constraint has invalid indexes. More... | |
bool | evaluateConstraints () const |
Check for constraints with invalid indexes. More... | |
void | validateConstraints () |
Remove constraints with invalid indexes. More... | |
bool | evaluateSupport (void) |
Checks if support is valid. More... | |
void | validateExternalLinks (void) |
validate External Links (remove invalid external links) More... | |
int | getLastDoF () const |
gets DoF of last solver execution More... | |
bool | getLastHasConflicts () const |
gets HasConflicts status of last solver execution More... | |
bool | getLastHasRedundancies () const |
gets HasRedundancies status of last solver execution More... | |
bool | getLastHasPartialRedundancies () const |
gets HasRedundancies status of last solver execution More... | |
bool | getLastHasMalformedConstraints () const |
gets HasMalformedConstraints status of last solver execution More... | |
int | getLastSolverStatus () const |
gets solver status of last solver execution More... | |
float | getLastSolveTime () const |
gets solver SolveTime of last solver execution More... | |
const std::vector< int > & | getLastConflicting (void) const |
gets the conflicting constraints of the last solver execution More... | |
const std::vector< int > & | getLastRedundant (void) const |
gets the redundant constraints of last solver execution More... | |
const std::vector< int > & | getLastPartiallyRedundant (void) const |
gets the redundant constraints of last solver execution More... | |
const std::vector< int > & | getLastMalformedConstraints (void) const |
gets the redundant constraints of last solver execution More... | |
const Sketch & | getSolvedSketch (void) const |
gets the solved sketch as a reference More... | |
void | setRecalculateInitialSolutionWhileMovingPoint (bool recalculateInitialSolutionWhileMovingPoint) |
enables/disables solver initial solution recalculation when moving point mode (useful for dragging) More... | |
int | initTemporaryMove (int geoId, PointPos pos, bool fine=true) |
Forwards a request for a temporary initMove to the solver using the current sketch state as a reference (enables dragging) More... | |
int | initTemporaryBSplinePieceMove (int geoId, PointPos pos, const Base::Vector3d &firstPoint, bool fine=true) |
Forwards a request for a temporary initBSplinePieceMove to the solver using the current sketch state as a reference (enables dragging) More... | |
int | moveTemporaryPoint (int geoId, PointPos pos, Base::Vector3d toPoint, bool relative=false) |
Forwards a request for point or curve temporary movement to the solver using the current state as a reference (enables dragging). More... | |
void | updateSolverExtension (int geoId, std::unique_ptr< Part::GeometryExtension > &&ext) |
forwards a request to update an extension of a geometry of the solver to the solver. More... | |
void | getGeometryWithDependentParameters (std::vector< std::pair< int, PointPos > > &geometrymap) |
returns the geometric elements/vertex which the solver detects as having dependent parameters. More... | |
bool | isAllowedOtherBody () const |
Flag to allow external geometry from other bodies than the one this sketch belongs to. More... | |
void | setAllowOtherBody (bool on) |
bool | isAllowedUnaligned () const |
Flag to allow carbon copy from misaligned geometry. More... | |
void | setAllowUnaligned (bool on) |
bool | isExternalAllowed (App::Document *pDoc, App::DocumentObject *pObj, eReasonList *rsn=nullptr) const |
Return true if this object is allowed as external geometry for the sketch. More... | |
bool | isCarbonCopyAllowed (App::Document *pDoc, App::DocumentObject *pObj, bool &xinv, bool &yinv, eReasonList *rsn=nullptr) const |
bool | isPerformingInternalTransaction () const |
bool | seekTrimPoints (int GeoId, const Base::Vector3d &point, int &GeoId1, Base::Vector3d &intersect1, int &GeoId2, Base::Vector3d &intersect2) |
retrieves intersection points of this curve with the closest two curves around a point of this curve. More... | |
int | autoConstraint (double precision=Precision::Confusion() *1000, double angleprecision=M_PI/20, bool includeconstruction=true) |
int | detectMissingPointOnPointConstraints (double precision=Precision::Confusion() *1000, bool includeconstruction=true) |
void | analyseMissingPointOnPointCoincident (double angleprecision=M_PI/8) |
int | detectMissingVerticalHorizontalConstraints (double angleprecision=M_PI/8) |
int | detectMissingEqualityConstraints (double precision) |
std::vector< ConstraintIds > & | getMissingPointOnPointConstraints (void) |
std::vector< ConstraintIds > & | getMissingVerticalHorizontalConstraints (void) |
std::vector< ConstraintIds > & | getMissingLineEqualityConstraints (void) |
std::vector< ConstraintIds > & | getMissingRadiusConstraints (void) |
void | setMissingRadiusConstraints (std::vector< ConstraintIds > &cl) |
void | setMissingLineEqualityConstraints (std::vector< ConstraintIds > &cl) |
void | setMissingVerticalHorizontalConstraints (std::vector< ConstraintIds > &cl) |
void | setMissingPointOnPointConstraints (std::vector< ConstraintIds > &cl) |
void | makeMissingPointOnPointCoincident (bool onebyone=false) |
void | makeMissingVerticalHorizontal (bool onebyone=false) |
void | makeMissingEquality (bool onebyone=true) |
int | autoRemoveRedundants (bool updategeo=true) |
returns the number of redundant constraints detected More... | |
int | renameConstraint (int GeoId, std::string name) |
std::vector< Base::Vector3d > | getOpenVertices (void) const |
int | setGeometryId (int GeoId, long id) |
int | getGeometryId (int GeoId, long &id) const |
static void | appendConflictMsg (const std::vector< int > &conflicting, std::string &msg) |
generates a warning message about constraint conflicts and appends it to the given message More... | |
static void | appendRedundantMsg (const std::vector< int > &redundant, std::string &msg) |
generates a warning message about redundant constraints and appends it to the given message More... | |
static void | appendMalformedConstraintsMsg (const std::vector< int > &malformed, std::string &msg) |
generates a warning message about malformed constraints and appends it to the given message More... | |
virtual void | onChanged (const App::Property *) override |
get called by the container when a property has changed More... | |
virtual void | onDocumentRestored () override |
get called after a document has been fully restored More... | |
virtual void | restoreFinished () override |
This method is used at the end of restoreFromStream() after all data files have been read in. More... | |
virtual void | setExpression (const App::ObjectIdentifier &path, std::shared_ptr< App::Expression > expr) override |
std::string | validateExpression (const App::ObjectIdentifier &path, std::shared_ptr< const App::Expression > expr) |
void | constraintsRenamed (const std::map< App::ObjectIdentifier, App::ObjectIdentifier > &renamed) |
void | constraintsRemoved (const std::set< App::ObjectIdentifier > &removed) |
std::vector< Part::Geometry * > | supportedGeometry (const std::vector< Part::Geometry * > &geoList) const |
Returns a list of supported geometries from the input list. More... | |
void | transferFilletConstraints (int geoId1, PointPos posId1, int geoId2, PointPos posId2) |
Transfer constraints on lines being filleted. More... | |
int | testDrivingChange (int ConstrId, bool isdriving) |
virtual void | onUndoRedoFinished () override |
get called after an undo/redo transaction is finished More... | |
void | migrateSketch (void) |
void | retrieveSolverDiagnostics () |
bool | getBlockedState (const Constraint *cstr, bool &blockedstate) const |
bool | getInternalTypeState (const Constraint *cstr, Sketcher::InternalType::InternalType &internaltypestate) const |
void | synchroniseGeometryState () |
void | addConstraint (Sketcher::ConstraintType constrType, int firstGeoId, Sketcher::PointPos firstPos, int secondGeoId=GeoEnum::GeoUndef, Sketcher::PointPos secondPos=Sketcher::PointPos::none, int thirdGeoId=GeoEnum::GeoUndef, Sketcher::PointPos thirdPos=Sketcher::PointPos::none) |
std::unique_ptr< Constraint > | createConstraint (Sketcher::ConstraintType constrType, int firstGeoId, Sketcher::PointPos firstPos, int secondGeoId=GeoEnum::GeoUndef, Sketcher::PointPos secondPos=Sketcher::PointPos::none, int thirdGeoId=GeoEnum::GeoUndef, Sketcher::PointPos thirdPos=Sketcher::PointPos::none) |
static void | appendConstraintsMsg (const std::vector< int > &vector, const std::string &singularmsg, const std::string &pluralmsg, std::string &msg) |
Additional Inherited Members | |
Public Types inherited from App::GeoFeature | |
enum | ElementNameType { Normal =0 , Import =1 , Export =2 } |
Specify the type of element name to return when calling getElementName() More... | |
Public Types inherited from App::DocumentObject | |
enum | GSReason { GS_DEFAULT , GS_SELECT } |
reason of calling getSubObjects() More... | |
enum | OutListOption { OutListNoExpression = 1 , OutListNoHidden = 2 , OutListNoXLinked = 4 } |
DAG handling This part of the interface deals with viewing the document as a DAG (directed acyclic graph). More... | |
Public Types inherited from App::ExtensionContainer | |
typedef std::map< Base::Type, App::Extension * >::iterator | ExtensionIterator |
Static Public Member Functions inherited from Part::Part2DObject | |
static bool | seekTrimPoints (const std::vector< Geometry * > &geomlist, int geometryIndex, const Base::Vector3d &point, int &geometryIndex1, Base::Vector3d &intersect1, int &geometryIndex2, Base::Vector3d &intersect2) |
calculate the points where a curve with index geometryIndex should be trimmed with respect to the rest of the curves contained in the list geomlist and a picked point. More... | |
Static Public Member Functions inherited from Part::Feature | |
static TopoDS_Shape | getShape (const App::DocumentObject *obj, const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr, App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true) |
Convenience function to extract shape from fully qualified subname. More... | |
static TopoShape | getTopoShape (const App::DocumentObject *obj, const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr, App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true, bool noElementMap=false) |
static void | clearShapeCache () |
static App::DocumentObject * | getShapeOwner (const App::DocumentObject *obj, const char *subname=nullptr) |
static bool | hasShapeOwner (const App::DocumentObject *obj, const char *subname=nullptr) |
Static Public Member Functions inherited from App::GeoFeature | |
static DocumentObject * | resolveElement (App::DocumentObject *obj, const char *subname, std::pair< std::string, std::string > &elementName, bool append=false, ElementNameType type=Normal, const DocumentObject *filter=nullptr, const char **element=nullptr, GeoFeature **geo=nullptr) |
Resolve both the new and old style element name. More... | |
Static Public Member Functions inherited from App::DocumentObject | |
static const char * | hasHiddenMarker (const char *subname) |
Check if the subname reference ends with hidden marker. More... | |
static const std::string & | hiddenMarker () |
Special marker to mark the object as hidden. More... | |
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 Public Attributes inherited from Part::Part2DObject | |
static const int | H_Axis = -1 |
static const int | N_Axis = -3 |
static const int | V_Axis = -2 |
Static Public Attributes inherited from App::DocumentObject | |
static DocumentObjectExecReturn * | StdReturn |
Protected Member Functions inherited from Part::Part2DObject | |
void | handleChangedPropertyType (Base::XMLReader &reader, const char *TypeName, App::Property *prop) override |
PropertyContainer::handleChangedPropertyType is called during restore to possibly fix reading of older versions of the property container. More... | |
void | handleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName) override |
PropertyContainer::handleChangedPropertyName is called during restore to possibly fix reading of older versions of this property container. More... | |
Protected Member Functions inherited from Part::Feature | |
virtual App::DocumentObjectExecReturn * | recompute () override |
recompute only this object More... | |
ShapeHistory | buildHistory (BRepBuilderAPI_MakeShape &, TopAbs_ShapeEnum type, const TopoDS_Shape &newS, const TopoDS_Shape &oldS) |
Build a history of changes MakeShape: The operation that created the changes, e.g. More... | |
ShapeHistory | joinHistory (const ShapeHistory &, const ShapeHistory &) |
Protected Member Functions inherited from App::DocumentObject | |
virtual App::DocumentObjectExecReturn * | execute (void) |
get called by the document to recompute this feature Normally this method get called in the processing of Document::recompute(). More... | |
App::DocumentObjectExecReturn * | executeExtensions () |
Executes the extensions of a document object. More... | |
virtual void | onBeforeChange (const Property *prop) override |
get called before the value is changed More... | |
virtual void | onChanged (const Property *prop) override |
get called by the container when a property was changed More... | |
virtual void | onDocumentRestored () |
get called after a document has been fully restored More... | |
virtual void | onPropertyStatusChanged (const Property &prop, unsigned long oldStatus) override |
get called when a property status has changed More... | |
virtual void | onSettingDocument () |
get called after setting the document More... | |
virtual void | onUndoRedoFinished () |
get called after an undo/redo transaction is finished More... | |
virtual App::DocumentObjectExecReturn * | recompute (void) |
recompute only this object More... | |
void | resetError (void) |
void | setDocument (App::Document *doc) |
void | setError (void) |
virtual void | setupObject () |
get called after a brand new object was created More... | |
virtual void | unsetupObject () |
get called when object is going to be removed from the document More... | |
Protected Member Functions inherited from App::TransactionalObject | |
void | onBeforeChangeProperty (Document *doc, const Property *prop) |
Protected Member Functions inherited from App::PropertyContainer | |
virtual const PropertyData & | getPropertyData (void) const |
virtual void | handleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName) |
PropertyContainer::handleChangedPropertyName is called during restore to possibly fix reading of older versions of this property container. More... | |
virtual void | handleChangedPropertyType (Base::XMLReader &reader, const char *TypeName, Property *prop) |
PropertyContainer::handleChangedPropertyType is called during restore to possibly fix reading of older versions of the property container. More... | |
virtual void | onBeforeChange (const Property *) |
get called before the value is changed More... | |
virtual void | onChanged (const Property *) |
get called by the container when a property has changed More... | |
Protected Member Functions inherited from Part::AttachExtension | |
virtual void | extensionOnChanged (const App::Property *) |
virtual void | extHandleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName) |
App::PropertyPlacement & | getPlacement () const |
Protected Member Functions inherited from App::Extension | |
void | initExtensionType (Base::Type type) |
Static Protected Member Functions inherited from App::PropertyContainer | |
static const PropertyData * | getPropertyDataPtr (void) |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
Static Protected Member Functions inherited from App::Extension | |
static void | initExtensionSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Base::Type::instantiationMethod method=nullptr) |
Protected Attributes inherited from App::DocumentObject | |
std::string | oldLabel |
Old label; used for renaming expressions. More... | |
const std::string * | pcNameInDocument |
Py::SmartPtr | PythonObject |
python object of this class and all descendent More... | |
std::bitset< 32 > | StatusBits |
Status bits of the document object The first 8 bits are used for the base system the rest can be used in descendent classes to mark special statuses on the objects. More... | |
Protected Attributes inherited from App::PropertyContainer | |
DynamicProperty | dynamicProps |
Protected Attributes inherited from App::Extension | |
bool | m_isPythonExtension = false |
Py::SmartPtr | ExtensionPythonObject |
SketchObject::SketchObject | ( | ) |
SketchObject::~SketchObject | ( | ) |
|
overridevirtual |
verify and accept the assigned geometry
Reimplemented from Part::Part2DObject.
References Sketcher::PropertyConstraintList::acceptGeometry(), Constraints, getCompleteGeometry(), and rebuildVertexIndex().
Referenced by addExternal(), delAllExternal(), delExternal(), onChanged(), onUndoRedoFinished(), validateConstraints(), and validateExternalLinks().
int SketchObject::addConstraint | ( | const Constraint * | constraint | ) |
add constraint
References addConstraint(), Sketcher::Constraint::clone(), and draftfunctions.move::move().
Referenced by addConstraint(), fillet(), Sketcher::SketchAnalysis::makeMissingEquality(), Sketcher::SketchAnalysis::makeMissingPointOnPointCoincident(), Sketcher::SketchAnalysis::makeMissingVerticalHorizontal(), transferFilletConstraints(), and trim().
|
protected |
References addConstraint(), createConstraint(), and draftfunctions.move::move().
int SketchObject::addConstraint | ( | std::unique_ptr< Constraint > | constraint | ) |
int SketchObject::addConstraints | ( | const std::vector< Constraint * > & | ConstraintList | ) |
add all constraints in the list
References Sketcher::Constraint::clone(), Constraints, Sketcher::PropertyConstraintList::getSize(), Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), Sketcher::Perpendicular, Sketcher::PropertyConstraintList::setValues(), Sketcher::Tangent, and Sketcher::Constraint::Type.
Referenced by exposeInternalGeometry(), Sketcher::SketchAnalysis::makeMissingEquality(), Sketcher::SketchAnalysis::makeMissingPointOnPointCoincident(), Sketcher::SketchAnalysis::makeMissingVerticalHorizontal(), and split().
int SketchObject::addCopy | ( | const std::vector< int > & | geoIdList, |
const Base::Vector3d & | displacement, | ||
bool | moveonly = false , |
||
bool | clone = false , |
||
int | csize = 2 , |
||
int | rsize = 1 , |
||
bool | constraindisplacement = false , |
||
double | perpscale = 1.0 |
||
) |
with default parameters adds a copy of the geometric elements displaced by the displacement vector.
It creates an array of csize elements in the direction of the displacement vector by rsize elements in the direction perpendicular to the displacement vector, wherein the modulus of this perpendicular vector is scaled by perpscale.
References Sketcher::Angle, Sketcher::Coincident, Base::Console(), Constraints, Sketcher::Constraint::copy(), Part::Geometry::copy(), Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::end, Sketcher::Equal, Base::ConsoleSingleton::Error(), DraftVecUtils::find(), Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Geometry, Part::GeomConic::getCenter(), Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Part::GeomLineSegment::getEndPoint(), Sketcher::GeometryFacade::getFacade(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), getPoint(), Part::GeomPoint::getPoint(), Part::GeomBSplineCurve::getPoles(), Part::PropertyGeometryList::getSize(), Part::GeomBoundedCurve::getStartPoint(), Part::GeomLineSegment::getStartPoint(), Part::GeomArcOfConic::getStartPoint(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::InternalAlignment, Sketcher::Constraint::isDriving, Base::Vector3< _Precision >::Length(), Sketcher::mid, draftfunctions.move::move(), Sketcher::none, Sketcher::Parallel, Sketcher::Perpendicular, Sketcher::Radius, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Part::GeomConic::setCenter(), Part::GeomArcOfConic::setCenter(), Sketcher::GeometryFacade::setConstruction(), Part::GeomPoint::setPoint(), Part::GeomLineSegment::setPoints(), Part::GeomBSplineCurve::setPoles(), Sketcher::Constraint::setValue(), Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), Sketcher::start, Sketcher::Constraint::Third, App::Property::touch(), Sketcher::Constraint::Type, Sketcher::Weight, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
int SketchObject::addCopyOfConstraints | ( | const SketchObject & | orig | ) |
Copy the constraints instead of cloning them and copying the expressions if any.
References Constraints, Sketcher::PropertyConstraintList::createPath(), App::PropertyExpressionEngine::ExpressionInfo::expression, App::DocumentObject::getExpression(), Sketcher::PropertyConstraintList::getSize(), Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), setExpression(), and Sketcher::PropertyConstraintList::setValues().
int SketchObject::addExternal | ( | App::DocumentObject * | Obj, |
const char * | SubName | ||
) |
add an external geometry reference
References acceptGeometry(), Base::Console(), Base::ConsoleSingleton::Error(), ExternalGeometry, App::DocumentObject::getDocument(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), isExternalAllowed(), rebuildExternalGeometry(), and App::PropertyLinkSubList::setValues().
int SketchObject::addGeometry | ( | const Part::Geometry * | geo, |
bool | construction = false |
||
) |
Add geometry to a sketch.
geo | - geometry to add |
construction | - true for construction lines |
int | - GeoId of added element |
References Part::Geometry::copy(), Geometry, Base::Persistence::getClassTypeId(), getInternalGeometry(), Part::PropertyGeometryList::getSize(), Base::Persistence::getTypeId(), draftfunctions.move::move(), Sketcher::GeometryFacade::setConstruction(), and Part::PropertyGeometryList::setValues().
Referenced by decreaseBSplineDegree(), exposeInternalGeometry(), fillet(), split(), and transferFilletConstraints().
int SketchObject::addGeometry | ( | const std::vector< Part::Geometry * > & | geoList, |
bool | construction = false |
||
) |
Add multiple geometry elements to a sketch.
geoList | - geometry to add |
construction | - true for construction lines |
int | - GeoId of last added element |
References Geometry, Base::Persistence::getClassTypeId(), getInternalGeometry(), Part::PropertyGeometryList::getSize(), draftfunctions.move::move(), Sketcher::GeometryFacade::setConstruction(), and Part::PropertyGeometryList::setValues().
int SketchObject::addSymmetric | ( | const std::vector< int > & | geoIdList, |
int | refGeoId, | ||
Sketcher::PointPos | refPosId = Sketcher::PointPos::none |
||
) |
adds symmetric geometric elements with respect to the refGeoId (line or point)
References Sketcher::Angle, Sketcher::Coincident, Base::Console(), Constraints, Sketcher::Constraint::copy(), Part::Geometry::copy(), Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::end, Sketcher::Equal, Base::ConsoleSingleton::Error(), DraftVecUtils::find(), Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Base::fmod(), Geometry, Part::GeomConic::getCenter(), Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Part::GeomBoundedCurve::getEndPoint(), Part::GeomLineSegment::getEndPoint(), Part::GeomArcOfConic::getEndPoint(), Sketcher::GeometryFacade::getFacade(), Part::GeomArcOfParabola::getFocus(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), Part::GeomEllipse::getMajorAxisDir(), Part::GeomArcOfEllipse::getMajorAxisDir(), Part::GeomArcOfHyperbola::getMajorAxisDir(), Part::GeomEllipse::getMajorRadius(), Part::GeomArcOfEllipse::getMajorRadius(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomEllipse::getMinorRadius(), Part::GeomArcOfEllipse::getMinorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), getPoint(), Part::GeomPoint::getPoint(), Part::GeomBSplineCurve::getPoles(), Part::GeomArcOfEllipse::getRange(), Part::GeomArcOfHyperbola::getRange(), Part::GeomArcOfParabola::getRange(), Part::PropertyGeometryList::getSize(), Part::GeomBoundedCurve::getStartPoint(), Part::GeomLineSegment::getStartPoint(), Part::GeomArcOfConic::getStartPoint(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::Horizontal, Sketcher::InternalAlignment, Sketcher::mid, draftfunctions.move::move(), Sketcher::none, Sketcher::Parallel, Base::Vector3< _Precision >::Perpendicular(), Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Part::GeomConic::setCenter(), Part::GeomArcOfConic::setCenter(), Part::GeomEllipse::setMajorAxisDir(), Part::GeomArcOfEllipse::setMajorAxisDir(), Part::GeomArcOfHyperbola::setMajorAxisDir(), Part::GeomPoint::setPoint(), Part::GeomLineSegment::setPoints(), Part::GeomBSplineCurve::setPoles(), Part::GeomArcOfCircle::setRange(), Part::GeomArcOfEllipse::setRange(), Part::GeomArcOfHyperbola::setRange(), Part::GeomArcOfParabola::setRange(), Sketcher::Constraint::setValue(), Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), Part::GeomArcOfConic::setXAxisDir(), Sketcher::start, Sketcher::Tangent, Sketcher::Constraint::Third, Sketcher::Constraint::ThirdPos, App::Property::touch(), Sketcher::Constraint::Type, Sketcher::Vertical, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
void SketchObject::analyseMissingPointOnPointCoincident | ( | double | angleprecision = M_PI/8 | ) |
|
static |
generates a warning message about constraint conflicts and appends it to the given message
References appendConstraintsMsg().
Referenced by execute().
|
staticprotected |
Referenced by appendConflictMsg(), appendMalformedConstraintsMsg(), and appendRedundantMsg().
|
static |
generates a warning message about malformed constraints and appends it to the given message
References appendConstraintsMsg().
Referenced by execute().
|
static |
generates a warning message about redundant constraints and appends it to the given message
References appendConstraintsMsg().
Referenced by execute().
References getCoincidenceGroups().
Referenced by CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainCoincident::applyConstraint(), SketcherGui::DrawSketchHandlerLineSet::pressButton(), DrawSketchHandlerCoincident::releaseButton(), CmdSketcherConstrainCoincident::substituteConstraintCombinations(), and transferFilletConstraints().
int SketchObject::autoConstraint | ( | double | precision = Precision::Confusion() * 1000 , |
double | angleprecision = M_PI/20 , |
||
bool | includeconstruction = true |
||
) |
References Sketcher::SketchAnalysis::autoconstraint().
returns the number of redundant constraints detected
References delConstraints(), and getLastRedundant().
Referenced by Sketcher::SketchAnalysis::autoconstraint(), Sketcher::SketchAnalysis::makeMissingEquality(), Sketcher::SketchAnalysis::makeMissingPointOnPointCoincident(), and Sketcher::SketchAnalysis::makeMissingVerticalHorizontal().
References Sketcher::Sketch::addGeometry(), Sketcher::Sketch::calculateAngleViaPoint(), and getGeometry().
Referenced by CmdSketcherConstrainAngle::activated(), and CmdSketcherConstrainAngle::applyConstraint().
double SketchObject::calculateConstraintError | ( | int | ConstrId | ) |
References Sketcher::Sketch::addConstraint(), Sketcher::Sketch::addGeometry(), Sketcher::Sketch::calculateConstraintError(), Sketcher::Constraint::clone(), Constraints, Sketcher::Constraint::First, getGeometry(), Sketcher::PropertyConstraintList::getValues(), Sketcher::Constraint::Second, and Sketcher::Constraint::Third.
int SketchObject::carbonCopy | ( | App::DocumentObject * | pObj, |
bool | construction = true |
||
) |
Carbon copy another sketch geometry and constraints.
References Sketcher::Angle, Base::Console(), Constraints, Sketcher::Constraint::copy(), Part::Geometry::copy(), Sketcher::PropertyConstraintList::createPath(), Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Base::ConsoleSingleton::Error(), ExternalGeometry, Sketcher::Constraint::First, Geometry, Base::Persistence::getClassTypeId(), App::DocumentObject::getDocument(), App::ObjectIdentifier::getDocumentObjectName(), getExternalGeometryCount(), getInternalGeometry(), App::PropertyLinkSubList::getSize(), App::ObjectIdentifier::String::getString(), App::PropertyLinkSubList::getSubValues(), Base::Persistence::getTypeId(), App::PropertyLinkSubList::getValues(), Sketcher::PropertyConstraintList::getValues(), isCarbonCopyAllowed(), draftfunctions.move::move(), App::Expression::parse(), Sketcher::Radius, rebuildExternalGeometry(), Sketcher::Constraint::Second, Sketcher::GeometryFacade::setConstruction(), setExpression(), Sketcher::PropertyConstraintList::setValues(), App::PropertyLinkSubList::setValues(), Part::PropertyGeometryList::setValues(), Sketcher::SnellsLaw, Sketcher::Constraint::Third, App::ObjectIdentifier::toString(), App::Property::touch(), and Sketcher::Weight.
changeConstraintsLocking locks or unlocks all tangent and perpendicular constraints.
(Constraint locking prevents it from flipping to another valid configuration, when e.g. external geometry is updated from outside.) The sketch solve is not triggered by the function, but the SketchObject is touched (a recompute will be necessary). The geometry should not be affected by the function. The bLock argument specifies, what to do. If true, all constraints are unlocked and locked again. If false, all tangent and perp. constraints are unlocked.
References Sketcher::Constraint::clone(), Base::Console(), Constraints, Sketcher::PropertyConstraintList::getValues(), Base::ConsoleSingleton::Log(), draftfunctions.move::move(), Sketcher::Perpendicular, Sketcher::PropertyConstraintList::setValues(), and Sketcher::Tangent.
returns whether a given constraint has an associated expression or not
References Constraints, Sketcher::PropertyConstraintList::createPath(), App::PropertyExpressionEngine::ExpressionInfo::expression, and App::DocumentObject::getExpression().
|
protected |
References App::DocumentObject::ExpressionEngine, and App::PropertyExpressionEngine::setValue().
Referenced by SketchObject().
|
protected |
References App::DocumentObject::ExpressionEngine, App::GetApplication(), and App::PropertyExpressionEngine::renameExpressions().
Referenced by SketchObject().
Approximates the given geometry with a B-spline.
GeoId | - the geometry to approximate |
delgeoid | - if true in addition to the unused internal geometry also deletes the GeoId geometry |
bool | - returns true if the approximation succeeded, or false if it did not succeed. |
References Sketcher::Coincident, Base::Console(), Constraints, Base::ConsoleSingleton::Error(), Geometry, Base::Persistence::getClassTypeId(), Part::GeomCurve::getFirstParameter(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), Part::GeomCurve::getLastParameter(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Base::BaseClass::isDerivedFrom(), Part::GeomArcOfConic::isReversed(), Sketcher::mid, draftfunctions.move::move(), Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), Part::GeomCurve::toNurbs(), and App::Property::touch().
|
protected |
Referenced by addConstraint().
Decreases the degree of a BSpline by degreedecrement, which defaults to 1.
GeoId | - the geometry of type bspline to increase the degree |
degreedecrement | - the decrement in number of degrees to effect |
bool | - returns true if the decrease in degree succeeded, or false if it did not succeed. |
References addGeometry(), Base::Console(), delGeometry(), Base::ConsoleSingleton::Error(), exposeInternalGeometry(), Geometry, Base::Persistence::getClassTypeId(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), Base::Persistence::getTypeId(), and Part::PropertyGeometryList::setValues().
int SketchObject::delAllExternal | ( | ) |
deletes all external geometry
References acceptGeometry(), Sketcher::Constraint::clone(), Base::Console(), Constraints, Base::ConsoleSingleton::Error(), ExternalGeometry, App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), rebuildExternalGeometry(), Sketcher::PropertyConstraintList::setValues(), and App::PropertyLinkSubList::setValues().
delete constraint
References Constraints, Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), noRecomputes, Sketcher::PropertyConstraintList::setValues(), and solve().
References Sketcher::Coincident, Constraints, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::end, Sketcher::PropertyConstraintList::getValues(), Sketcher::Horizontal, draftfunctions.move::move(), Sketcher::none, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::PropertyConstraintList::setValues(), Sketcher::start, Sketcher::Symmetric, Sketcher::Tangent, and Sketcher::Vertical.
Referenced by delConstraintOnPoint(), delGeometriesExclusiveList(), delGeometry(), fillet(), transferFilletConstraints(), and trim().
References delConstraintOnPoint(), getGeoVertexIndex(), and Sketcher::start.
deletes a group of constraints at once, if norecomputes is active, the default behaviour is that it will solve the sketch.
If updating the Geometry property as a consequence of a (successful) solve() is not wanted, updategeometry=false, prevents the update. This allows to update the solve status (e.g. dof), without updating the geometry (i.e. make it move to fulfil the constraints).
References Constraints, Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), noRecomputes, Sketcher::PropertyConstraintList::setValues(), and solve().
Referenced by autoRemoveRedundants(), split(), transferFilletConstraints(), and trim().
int SketchObject::delConstraintsToExternal | ( | ) |
Deletes all constraints referencing an external geometry.
References Sketcher::PropertyConstraintList::acceptGeometry(), Constraints, getCompleteGeometry(), Sketcher::PropertyConstraintList::getValuesForce(), draftfunctions.move::move(), noRecomputes, Sketcher::PropertyConstraintList::setValues(), and solve().
Referenced by execute(), PartDesignGui::TaskFeaturePick::makeCopy(), and onChanged().
int SketchObject::deleteAllConstraints | ( | ) |
deletes all the constraints of the sketch
References Constraints, noRecomputes, Sketcher::PropertyConstraintList::setValues(), and solve().
Referenced by Sketcher::SketchAnalysis::autoconstraint().
int SketchObject::deleteAllGeometry | ( | ) |
deletes all the elements/constraints of the sketch except for external geometry
References Constraints, Geometry, noRecomputes, Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), solve(), and App::Property::touch().
Deletes all unused (not further constrained) internal geometry.
GeoId | - the geometry having the internal geometry to delete |
delgeoid | - if true in addition to the unused internal geometry also deletes the GeoId geometry |
int | - returns -1 on error, otherwise the number of deleted elements |
References Sketcher::BSplineControlPoint, Sketcher::BSplineKnotPoint, Constraints, Part::GeomBSplineCurve::countKnots(), Part::GeomBSplineCurve::countPoles(), delGeometriesExclusiveList(), delGeometry(), Sketcher::EllipseFocus1, Sketcher::EllipseFocus2, Sketcher::EllipseMajorDiameter, Sketcher::EllipseMinorDiameter, Sketcher::end, Sketcher::Equal, Base::Persistence::getClassTypeId(), getDirectlyCoincidentPoints(), getGeometry(), getHighestCurveIndex(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::HyperbolaFocus, Sketcher::HyperbolaMajor, Sketcher::HyperbolaMinor, Sketcher::InternalAlignment, Sketcher::mid, Sketcher::ParabolaFocus, and Sketcher::start.
Referenced by delGeometry(), and trim().
delete external ExtGeoId >= 0 with 0 corresponding to the first user defined external geometry
References acceptGeometry(), Sketcher::Constraint::clone(), Base::Console(), Constraints, Base::ConsoleSingleton::Error(), ExternalGeometry, Sketcher::Constraint::First, App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), rebuildExternalGeometry(), Sketcher::Constraint::Second, Sketcher::PropertyConstraintList::setValues(), App::PropertyLinkSubList::setValues(), and Sketcher::Constraint::Third.
Referenced by onChanged().
Does the same as delGeometry but allows to delete several geometries in one step.
References Constraints, delGeometriesExclusiveList(), DraftVecUtils::find(), Sketcher::PropertyConstraintList::getValues(), and Sketcher::InternalAlignment.
Deletes just the GeoIds indicated, it does not look for internal geometry.
References Constraints, delConstraintOnPoint(), Sketcher::end, Sketcher::Constraint::First, Geometry, getDirectlyCoincidentPoints(), getInternalGeometry(), Sketcher::PropertyConstraintList::getValues(), Sketcher::mid, draftfunctions.move::move(), noRecomputes, Sketcher::Constraint::Second, Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), solve(), Sketcher::start, Sketcher::Constraint::Third, App::Property::touch(), and transferConstraints().
Referenced by deleteUnusedInternalGeometry(), delGeometries(), insertBSplineKnot(), and modifyBSplineKnotMultiplicity().
Deletes indicated geometry (by geoid).
GeoId | - the geometry to delete |
deleteinternalgeo | - if true deletes the associated and unconstraint internal geometry, otherwise deletes only the GeoId |
int | - 0 if successful |
References Constraints, delConstraintOnPoint(), deleteUnusedInternalGeometry(), Sketcher::end, Geometry, Base::Persistence::getClassTypeId(), getDirectlyCoincidentPoints(), getGeometry(), getInternalGeometry(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::mid, draftfunctions.move::move(), noRecomputes, Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), solve(), Sketcher::start, App::Property::touch(), and transferConstraints().
Referenced by decreaseBSplineDegree(), deleteUnusedInternalGeometry(), Sketcher::SketchAnalysis::removeDegeneratedGeometries(), split(), and trim().
int SketchObject::detectMissingEqualityConstraints | ( | double | precision | ) |
int SketchObject::detectMissingVerticalHorizontalConstraints | ( | double | angleprecision = M_PI/8 | ) |
int SketchObject::diagnoseAdditionalConstraints | ( | std::vector< Sketcher::Constraint * > | additionalconstraints | ) |
Performs a full analysis of the addition of additional constraints without adding them to the sketch object.
References Constraints, getCompleteGeometry(), getExternalGeometryCount(), Sketcher::PropertyConstraintList::getValues(), retrieveSolverDiagnostics(), and Sketcher::Sketch::setUpSketch().
bool SketchObject::evaluateConstraint | ( | const Constraint * | constraint | ) | const |
Check if constraint has invalid indexes.
References Sketcher::Angle, Sketcher::Coincident, Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::Equal, Sketcher::Constraint::First, getExternalGeometryCount(), getHighestCurveIndex(), Sketcher::Horizontal, Sketcher::Parallel, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::Radius, Sketcher::Constraint::Second, Sketcher::SnellsLaw, Sketcher::Symmetric, Sketcher::Tangent, Sketcher::Constraint::Third, Sketcher::Constraint::Type, Sketcher::Vertical, and Sketcher::Weight.
Referenced by evaluateConstraints(), and validateConstraints().
bool SketchObject::evaluateConstraints | ( | ) | const |
Check for constraints with invalid indexes.
References Constraints, evaluateConstraint(), getCompleteGeometry(), getExternalGeometryCount(), getHighestCurveIndex(), Sketcher::PropertyConstraintList::getValuesForce(), and Sketcher::PropertyConstraintList::scanGeometry().
Referenced by SketcherGui::ViewProviderSketch::setEdit().
bool SketchObject::evaluateSupport | ( | void | ) |
Checks if support is valid.
References Base::Persistence::getClassTypeId(), Base::Persistence::getTypeId(), App::PropertyLinkSubList::getValue(), Base::Type::isDerivedFrom(), and Part::AttachExtension::Support.
|
overridevirtual |
recalculate the Feature (if no recompute is needed see also solve() and solverNeedsUpdate boolean)
Reimplemented from Part::Part2DObject.
References Sketcher::PropertyConstraintList::acceptGeometry(), appendConflictMsg(), appendMalformedConstraintsMsg(), appendRedundantMsg(), Base::Console(), Constraints, delConstraintsToExternal(), Base::ConsoleSingleton::Error(), getCompleteGeometry(), rebuildExternalGeometry(), Part::PropertyPartShape::setValue(), Part::Feature::Shape, solve(), App::DocumentObject::StdReturn, and Sketcher::Sketch::toShape().
Referenced by draftobjects.facebinder.Facebinder::addSubobjects(), PathScripts.PathDressupDogbone.ObjectDressup::boneStateList(), ArchSite.Compass::buildCoordinates(), PathScripts.PathDressupHoldingTags.ObjectTagDressup::generateTags(), ArchPanel.PanelCut::getWires(), ArchSchedule.CommandArchSchedule::IsActive(), Mod.PartDesign.Scripts.DistanceBolt.DistanceBolt::onChanged(), Mod.PartDesign.Scripts.Epitrochoid.Epitrochoid::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.Parallelepiped::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.BoxCylinder::onChanged(), Mod.PartDesign.Scripts.Spring.MySpring::onChanged(), FeaturePython.DistanceBolt::onChanged(), PathScripts.PathStock.StockFromBase::onChanged(), PathScripts.PathStock.StockCreateBox::onChanged(), PathScripts.PathStock.StockCreateCylinder::onChanged(), draftobjects.draftlink.DraftLink::onDocumentRestored(), draftobjects.patharray.PathArray::onDocumentRestored(), and draftobjects.pathtwistedarray.PathTwistedArray::onDocumentRestored().
Exposes all internal geometry of an object supporting internal geometry.
References addConstraints(), addGeometry(), Sketcher::Constraint::AlignmentType, Sketcher::BSplineControlPoint, Sketcher::BSplineKnotPoint, Sketcher::Coincident, Constraints, Part::GeomBSplineCurve::countKnots(), Part::GeomBSplineCurve::countPoles(), Sketcher::EllipseFocus1, Sketcher::EllipseFocus2, Sketcher::EllipseMajorDiameter, Sketcher::EllipseMinorDiameter, Sketcher::end, Sketcher::Equal, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), getDirectlyCoincidentPoints(), Part::GeomArcOfParabola::getFocus(), getGeometry(), getHighestCurveIndex(), Part::GeomBSplineCurve::getKnots(), Part::GeomArcOfEllipse::getMajorAxisDir(), Part::GeomArcOfHyperbola::getMajorAxisDir(), Part::GeomArcOfEllipse::getMajorRadius(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomArcOfEllipse::getMinorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), Part::GeomBSplineCurve::getPoles(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Part::GeomBSplineCurve::getWeights(), Sketcher::HyperbolaFocus, Sketcher::HyperbolaMajor, Sketcher::HyperbolaMinor, Sketcher::InternalAlignment, Sketcher::Constraint::InternalAlignmentIndex, Sketcher::mid, Sketcher::none, Sketcher::ParabolaFocus, Part::GeomCurve::pointAtParameter(), Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Part::GeomConic::setCenter(), Sketcher::GeometryFacade::setConstruction(), Part::GeomPoint::setPoint(), Part::GeomLineSegment::setPoints(), Part::GeomCircle::setRadius(), Sketcher::start, Sketcher::Constraint::Type, Sketcher::Weight, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by decreaseBSplineDegree(), and trim().
extend a curve
References Sketcher::end, Base::Persistence::getClassTypeId(), Part::GeomLineSegment::getEndPoint(), getHighestCurveIndex(), getInternalGeometry(), Part::GeomLineSegment::getStartPoint(), Base::Persistence::getTypeId(), Base::Vector3< _Precision >::Length(), movePoint(), noRecomputes, Base::Vector3< _Precision >::Normalize(), Base::Vector3< _Precision >::Scale(), solve(), and Sketcher::start.
int SketchObject::fillet | ( | int | geoId, |
PointPos | pos, | ||
double | radius, | ||
bool | trim = true , |
||
bool | preserveCorner = false |
||
) |
Create a sketch fillet from the point at the intersection of two lines.
geoId,pos | - one of the (exactly) two coincident endpoints |
radius | - fillet radius |
trim | - if false, leaves the original lines untouched |
createCorner | - keep geoId/pos as a Point and keep as many constraints as possible |
- | 0 on success, -1 on failure |
References fillet(), Base::Persistence::getClassTypeId(), getDirectlyCoincidentPoints(), Part::GeomLineSegment::getEndPoint(), getGeometry(), getHighestCurveIndex(), Part::GeomLineSegment::getStartPoint(), Base::Persistence::getTypeId(), and trim().
Referenced by fillet().
int SketchObject::fillet | ( | int | geoId1, |
int | geoId2, | ||
const Base::Vector3d & | refPnt1, | ||
const Base::Vector3d & | refPnt2, | ||
double | radius, | ||
bool | trim = true , |
||
bool | createCorner = false |
||
) |
More general form of fillet.
geoId1,geoId2 | - geoId for two lines (which don't necessarily have to coincide) |
refPnt1,refPnt2 | - reference points on the input geometry, used to influence the free fillet variables |
radius | - fillet radius |
trim | - if false, leaves the original lines untouched |
preserveCorner | - if the lines are coincident, place a Point where they meet and keep as many of the existing constraints as possible |
- | 0 on success, -1 on failure |
References addConstraint(), addGeometry(), Part::GeomCurve::closestParameter(), Sketcher::Coincident, Base::Console(), Constraints, Part::createFilletGeometry(), Base::Vector3< _Precision >::Cross(), delConstraintOnPoint(), DraftVecUtils::dist(), Base::Vector3< _Precision >::Dot(), Sketcher::end, Part::findFilletCenter(), Sketcher::Constraint::First, Part::GeomCurve::firstDerivativeAtParameter(), Sketcher::Constraint::FirstPos, Sketcher::GeometryFacade::getBlocked(), Base::Persistence::getClassTypeId(), Part::GeomLineSegment::getEndPoint(), Part::GeomCurve::getFirstParameter(), getGeometry(), getHighestCurveIndex(), getPoint(), Part::GeomLineSegment::getStartPoint(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Part::GeomCurve::intersect(), Part::GeomTrimmedCurve::intersectBasisCurves(), Base::BaseClass::isDerivedFrom(), Base::Vector3< _Precision >::Length(), Base::ConsoleSingleton::Log(), draftfunctions.move::move(), movePoint(), Sketcher::none, noRecomputes, Sketcher::Perpendicular, Part::GeomCurve::pointAtParameter(), Base::Vector3< _Precision >::ProjectToLine(), draftutils.translate::QT_TRANSLATE_NOOP, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, solve(), Sketcher::start, Part::GeomCurve::tangent(), Sketcher::Tangent, transferFilletConstraints(), trim(), Sketcher::Constraint::Type, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
get the driving status of this constraint
References Constraints, and Sketcher::PropertyConstraintList::getValues().
const std::map< int, Sketcher::PointPos > SketchObject::getAllCoincidentPoints | ( | int | GeoId, |
PointPos | PosId | ||
) |
References getCoincidenceGroups().
Referenced by SketcherGui::removeRedundantHorizontalVertical().
|
overridevirtual |
retrieves an axis iterating through the construction lines of the sketch (indices start at 0)
Reimplemented from Part::Part2DObject.
References Part::Part2DObject::getAxis(), Base::Persistence::getClassTypeId(), Sketcher::GeometryFacade::getConstruction(), Part::GeomLineSegment::getEndPoint(), getInternalGeometry(), Part::GeomLineSegment::getStartPoint(), Part::Part2DObject::H_Axis, Part::Part2DObject::N_Axis, and Part::Part2DObject::V_Axis.
|
overridevirtual |
returns the number of construction lines (to be used as axes)
Reimplemented from Part::Part2DObject.
References Base::Persistence::getClassTypeId(), Sketcher::GeometryFacade::getConstruction(), and getInternalGeometry().
|
protected |
References Sketcher::Block, and Sketcher::Constraint::Type.
Referenced by synchroniseGeometryState().
const std::vector< std::map< int, Sketcher::PointPos > > SketchObject::getCoincidenceGroups | ( | ) |
References Sketcher::Coincident, Constraints, and Sketcher::PropertyConstraintList::getValues().
Referenced by arePointsCoincident(), getAllCoincidentPoints(), and isCoincidentWithExternalGeometry().
std::vector< Part::Geometry * > SketchObject::getCompleteGeometry | ( | void | ) | const |
retrieves a vector containing both normal and external Geometry (including the sketch axes)
References getInternalGeometry().
Referenced by acceptGeometry(), delConstraintsToExternal(), diagnoseAdditionalConstraints(), evaluateConstraints(), execute(), movePoint(), onChanged(), rebuildVertexIndex(), restoreFinished(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), seekTrimPoints(), setUpSketch(), solve(), trim(), and validateConstraints().
converts a GeoId index into an index of the CompleteGeometry vector
References Geometry, and Part::PropertyGeometryList::getSize().
returns a list of indices of all constraints involving given GeoId
References Constraints, and Sketcher::PropertyConstraintList::getValues().
Referenced by split().
void SketchObject::getDirectlyCoincidentPoints | ( | int | GeoId, |
PointPos | PosId, | ||
std::vector< int > & | GeoIdList, | ||
std::vector< PointPos > & | PosIdList | ||
) |
retrieves for a Vertex number a list with all coincident points (sharing a single coincidence constraint)
References Sketcher::Coincident, Constraints, and Sketcher::PropertyConstraintList::getValues().
Referenced by SketcherGui::FilletSelection::allow(), deleteUnusedInternalGeometry(), delGeometriesExclusiveList(), delGeometry(), exposeInternalGeometry(), fillet(), getDirectlyCoincidentPoints(), and SketcherGui::DrawSketchHandlerFillet::releaseButton().
void SketchObject::getDirectlyCoincidentPoints | ( | int | VertexId, |
std::vector< int > & | GeoIdList, | ||
std::vector< PointPos > & | PosIdList | ||
) |
References getDirectlyCoincidentPoints(), and getGeoVertexIndex().
get the driving status of this constraint
References Constraints, and Sketcher::PropertyConstraintList::getValues().
const std::vector< Part::Geometry * > & Sketcher::SketchObject::getExternalGeometry | ( | void | ) | const |
returns a list of projected external geometries
int Sketcher::SketchObject::getExternalGeometryCount | ( | void | ) | const |
returns the number of external Geometry entities
Referenced by carbonCopy(), diagnoseAdditionalConstraints(), evaluateConstraint(), evaluateConstraints(), getPoint(), isCarbonCopyAllowed(), movePoint(), onChanged(), onUndoRedoFinished(), rebuildVertexIndex(), setUpSketch(), and solve().
References Geometry, and Part::PropertyGeometryList::getSize().
Referenced by seekTrimPoints(), and trim().
GeoListFacade SketchObject::getGeoListFacade | ( | void | ) | const |
const GeometryT * Sketcher::SketchObject::getGeometry | ( | int | GeoId | ) | const |
returns a pointer to a given Geometry index, possible indexes are: id>=0 for user defined geometries, id==-1 for the horizontal sketch axis, id==-2 for the vertical sketch axis id<=-3 for user defined projected external geometries,
References getInternalGeometry().
Referenced by SketcherCopy::activate(), CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadiam::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), addCopy(), addSymmetric(), SketcherGui::ExtendSelection::allow(), SketcherGui::FilletSelection::allow(), SketcherGui::SplittingSelection::allow(), SketcherGui::TrimmingSelection::allow(), Sketcher::SketchAnalysis::analyseMissingPointOnPointCoincident(), CmdSketcherConstrainHorizontal::applyConstraint(), CmdSketcherConstrainVertical::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainDistanceX::applyConstraint(), CmdSketcherConstrainDistanceY::applyConstraint(), CmdSketcherConstrainParallel::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainRadiam::applyConstraint(), CmdSketcherConstrainAngle::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), calculateAngleViaPoint(), calculateConstraintError(), convertToNURBS(), SketcherGui::DrawSketchHandler::createAutoConstraints(), decreaseBSplineDegree(), deleteUnusedInternalGeometry(), delGeometry(), DrawSketchHandlerBSplineInsertKnot::DrawSketchHandlerBSplineInsertKnot(), exposeInternalGeometry(), fillet(), getGeometryFacade(), getPoint(), increaseBSplineDegree(), insertBSplineKnot(), SketcherGui::isBsplineKnotOrEndPoint(), SketcherGui::isBsplinePole(), isPointOnCurve(), migrateSketch(), modifyBSplineKnotMultiplicity(), SketcherGui::ViewProviderSketch::mouseButtonPressed(), DrawSketchHandlerBSplineInsertKnot::mouseMove(), SketcherGui::DrawSketchHandlerExtend::mouseMove(), SketcherGui::ViewProviderSketch::mouseMove(), SketcherGui::DrawSketchHandlerLineSet::pressButton(), SketcherGui::DrawSketchHandlerLineSet::registerPressedKey(), DrawSketchHandlerBSplineInsertKnot::releaseButton(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), SketcherGui::DrawSketchHandlerSplitting::releaseButton(), SketcherGui::DrawSketchHandlerTrimming::releaseButton(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), split(), transferFilletConstraints(), trim(), and SketcherGui::DrawSketchHandlerLineSet::updateTransitionData().
std::unique_ptr< const GeometryFacade > SketchObject::getGeometryFacade | ( | int | GeoId | ) | const |
References Sketcher::GeometryFacade::getFacade(), and getGeometry().
Referenced by SketcherGui::isBsplineKnot(), setConstruction(), toggleConstruction(), and toggleDriving().
void SketchObject::getGeometryWithDependentParameters | ( | std::vector< std::pair< int, PointPos > > & | geometrymap | ) |
returns the geometric elements/vertex which the solver detects as having dependent parameters.
these parameters relate to not fully constraint edges/vertices.
References Sketcher::SolverGeometryExtension::Dependent, Base::BaseClass::getClassTypeId(), getInternalGeometry(), Sketcher::none, Sketcher::SolverGeometryExtension::NotFullyConstraint, and Sketcher::start.
retrieves for a Vertex number the corresponding GeoId and PosId
References Sketcher::none.
Referenced by SketcherCopy::activate(), delConstraintOnPoint(), getDirectlyCoincidentPoints(), SketcherGui::ViewProviderSketch::keyPressed(), SketcherGui::ViewProviderSketch::mouseButtonPressed(), SketcherGui::ViewProviderSketch::mouseMove(), SketcherGui::ViewProviderSketch::onDelete(), SketcherGui::TaskSketcherElements::onSelectionChanged(), SketcherGui::DrawSketchHandlerLineSet::pressButton(), DrawSketchHandlerGenConstraint::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), and SketcherGui::DrawSketchHandler::seekAutoConstraint().
int Sketcher::SketchObject::getHighestCurveIndex | ( | void | ) | const |
Referenced by CmdSketcherConstrainPerpendicular::activated(), addCopy(), addSymmetric(), CmdSketcherConstrainPerpendicular::applyConstraint(), convertToNURBS(), decreaseBSplineDegree(), deleteUnusedInternalGeometry(), evaluateConstraint(), evaluateConstraints(), exposeInternalGeometry(), extend(), fillet(), SketcherGui::DrawSketchHandler::getHighestCurveIndex(), getPoint(), increaseBSplineDegree(), insertBSplineKnot(), SketcherGui::makeTangentToArcOfEllipseviaNewPoint(), SketcherGui::makeTangentToArcOfHyperbolaviaNewPoint(), SketcherGui::makeTangentToArcOfParabolaviaNewPoint(), SketcherGui::makeTangentToEllipseviaNewPoint(), modifyBSplineKnotMultiplicity(), onChanged(), onUndoRedoFinished(), rebuildVertexIndex(), seekTrimPoints(), split(), and trim().
int Sketcher::SketchObject::getHighestVertexIndex | ( | void | ) | const |
Referenced by SketcherGui::DrawSketchHandler::getHighestVertexIndex().
const std::vector< Part::Geometry * > & Sketcher::SketchObject::getInternalGeometry | ( | void | ) | const |
returns a list of all internal geometries
Referenced by addCopy(), addGeometry(), addSymmetric(), carbonCopy(), convertToNURBS(), decreaseBSplineDegree(), delGeometriesExclusiveList(), delGeometry(), Sketcher::SketchAnalysis::detectDegeneratedGeometries(), Sketcher::SketchAnalysis::detectMissingEqualityConstraints(), Sketcher::SketchAnalysis::detectMissingPointOnPointConstraints(), Sketcher::SketchAnalysis::detectMissingVerticalHorizontalConstraints(), extend(), getAxis(), getAxisCount(), getCompleteGeometry(), getGeometry(), getGeometryId(), getGeometryWithDependentParameters(), increaseBSplineDegree(), insertBSplineKnot(), migrateSketch(), modifyBSplineKnotMultiplicity(), DrawSketchHandlerBSplineInsertKnot::releaseButton(), Sketcher::SketchAnalysis::removeDegeneratedGeometries(), setConstruction(), setGeometryId(), synchroniseGeometryState(), toggleConstruction(), and trim().
|
protected |
References Sketcher::Constraint::AlignmentType, Sketcher::BSplineControlPoint, Sketcher::InternalType::BSplineControlPoint, Sketcher::BSplineKnotPoint, Sketcher::InternalType::BSplineKnotPoint, Sketcher::EllipseFocus1, Sketcher::InternalType::EllipseFocus1, Sketcher::EllipseFocus2, Sketcher::InternalType::EllipseFocus2, Sketcher::EllipseMajorDiameter, Sketcher::InternalType::EllipseMajorDiameter, Sketcher::EllipseMinorDiameter, Sketcher::InternalType::EllipseMinorDiameter, Sketcher::HyperbolaFocus, Sketcher::InternalType::HyperbolaFocus, Sketcher::HyperbolaMajor, Sketcher::InternalType::HyperbolaMajor, Sketcher::HyperbolaMinor, Sketcher::InternalType::HyperbolaMinor, Sketcher::InternalAlignment, Sketcher::NumInternalAlignmentType, Sketcher::ParabolaFocus, Sketcher::InternalType::ParabolaFocus, Sketcher::Constraint::Type, and Sketcher::Undef.
Referenced by synchroniseGeometryState().
const std::vector< int > & Sketcher::SketchObject::getLastConflicting | ( | void | ) | const |
gets the conflicting constraints of the last solver execution
int Sketcher::SketchObject::getLastDoF | ( | ) | const |
gets DoF of last solver execution
Referenced by Sketcher::SketchAnalysis::solvesketch(), and SketcherGui::ViewProviderSketch::UpdateSolverInformation().
bool Sketcher::SketchObject::getLastHasConflicts | ( | ) | const |
gets HasConflicts status of last solver execution
Referenced by CmdSketcherConstrainBlock::activated(), Sketcher::SketchAnalysis::solvesketch(), and SketcherGui::ViewProviderSketch::UpdateSolverInformation().
bool Sketcher::SketchObject::getLastHasMalformedConstraints | ( | ) | const |
gets HasMalformedConstraints status of last solver execution
Referenced by SketcherGui::ViewProviderSketch::UpdateSolverInformation().
bool Sketcher::SketchObject::getLastHasPartialRedundancies | ( | ) | const |
gets HasRedundancies status of last solver execution
Referenced by SketcherGui::ViewProviderSketch::UpdateSolverInformation().
bool Sketcher::SketchObject::getLastHasRedundancies | ( | ) | const |
gets HasRedundancies status of last solver execution
Referenced by CmdSketcherConstrainBlock::activated(), Sketcher::SketchAnalysis::solvesketch(), and SketcherGui::ViewProviderSketch::UpdateSolverInformation().
const std::vector< int > & Sketcher::SketchObject::getLastMalformedConstraints | ( | void | ) | const |
gets the redundant constraints of last solver execution
const std::vector< int > & Sketcher::SketchObject::getLastPartiallyRedundant | ( | void | ) | const |
gets the redundant constraints of last solver execution
const std::vector< int > & Sketcher::SketchObject::getLastRedundant | ( | void | ) | const |
gets the redundant constraints of last solver execution
Referenced by autoRemoveRedundants().
int Sketcher::SketchObject::getLastSolverStatus | ( | ) | const |
gets solver status of last solver execution
Referenced by CmdSketcherConstrainBlock::activated().
float Sketcher::SketchObject::getLastSolveTime | ( | ) | const |
gets solver SolveTime of last solver execution
|
overridevirtual |
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?
Reimplemented from App::PropertyContainer.
std::vector< ConstraintIds > & SketchObject::getMissingLineEqualityConstraints | ( | void | ) |
std::vector< ConstraintIds > & SketchObject::getMissingPointOnPointConstraints | ( | void | ) |
std::vector< ConstraintIds > & SketchObject::getMissingRadiusConstraints | ( | void | ) |
std::vector< ConstraintIds > & SketchObject::getMissingVerticalHorizontalConstraints | ( | void | ) |
std::vector< Base::Vector3d > SketchObject::getOpenVertices | ( | void | ) | const |
References Sketcher::SketchAnalysis::getOpenVertices().
Base::Vector3d SketchObject::getPoint | ( | int | GeoId, |
PointPos | PosId | ||
) | const |
retrieves the coordinates of a point
References Sketcher::end, Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Part::GeomBoundedCurve::getEndPoint(), Part::GeomLineSegment::getEndPoint(), Part::GeomArcOfConic::getEndPoint(), getExternalGeometryCount(), getGeometry(), getHighestCurveIndex(), Part::GeomPoint::getPoint(), Part::GeomBoundedCurve::getStartPoint(), Part::GeomLineSegment::getStartPoint(), Part::GeomArcOfConic::getStartPoint(), Base::Persistence::getTypeId(), Part::Part2DObject::H_Axis, Sketcher::mid, Sketcher::start, and Part::Part2DObject::V_Axis.
Referenced by CmdSketcherConstrainLock::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainAngle::activated(), ArchStructure.CommandStructuralSystem::Activated(), addCopy(), PathScripts.PathOpGui.TaskPanelBaseLocationPage::addLocation(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::addNewTag(), addSymmetric(), CmdSketcherConstrainLock::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainDistanceX::applyConstraint(), CmdSketcherConstrainDistanceY::applyConstraint(), CmdSketcherConstrainAngle::applyConstraint(), PathScripts.PathOpGui.TaskPanelBaseLocationPage::editLocation(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::editTag(), fillet(), draftguitools.gui_arcs.Arc_3Points::getPoint(), ArchCurtainWall.CommandArchCurtainWall::getPoint(), ArchTruss.CommandArchTruss::getPoint(), SketcherGui::IsPointAlreadyOnCurve(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::modifyStandardButtons(), PathScripts.PathOpGui.TaskPanelBaseLocationPage::modifyStandardButtons(), split(), transferFilletConstraints(), and trim().
|
overridevirtual |
getPyObject returns the Python binding object
Reimplemented from Part::Feature.
References App::DocumentObject::PythonObject.
const Sketch & Sketcher::SketchObject::getSolvedSketch | ( | void | ) | const |
gets the solved sketch as a reference
Referenced by SketcherGui::TaskSketcherSolverAdvanced::updateDefaultMethodParameters(), SketcherGui::TaskSketcherSolverAdvanced::updateRedundantMethodParameters(), and SketcherGui::TaskSketcherSolverAdvanced::updateSketchObject().
retrieves for a GeoId and PosId the Vertex number
Referenced by SketcherGui::TaskSketcherElements::on_listWidgetElements_itemEntered().
|
overridevirtual |
returns the type name of the ViewProvider
Reimplemented from Part::Part2DObject.
get the driving status of this constraint
References Constraints, and Sketcher::PropertyConstraintList::getValues().
int SketchObject::hasConflicts | ( | void | ) | const |
returns non zero if the sketch contains conflicting constraints
References Sketcher::Sketch::hasConflicts().
Referenced by SketcherGui::EditDatumDialog::exec(), and restoreFinished().
Increases the degree of a BSpline by degreeincrement, which defaults to 1.
GeoId | - the geometry of type bspline to increase the degree |
degreeincrement | - the increment in number of degrees to effect |
bool | - returns true if the increase in degree succeeded, or false if it did not succeed. |
References Base::Console(), Base::ConsoleSingleton::Error(), Geometry, Base::Persistence::getClassTypeId(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), Base::Persistence::getTypeId(), draftfunctions.move::move(), and Part::PropertyGeometryList::setValues().
int Sketcher::SketchObject::initTemporaryBSplinePieceMove | ( | int | geoId, |
PointPos | pos, | ||
const Base::Vector3d & | firstPoint, | ||
bool | fine = true |
||
) |
Forwards a request for a temporary initBSplinePieceMove to the solver using the current sketch state as a reference (enables dragging)
References Sketcher::Sketch::initBSplinePieceMove(), and solve().
Referenced by SketcherGui::ViewProviderSketch::mouseMove().
Forwards a request for a temporary initMove to the solver using the current sketch state as a reference (enables dragging)
References Sketcher::Sketch::initMove(), and solve().
Referenced by SketcherGui::ViewProviderSketch::mouseMove().
Inserts a knot in the BSpline at param
with given multiplicity
. If the knot already exists, its multiplicity is increased by multiplicity
.
GeoId | - the geometry of type bspline to increase the degree |
param | - the parameter value where the knot is to be placed |
multiplicity | - multiplicity of the inserted knot |
bool | - returns true if the operation succeeded, or false if it did not succeed. |
References Sketcher::BSplineControlPoint, Sketcher::BSplineKnotPoint, Part::Geometry::clone(), Sketcher::Constraint::clone(), Base::Console(), Constraints, Part::GeomBSplineCurve::countKnots(), Part::GeomBSplineCurve::countPoles(), delGeometriesExclusiveList(), Base::ConsoleSingleton::Error(), Geometry, Base::Persistence::getClassTypeId(), Part::GeomBSplineCurve::getDegree(), Part::GeomCurve::getFirstParameter(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), Part::GeomBSplineCurve::getKnots(), Part::GeomCurve::getLastParameter(), Part::GeomBSplineCurve::getPoles(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::InternalAlignment, Sketcher::Constraint::InternalAlignmentIndex, draftfunctions.move::move(), draftguitools.gui_annotationstyleeditor::param, draftutils.translate::QT_TRANSLATE_NOOP, Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), and App::Property::touch().
bool Sketcher::SketchObject::isAllowedOtherBody | ( | ) | const |
Flag to allow external geometry from other bodies than the one this sketch belongs to.
bool Sketcher::SketchObject::isAllowedUnaligned | ( | ) | const |
Flag to allow carbon copy from misaligned geometry.
bool SketchObject::isCarbonCopyAllowed | ( | App::Document * | pDoc, |
App::DocumentObject * | pObj, | ||
bool & | xinv, | ||
bool & | yinv, | ||
eReasonList * | rsn = nullptr |
||
) | const |
References Base::Console(), Part::BodyBase::findBodyOf(), Base::Persistence::getClassTypeId(), App::DocumentObject::getDocument(), getExternalGeometryCount(), App::Part::getPartOfObject(), Base::Placement::getPosition(), Base::Placement::getRotation(), Base::Persistence::getTypeId(), App::PropertyPlacement::getValue(), Base::Rotation::multVec(), App::GeoFeature::Placement, rlAllowed, rlAxesMisaligned, rlCircularReference, rlNonParallel, rlNotASketch, rlOriginsMisaligned, rlOtherBody, rlOtherBodyWithLinks, rlOtherDoc, rlOtherPart, App::DocumentObject::testIfLinkDAGCompatible(), and Base::ConsoleSingleton::Warning().
Referenced by SketcherGui::CarbonCopySelection::allow(), and carbonCopy().
void SketchObject::isCoincidentWithExternalGeometry | ( | int | GeoId, |
bool & | start_external, | ||
bool & | mid_external, | ||
bool & | end_external | ||
) |
References Sketcher::end, getCoincidenceGroups(), Sketcher::mid, and Sketcher::start.
bool SketchObject::isExternalAllowed | ( | App::Document * | pDoc, |
App::DocumentObject * | pObj, | ||
eReasonList * | rsn = nullptr |
||
) | const |
Return true if this object is allowed as external geometry for the sketch.
rsn argument receives the reason for disallowing.
References Base::Console(), Part::BodyBase::findBodyOf(), App::DocumentObject::getDocument(), App::Part::getPartOfObject(), rlAllowed, rlCircularReference, rlOtherBody, rlOtherDoc, rlOtherPart, App::DocumentObject::testIfLinkDAGCompatible(), and Base::ConsoleSingleton::Warning().
Referenced by addExternal(), and SketcherGui::ExternalSelection::allow().
bool Sketcher::SketchObject::isPerformingInternalTransaction | ( | ) | const |
References Sketcher::Sketch::addGeometry(), Sketcher::Sketch::addPoint(), Sketcher::Sketch::addPointOnObjectConstraint(), Sketcher::Sketch::calculateConstraintError(), getGeometry(), Sketcher::Sketch::getSolverPrecision(), Sketcher::start, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by SketcherGui::IsPointAlreadyOnCurve().
bool SketchObject::isSupportedGeometry | ( | const Part::Geometry * | geo | ) | const |
Returns true if the sketcher supports the given geometry.
geo | - the geometry |
bool | - true if the geometry is supported |
References Base::Persistence::getClassTypeId(), Base::Persistence::getTypeId(), and trim().
Referenced by supportedGeometry().
void SketchObject::makeMissingEquality | ( | bool | onebyone = true | ) |
References Sketcher::SketchAnalysis::makeMissingEquality().
void SketchObject::makeMissingPointOnPointCoincident | ( | bool | onebyone = false | ) |
void SketchObject::makeMissingVerticalHorizontal | ( | bool | onebyone = false | ) |
|
protected |
References Sketcher::BSplineControlPoint, Constraints, Part::GeometryMigrationExtension::Construction, Sketcher::Diameter, Geometry, Base::BaseClass::getClassTypeId(), Base::Persistence::getClassTypeId(), Sketcher::GeometryFacade::getFacade(), getGeometry(), getInternalGeometry(), Part::PropertyGeometryList::getValues(), Sketcher::PropertyConstraintList::getValues(), Part::GeomBSplineCurve::getWeights(), Sketcher::InternalAlignment, Sketcher::Radius, Sketcher::GeometryFacade::setConstruction(), and Sketcher::Weight.
Referenced by restoreFinished().
bool SketchObject::modifyBSplineKnotMultiplicity | ( | int | GeoId, |
int | knotIndex, | ||
int | multiplicityincr = 1 |
||
) |
Increases or Decreases the multiplicity of a BSpline knot by the multiplicityincr param, which defaults to 1, if the result is multiplicity zero, the knot is removed.
GeoId | - the geometry of type bspline to increase the degree |
knotIndex | - the index of the knot to modify (note that index is OCC consistent, so 1<=knotindex<=knots) |
multiplicityincr | - the increment (positive value) or decrement (negative value) of multiplicity of the knot |
bool | - returns true if the operation succeeded, or false if it did not succeed. |
References Sketcher::BSplineControlPoint, Sketcher::BSplineKnotPoint, Part::Geometry::clone(), Sketcher::Constraint::clone(), Base::Console(), Constraints, Part::GeomBSplineCurve::countKnots(), Part::GeomBSplineCurve::countPoles(), delGeometriesExclusiveList(), Base::ConsoleSingleton::Error(), Geometry, Base::Persistence::getClassTypeId(), Part::GeomBSplineCurve::getDegree(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), Part::GeomBSplineCurve::getKnots(), Part::GeomBSplineCurve::getMultiplicity(), Part::GeomBSplineCurve::getPoles(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::InternalAlignment, Sketcher::Constraint::InternalAlignmentIndex, draftfunctions.move::move(), draftutils.translate::QT_TRANSLATE_NOOP, Sketcher::PropertyConstraintList::setValues(), Part::PropertyGeometryList::setValues(), and App::Property::touch().
int SketchObject::moveDatumsToEnd | ( | void | ) |
Move Dimensional constraints at the end of the properties array.
References Constraints, Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), noRecomputes, Sketcher::PropertyConstraintList::setValues(), and solve().
int SketchObject::movePoint | ( | int | GeoId, |
PointPos | PosId, | ||
const Base::Vector3d & | toPoint, | ||
bool | relative = false , |
||
bool | updateGeoBeforeMoving = false |
||
) |
move this point to a new location and solve
References Constraints, Sketcher::Sketch::extractGeometry(), Geometry, getCompleteGeometry(), getExternalGeometryCount(), Sketcher::PropertyConstraintList::getValues(), Sketcher::Sketch::movePoint(), Sketcher::Sketch::resetInitMove(), retrieveSolverDiagnostics(), Sketcher::Sketch::setUpSketch(), and Part::PropertyGeometryList::setValues().
Referenced by extend(), fillet(), and SketcherGui::ViewProviderSketch::keyPressed().
int Sketcher::SketchObject::moveTemporaryPoint | ( | int | geoId, |
PointPos | pos, | ||
Base::Vector3d | toPoint, | ||
bool | relative = false |
||
) |
Forwards a request for point or curve temporary movement to the solver using the current state as a reference (enables dragging).
NOTE: A temporary move operation must always be preceded by a initTemporaryMove() operation.
References Sketcher::Sketch::movePoint().
|
overridevirtual |
mustExecute We call this method to check if the object was modified to be invoked.
If the object label or an argument is modified. If we must recompute the object - to call the method execute(). 0: no recomputation is needed 1: recomputation needed
Reimplemented from Part::Feature.
References Constraints, ExternalGeometry, Geometry, and App::Property::isTouched().
|
overrideprotectedvirtual |
get called by the container when a property has changed
Reimplemented from Part::Feature.
References acceptGeometry(), Sketcher::PropertyConstraintList::checkConstraintIndices(), Sketcher::PropertyConstraintList::checkGeometry(), Base::Console(), Constraints, delConstraintsToExternal(), delExternal(), Base::ConsoleSingleton::Error(), ExternalGeometry, Geometry, getCompleteGeometry(), App::DocumentObject::getDocument(), getExternalGeometryCount(), getHighestCurveIndex(), App::PropertyLinkSubList::getSize(), Part::PropertyGeometryList::getValues(), App::DocumentObject::isRestoring(), Part::Feature::onChanged(), App::PendingTransactionUpdate, App::DocumentObject::setStatus(), Part::PropertyGeometryList::setValues(), Part::AttachExtension::Support, and supportedGeometry().
Referenced by ArchStructure.CommandStructuralSystem::Activated(), draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), ArchBuildingPart.ViewProviderBuildingPart::updateData(), ArchPanel.ViewProviderPanelCut::updateData(), ArchPanel.ViewProviderPanelSheet::updateData(), draftviewproviders.view_label.ViewProviderLabel::updateData(), draftviewproviders.view_layer.ViewProviderLayer::updateData(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy::updateData().
|
overrideprotectedvirtual |
get called after a document has been fully restored
Reimplemented from App::DocumentObject.
References App::DocumentObject::onDocumentRestored(), and restoreFinished().
|
overrideprotectedvirtual |
get called after an undo/redo transaction is finished
Reimplemented from App::DocumentObject.
References acceptGeometry(), Sketcher::PropertyConstraintList::checkConstraintIndices(), Constraints, getExternalGeometryCount(), getHighestCurveIndex(), solve(), and synchroniseGeometryState().
porting functions
SketchObject::port_reversedExternalArcs finds constraints that link to endpoints of external-geometry arcs, and swaps the endpoints in the constraints. This is needed after CCW emulation was introduced, to port old sketches.
justAnalyze | if true, nothing is actually done - only the number of constraints to be affected is returned. |
References Sketcher::Constraint::clone(), Base::Console(), Constraints, Sketcher::end, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Base::Persistence::getClassTypeId(), Sketcher::PropertyConstraintList::getValues(), Part::GeomArcOfConic::isReversed(), Base::ConsoleSingleton::Log(), draftfunctions.move::move(), Sketcher::none, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::PropertyConstraintList::setValues(), Sketcher::start, Sketcher::Constraint::Third, and Sketcher::Constraint::ThirdPos.
void SketchObject::rebuildExternalGeometry | ( | void | ) |
rebuilds external geometry (projection onto the sketch plane)
References Base::Distance(), ExternalGeometry, Base::Persistence::getClassTypeId(), Base::Placement::getPosition(), Base::Placement::getRotation(), Part::Datum::getShape(), Part::PropertyPartShape::getShape(), Part::TopoShape::getSubShape(), App::PropertyLinkSubList::getSubValues(), Base::Persistence::getTypeId(), App::PropertyPlacement::getValue(), App::PropertyLinkSubList::getValues(), Base::Placement::inverse(), Base::Type::isDerivedFrom(), Base::Placement::multVec(), Base::Rotation::multVec(), App::GeoFeature::Placement, rebuildVertexIndex(), Part::GeomConic::setAngleXU(), Part::GeomConic::setCenter(), Sketcher::GeometryFacade::setConstruction(), Part::GeomParabola::setFocal(), Part::GeomArcOfCircle::setHandle(), Part::GeomArcOfEllipse::setHandle(), Part::GeomArcOfHyperbola::setHandle(), Part::GeomArcOfParabola::setHandle(), Part::GeomHyperbola::setMajorRadius(), Part::GeomHyperbola::setMinorRadius(), Part::GeomLineSegment::setPoints(), Part::GeomCircle::setRadius(), Part::Feature::Shape, Base::Placement::toMatrix(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by addExternal(), carbonCopy(), delAllExternal(), delExternal(), execute(), restoreFinished(), and validateExternalLinks().
void SketchObject::rebuildVertexIndex | ( | void | ) |
References Sketcher::end, Base::Persistence::getClassTypeId(), getCompleteGeometry(), getExternalGeometryCount(), getHighestCurveIndex(), Sketcher::mid, and Sketcher::start.
Referenced by acceptGeometry(), and rebuildExternalGeometry().
References draftmake.make_clone::clone, Constraints, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::PropertyConstraintList::getValues(), Sketcher::Horizontal, draftfunctions.move::move(), Sketcher::none, Sketcher::Parallel, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::PropertyConstraintList::setValues(), Sketcher::Symmetric, and Sketcher::Vertical.
|
overridevirtual |
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:
Reimplemented from Part::Part2DObject.
References Part::Part2DObject::Restore().
|
overrideprotectedvirtual |
This method is used at the end of restoreFromStream() after all data files have been read in.
A subclass can set up some internals. The default implementation does nothing.
Reimplemented from Base::Persistence.
References Sketcher::PropertyConstraintList::acceptGeometry(), Constraints, getCompleteGeometry(), Part::PropertyPartShape::getValue(), hasConflicts(), migrateSketch(), rebuildExternalGeometry(), Part::PropertyPartShape::setValue(), Part::Feature::Shape, solve(), synchroniseGeometryState(), Sketcher::Sketch::toShape(), and validateExternalLinks().
Referenced by onDocumentRestored().
|
protected |
References Sketcher::Sketch::getConflicting(), Sketcher::Sketch::getMalformedConstraints(), Sketcher::Sketch::getPartiallyRedundant(), Sketcher::Sketch::getRedundant(), Sketcher::Sketch::hasConflicts(), Sketcher::Sketch::hasMalformedConstraints(), Sketcher::Sketch::hasPartialRedundancies(), and Sketcher::Sketch::hasRedundancies().
Referenced by diagnoseAdditionalConstraints(), movePoint(), setUpSketch(), and solve().
|
overridevirtual |
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.
Reimplemented from App::DocumentObject.
References App::DocumentObject::Save().
bool SketchObject::seekTrimPoints | ( | int | GeoId, |
const Base::Vector3d & | point, | ||
int & | GeoId1, | ||
Base::Vector3d & | intersect1, | ||
int & | GeoId2, | ||
Base::Vector3d & | intersect2 | ||
) |
retrieves intersection points of this curve with the closest two curves around a point of this curve.
References getCompleteGeometry(), getGeoIdFromCompleteGeometryIndex(), and getHighestCurveIndex().
Referenced by trim().
set the driving status of this constraint and solve
References Sketcher::Constraint::clone(), Constraints, Sketcher::PropertyConstraintList::getValues(), Sketcher::Constraint::isActive, draftfunctions.move::move(), noRecomputes, Sketcher::PropertyConstraintList::setValues(), and solve().
void Sketcher::SketchObject::setAllowOtherBody | ( | bool | on | ) |
Referenced by SketcherGui::CarbonCopySelection::allow().
void Sketcher::SketchObject::setAllowUnaligned | ( | bool | on | ) |
Referenced by SketcherGui::CarbonCopySelection::allow().
set the datum of a Distance or Angle constraint and solve
References Constraints, Sketcher::Diameter, Sketcher::Distance, Sketcher::PropertyConstraintList::getValues(), Sketcher::PropertyConstraintList::hasInvalidGeometry(), draftfunctions.move::move(), Sketcher::Perpendicular, Sketcher::Radius, Sketcher::PropertyConstraintList::setValues(), solve(), Sketcher::Tangent, and Sketcher::Weight.
Make all dimensionals Driving/non-Driving.
References Constraints, Sketcher::PropertyConstraintList::createPath(), Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), noRecomputes, setExpression(), Sketcher::PropertyConstraintList::setValues(), solve(), and testDrivingChange().
set the driving status of this constraint and solve
References Constraints, Sketcher::PropertyConstraintList::createPath(), Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), noRecomputes, setExpression(), Sketcher::PropertyConstraintList::setValues(), solve(), and testDrivingChange().
|
overrideprotectedvirtual |
Reimplemented from App::DocumentObject.
References App::PropertyExpressionEngine::execute(), App::DocumentObject::ExpressionEngine, App::Property::getFullName(), noRecomputes, and solve().
Referenced by addCopyOfConstraints(), carbonCopy(), setDatumsDriving(), setDriving(), and toggleDriving().
void SketchObject::setMissingLineEqualityConstraints | ( | std::vector< ConstraintIds > & | cl | ) |
void SketchObject::setMissingPointOnPointConstraints | ( | std::vector< ConstraintIds > & | cl | ) |
void SketchObject::setMissingRadiusConstraints | ( | std::vector< ConstraintIds > & | cl | ) |
void SketchObject::setMissingVerticalHorizontalConstraints | ( | std::vector< ConstraintIds > & | cl | ) |
void Sketcher::SketchObject::setRecalculateInitialSolutionWhileMovingPoint | ( | bool | recalculateInitialSolutionWhileMovingPoint | ) |
enables/disables solver initial solution recalculation when moving point mode (useful for dragging)
Referenced by SketcherGui::ViewProviderSketch::setEdit().
int SketchObject::setUpSketch | ( | ) |
sets the geometry of sketchObject as the solvedsketch geometry returns the DoF of such a geometry.
References Constraints, getCompleteGeometry(), getExternalGeometryCount(), Sketcher::PropertyConstraintList::getValues(), retrieveSolverDiagnostics(), Sketcher::Sketch::setUpSketch(), and App::Property::touch().
Referenced by Sketcher::SketchAnalysis::solvesketch().
set the driving status of this constraint and solve
References Sketcher::Constraint::clone(), Constraints, Sketcher::PropertyConstraintList::getValues(), Sketcher::Constraint::isInVirtualSpace, draftfunctions.move::move(), and Sketcher::PropertyConstraintList::setValues().
set the driving status of a group of constraints at once
References Sketcher::Constraint::clone(), Constraints, Sketcher::PropertyConstraintList::getValues(), Sketcher::Constraint::isInVirtualSpace, draftfunctions.move::move(), and Sketcher::PropertyConstraintList::setValues().
solves the sketch and updates the geometry, but not all the dependent features (does not recompute) When a recompute is necessary, recompute triggers execute() which solves the sketch and updates all dependent features When a solve only is necessary (e.g.
DoF changed), solve() solves the sketch and updates the geometry (if updateGeoAfterSolving==true), but does not trigger any recompute.
References Base::Console(), Constraints, Base::ConsoleSingleton::Error(), Sketcher::Sketch::extractGeometry(), GCS::Failed, FullyConstrained, Geometry, getCompleteGeometry(), getExternalGeometryCount(), App::DocumentObject::getNameInDocument(), Sketcher::Sketch::getSolveTime(), Sketcher::PropertyConstraintList::getValues(), Sketcher::Sketch::resetInitMove(), retrieveSolverDiagnostics(), Sketcher::Sketch::setUpSketch(), App::PropertyBool::setValue(), Part::PropertyGeometryList::setValues(), Sketcher::Sketch::solve(), App::Property::touch(), and Base::ConsoleSingleton::Warning().
Referenced by delConstraint(), delConstraints(), delConstraintsToExternal(), deleteAllConstraints(), deleteAllGeometry(), delGeometriesExclusiveList(), delGeometry(), execute(), extend(), fillet(), initTemporaryBSplinePieceMove(), initTemporaryMove(), moveDatumsToEnd(), SketcherGui::ViewProviderSketch::onDelete(), onUndoRedoFinished(), femsolver.run.Machine::reset(), restoreFinished(), setActive(), setDatum(), setDatumsDriving(), setDriving(), SketcherGui::ViewProviderSketch::setEdit(), setExpression(), Sketcher::SketchAnalysis::solvesketch(), split(), CmdSketcherConstrainTangent::substituteConstraintCombinations(), CmdSketcherConstrainCoincident::substituteConstraintCombinations(), toggleActive(), toggleDriving(), trim(), and validateExternalLinks().
int SketchObject::split | ( | int | geoId, |
const Base::Vector3d & | point | ||
) |
split a curve
References addConstraints(), addGeometry(), Sketcher::Coincident, Constraints, Part::GeomLineSegment::copy(), Sketcher::Constraint::copy(), delConstraints(), delGeometry(), Sketcher::Diameter, DraftVecUtils::dist(), Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::end, Sketcher::Equal, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Base::Persistence::getClassTypeId(), getConstraintIndices(), Sketcher::GeometryFacade::getConstruction(), Part::GeomLineSegment::getEndPoint(), getGeometry(), getHighestCurveIndex(), Part::Feature::getLocation(), getPoint(), Part::GeomLineSegment::getStartPoint(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::Horizontal, Base::BaseClass::isDerivedFrom(), Sketcher::mid, Sketcher::none, noRecomputes, Sketcher::Parallel, Base::Vector3< _Precision >::Perpendicular(), Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::Radius, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, setConstruction(), Part::GeomLineSegment::setPoints(), Part::GeomArcOfCircle::setRange(), solve(), Sketcher::start, Sketcher::Constraint::substituteIndex(), Sketcher::Tangent, transferConstraints(), Sketcher::Constraint::Type, Sketcher::Vertical, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
|
protected |
Returns a list of supported geometries from the input list.
geoList | - the geometry list |
list | - the supported geometry list |
References isSupportedGeometry().
Referenced by onChanged().
|
protected |
References Constraints, and Sketcher::PropertyConstraintList::getValues().
Referenced by setDatumsDriving(), setDriving(), and toggleDriving().
toggle the driving status of this constraint
References Sketcher::Constraint::clone(), Constraints, Sketcher::PropertyConstraintList::getValues(), Sketcher::Constraint::isActive, draftfunctions.move::move(), noRecomputes, Sketcher::PropertyConstraintList::setValues(), and solve().
toggle geometry to draft line
References draftmake.make_clone::clone, Geometry, Sketcher::GeometryFacade::getFacade(), getGeometryFacade(), getInternalGeometry(), draftfunctions.move::move(), and Part::PropertyGeometryList::set1Value().
toggle the driving status of this constraint
References Sketcher::Constraint::clone(), Constraints, Sketcher::PropertyConstraintList::createPath(), Base::Persistence::getClassTypeId(), getGeometryFacade(), Sketcher::PropertyConstraintList::getValues(), Sketcher::Constraint::isDriving, draftfunctions.move::move(), noRecomputes, setExpression(), Sketcher::PropertyConstraintList::setValues(), solve(), and testDrivingChange().
toggle the driving status of this constraint
References Sketcher::Constraint::clone(), Constraints, Sketcher::PropertyConstraintList::getValues(), Sketcher::Constraint::isInVirtualSpace, draftfunctions.move::move(), and Sketcher::PropertyConstraintList::setValues().
int SketchObject::transferConstraints | ( | int | fromGeoId, |
PointPos | fromPosId, | ||
int | toGeoId, | ||
PointPos | toPosId, | ||
bool | doNotTransformTangencies = false |
||
) |
transfers all constraints of a point to a new point
References Sketcher::Angle, draftmake.make_clone::clone, Sketcher::Coincident, Constraints, Sketcher::PropertyConstraintList::getValues(), draftfunctions.move::move(), Sketcher::Perpendicular, Sketcher::PropertyConstraintList::setValues(), and Sketcher::Tangent.
Referenced by delGeometriesExclusiveList(), delGeometry(), split(), and trim().
|
protected |
Transfer constraints on lines being filleted.
Since filleting moves the endpoints of the input geometry, existing constraints may no longer be sensible. If fillet() was called with preserveCorner=false, the constraints are simply deleted. But if the lines are coincident and preserveCorner=true, we can preserve most constraints on the old end points by moving them to the preserved corner, or transforming distance constraints on straight lines into point-to-point distance constraints.
geoId1,podId1,geoId2,posId2 | - The two lines that have just been filleted |
References addConstraint(), addGeometry(), arePointsCoincident(), Sketcher::Coincident, Constraints, delConstraintOnPoint(), delConstraints(), Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::end, Sketcher::Equal, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Base::Persistence::getClassTypeId(), getGeometry(), getPoint(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Sketcher::Horizontal, draftfunctions.move::move(), Sketcher::none, Sketcher::PointOnObject, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::PropertyConstraintList::setValues(), Sketcher::SnellsLaw, Sketcher::start, Sketcher::Symmetric, Sketcher::Constraint::Type, and Sketcher::Vertical.
Referenced by fillet().
int SketchObject::trim | ( | int | geoId, |
const Base::Vector3d & | point | ||
) |
trim a curve
References addConstraint(), draftmake.make_clone::clone, Part::Geometry::clone(), Part::GeomCurve::closestParameter(), Sketcher::Coincident, Base::Console(), Constraints, delConstraintOnPoint(), delConstraints(), deleteUnusedInternalGeometry(), delGeometry(), Sketcher::end, Sketcher::Equal, exposeInternalGeometry(), Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Geometry, Base::Persistence::getClassTypeId(), getCompleteGeometry(), Part::GeomCurve::getFirstParameter(), getGeoIdFromCompleteGeometryIndex(), getGeometry(), getHighestCurveIndex(), getInternalGeometry(), getPoint(), Part::GeomTrimmedCurve::getRange(), Part::Geometry::getTag(), Base::Persistence::getTypeId(), Sketcher::PropertyConstraintList::getValues(), Base::BaseClass::isDerivedFrom(), Sketcher::GeometryFacade::isInternalType(), Base::ConsoleSingleton::Log(), Sketcher::mid, draftfunctions.move::move(), Sketcher::none, noRecomputes, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, seekTrimPoints(), Part::PropertyGeometryList::set1Value(), Part::PropertyGeometryList::setValues(), solve(), Sketcher::start, Sketcher::Tangent, transferConstraints(), and Sketcher::Constraint::Type.
Referenced by fillet(), and isSupportedGeometry().
void Sketcher::SketchObject::updateSolverExtension | ( | int | geoId, |
std::unique_ptr< Part::GeometryExtension > && | ext | ||
) |
forwards a request to update an extension of a geometry of the solver to the solver.
References draftfunctions.move::move().
void SketchObject::validateConstraints | ( | ) |
Remove constraints with invalid indexes.
References acceptGeometry(), Sketcher::PropertyConstraintList::acceptGeometry(), Constraints, evaluateConstraint(), getCompleteGeometry(), Sketcher::PropertyConstraintList::getValuesForce(), draftfunctions.move::move(), Sketcher::PropertyConstraintList::scanGeometry(), and Sketcher::PropertyConstraintList::setValues().
|
protected |
References Constraints, Sketcher::PropertyConstraintList::getConstraint(), and Sketcher::Constraint::isDriving.
Referenced by SketchObject().
void SketchObject::validateExternalLinks | ( | void | ) |
validate External Links (remove invalid external links)
References acceptGeometry(), Sketcher::Constraint::clone(), Constraints, ExternalGeometry, Sketcher::Constraint::First, Base::Persistence::getClassTypeId(), Part::Datum::getShape(), Part::PropertyPartShape::getShape(), Part::TopoShape::getSubShape(), App::PropertyLinkSubList::getSubValues(), Base::Persistence::getTypeId(), App::PropertyLinkSubList::getValues(), Sketcher::PropertyConstraintList::getValues(), Base::Type::isDerivedFrom(), draftfunctions.move::move(), rebuildExternalGeometry(), Sketcher::Constraint::Second, Sketcher::PropertyConstraintList::setValues(), App::PropertyLinkSubList::setValues(), Part::Feature::Shape, solve(), and Sketcher::Constraint::Third.
Referenced by restoreFinished(), and SketcherGui::ViewProviderSketch::setEdit().
Sketcher::PropertyConstraintList Sketcher::SketchObject::Constraints |
Referenced by acceptGeometry(), CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadiam::activated(), CmdSketcherConstrainAngle::activated(), addConstraint(), addConstraints(), addCopy(), addCopyOfConstraints(), addSymmetric(), CmdSketcherConstrainHorizontal::applyConstraint(), CmdSketcherConstrainVertical::applyConstraint(), CmdSketcherConstrainLock::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainDistanceX::applyConstraint(), CmdSketcherConstrainDistanceY::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainRadiam::applyConstraint(), CmdSketcherConstrainAngle::applyConstraint(), SketcherGui::areAllPointsOrSegmentsFixed(), SketcherGui::areBothPointsOrSegmentsFixed(), calculateConstraintError(), carbonCopy(), changeConstraintsLocking(), constraintHasExpression(), ConstraintItem::constraintType(), convertToNURBS(), ConstraintItem::data(), delAllExternal(), delConstraint(), delConstraintOnPoint(), delConstraints(), delConstraintsToExternal(), deleteAllConstraints(), deleteAllGeometry(), deleteUnusedInternalGeometry(), delExternal(), delGeometries(), delGeometriesExclusiveList(), delGeometry(), Sketcher::SketchAnalysis::detectMissingEqualityConstraints(), Sketcher::SketchAnalysis::detectMissingPointOnPointConstraints(), diagnoseAdditionalConstraints(), SketcherGui::EditDatumDialog::EditDatumDialog(), SketcherGui::ViewProviderSketch::editDoubleClicked(), evaluateConstraints(), SketcherGui::EditDatumDialog::exec(), execute(), exposeInternalGeometry(), fillet(), getActive(), getCoincidenceGroups(), getConstraintIndices(), getDirectlyCoincidentPoints(), getDriving(), getVirtualSpace(), insertBSplineKnot(), ConstraintItem::isActive(), ConstraintItem::isDimensional(), ConstraintItem::isDriving(), ConstraintItem::isEnforceable(), ConstraintItem::isInVirtualSpace(), SketcherGui::isPointOrSegmentFixed(), migrateSketch(), modifyBSplineKnotMultiplicity(), moveDatumsToEnd(), movePoint(), mustExecute(), SketcherGui::TaskSketcherConstraints::on_listWidgetConstraints_itemChanged(), onChanged(), SketcherGui::ViewProviderSketch::onDelete(), onUndoRedoFinished(), ExpressionDelegate::paint(), port_reversedExternalArcs(), removeAxesAlignment(), renameConstraint(), restoreFinished(), setActive(), setDatum(), setDatumsDriving(), setDriving(), setUpSketch(), setVirtualSpace(), solve(), split(), CmdSketcherConstrainTangent::substituteConstraintCombinations(), CmdSketcherConstrainPointOnObject::substituteConstraintCombinations(), CmdSketcherConstrainCoincident::substituteConstraintCombinations(), SketcherGui::ConstraintView::swapNamedOfSelectedItems(), synchroniseGeometryState(), testDrivingChange(), toggleActive(), toggleDriving(), toggleVirtualSpace(), transferConstraints(), transferFilletConstraints(), trim(), validateConstraints(), validateExpression(), and validateExternalLinks().
App::PropertyLinkSubList Sketcher::SketchObject::ExternalGeometry |
Referenced by addExternal(), carbonCopy(), delAllExternal(), delExternal(), mustExecute(), onChanged(), rebuildExternalGeometry(), and validateExternalLinks().
App::PropertyBool Sketcher::SketchObject::FullyConstrained |
Referenced by solve().
Part::PropertyGeometryList Sketcher::SketchObject::Geometry |
Property.
The Geometry list contains the non-external Part::Geometry objects in the sketch. The list may be accessed directly, or indirectly via getInternalGeometry().
Many of the methods in this class take geoId and posId parameters. A GeoId is a unique identifier for geometry in the Sketch. geoId >= 0 means an index in the Geometry list. geoId < 0 refers to sketch axes and external geometry. posId is a PointPos enum, documented in Constraint.h.
Referenced by addCopy(), addGeometry(), addSymmetric(), carbonCopy(), convertToNURBS(), decreaseBSplineDegree(), deleteAllGeometry(), delGeometriesExclusiveList(), delGeometry(), getCompleteGeometryIndex(), getGeoIdFromCompleteGeometryIndex(), getGeoListFacade(), getGeometryId(), increaseBSplineDegree(), insertBSplineKnot(), migrateSketch(), modifyBSplineKnotMultiplicity(), movePoint(), mustExecute(), onChanged(), setConstruction(), setGeometryId(), solve(), toggleConstruction(), and trim().
bool Sketcher::SketchObject::noRecomputes |
SketchObject can work in two modes: Recompute Mode and noRecomputes Mode.
This flag does not regulate whether this object will recompute or not if execute() or a recompute() is actually executed, it just regulates whether the solver is called or not (i.e. whether it relies on the solve of execute for the calculation)
Referenced by delConstraint(), delConstraints(), delConstraintsToExternal(), deleteAllConstraints(), deleteAllGeometry(), delGeometriesExclusiveList(), delGeometry(), extend(), fillet(), moveDatumsToEnd(), setActive(), setDatumsDriving(), setDriving(), setExpression(), split(), SketcherGui::TaskSketcherMessages::TaskSketcherMessages(), toggleActive(), toggleDriving(), and trim().