Base class of all Constraint Objects of the Fem module. More...
#include <FemConstraint.h>
Public Member Functions | |
int calcDrawScaleFactor () const | |
Returns default scale factor of 1. More... | |
int calcDrawScaleFactor (double lparam) const | |
Calculates scale factor based on length of edge. More... | |
int calcDrawScaleFactor (double lvparam, double luparam) const | |
Calculates scale factor based on size of face. More... | |
Constraint () | |
virtual App::DocumentObjectExecReturn * execute () | |
Updates NormalDirection. More... | |
virtual const char * getViewProviderName () const | |
returns the type name of the ViewProvider More... | |
virtual ~Constraint () | |
![]() | |
virtual App::Property * addDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false) override | |
virtual bool adjustRelativeLinks (const std::set< App::DocumentObject * > &inList, std::set< App::DocumentObject * > *visited=0) | |
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 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=0) 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=0, 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=0, Base::Matrix4D *mat=0, 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 * 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=0, std::string *childName=0, const char **subElement=0, PyObject **pyObj=0, Base::Matrix4D *mat=0, 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, boost::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 () | |
![]() | |
TransactionalObject (void) | |
Constructor. More... | |
virtual ~TransactionalObject () | |
![]() | |
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... | |
virtual void Restore (Base::XMLReader &reader) override | |
This method is used to restore properties from an XML document. More... | |
void saveExtensions (Base::Writer &writer) const | |
void restoreExtensions (Base::XMLReader &reader) | |
![]() | |
virtual App::Property * getDynamicPropertyByName (const char *name) const | |
DynamicProperty::PropData getDynamicPropertyData (const Property *prop) const | |
virtual std::vector< std::string > getDynamicPropertyNames () const | |
virtual unsigned int getMemSize (void) const | |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More... | |
const char * getPropertyPrefix () const | |
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... | |
PropertyContainer () | |
A constructor. 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... | |
![]() | |
void dumpToStream (std::ostream &stream, int compression) | |
virtual Base::Type getTypeId (void) const | |
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 SaveDocFile (Writer &) const | |
This method is used to save large amounts of data to a binary file. More... | |
![]() | |
BaseClass () | |
Construction. More... | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
Public Attributes | |
App::PropertyVector NormalDirection | |
Vector pointing into the effective direction of the constraint. More... | |
App::PropertyLinkSubList References | |
List of objects the constraints applies to. More... | |
App::PropertyInteger Scale | |
Supposed to reflect the size of the References. More... | |
![]() | |
PropertyExpressionEngine ExpressionEngine | |
PropertyString Label | |
PropertyString Label2 | |
boost::signals2::signal< void(const App::DocumentObject &, const App::Property &)> signalBeforeChange | |
signal before changing a property of this object More... | |
boost::signals2::signal< void(const App::DocumentObject &, const App::Property &)> signalChanged | |
signal on changed property of this object More... | |
PropertyBool Visibility | |
Allow control visibility status in App name space. More... | |
Protected Member Functions | |
Base::Vector3d getBasePoint (const Base::Vector3d &base, const Base::Vector3d &axis, const App::PropertyLinkSub &location, const double &dist) | |
Calculate point of cylidrical face where to render widget. More... | |
bool getCylinder (double &radius, double &height, Base::Vector3d &base, Base::Vector3d &axis) const | |
Extract properties of cylindrical face. More... | |
const Base::Vector3d getDirection (const App::PropertyLinkSub &direction) | |
Get normal vector of point calculated by getBasePoint. More... | |
bool getPoints (std::vector< Base::Vector3d > &points, std::vector< Base::Vector3d > &normals, int *scale) const | |
Returns data based on References relevant for rendering widgets. More... | |
virtual void onChanged (const App::Property *prop) | |
Updates NormalDirection if References change. More... | |
virtual void onDocumentRestored () | |
Triggers onChanged to update View Provider. More... | |
![]() | |
virtual void onBeforeChange (const Property *prop) override | |
get called before the value is changed 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 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... | |
![]() | |
void onBeforeChangeProperty (Document *doc, const Property *prop) | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
typedef std::map< Base::Type, App::Extension * >::iterator ExtensionIterator | |
![]() | |
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 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 void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static DocumentObjectExecReturn * StdReturn | |
![]() | |
static const PropertyData * getPropertyDataPtr (void) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
![]() | |
std::string oldLabel | |
Old label; used for renaming expressions. More... | |
const std::string * pcNameInDocument | |
Py::Object 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... | |
![]() | |
DynamicProperty dynamicProps | |
Detailed Description
Base class of all Constraint Objects of the Fem module.
Constraint isn't intended to be used directly. Actual Constraints used to specify a simulation are children of this class. The base class essentially does two things: Most importantely it has a property Constraint::References which is a list of all sub objects the constraint applies to. Defining it in the base class exposes a common interface to code using different constraints.
The second purpose of Constraint is to support the redering to the screen done by the View Provider FemGui::ViewProviderFemConstraint. The rendering is decoupled from the objects listed in the References property by using a point cloud a normal vector and a scale factor which is generated by this class. The View Provider doesn't know of the references it just asks Constraint for those values and renders a widget for each point scaled by the scale factor pointing in the direction of the normal vector. These values are exposed by the two properties NormalDirection and Scale and the protected method getPoints(points&, normals&, scale&).
Constructor & Destructor Documentation
◆ Constraint()
Constraint::Constraint | ( | ) |
References App::Global, App::Prop_None, App::Prop_Output, and App::Prop_ReadOnly.
◆ ~Constraint()
|
virtual |
Member Function Documentation
◆ calcDrawScaleFactor() [1/3]
int Constraint::calcDrawScaleFactor | ( | ) | const |
Returns default scale factor of 1.
This is just used to make code more understandable. Other versions (overloads) of this function do useful calculations based on faces or edges. Used by getPoints if no useful shape information is available.
- Returns
- always the integer 1
Referenced by calcDrawScaleFactor(), and getPoints().
◆ calcDrawScaleFactor() [2/3]
int Constraint::calcDrawScaleFactor | ( | double | lparam | ) | const |
Calculates scale factor based on length of edge.
Used to calculate the scale factor returned by getPoints when the scale factor is calculated for a face.
- Note
- This method does a really crazy calculation that I didn't dare to try to understand.
◆ calcDrawScaleFactor() [3/3]
int Constraint::calcDrawScaleFactor | ( | double | lvparam, |
double | luparam | ||
) | const |
Calculates scale factor based on size of face.
Used to calculate the scale factor returned by getPoints when the scale factor is calculated for a edge.
- Note
- This method does a really crazy calculation that I didn't dare to try to understand.
References calcDrawScaleFactor().
◆ execute()
|
virtual |
Updates NormalDirection.
Updates NormalDirection using new References. It does so by calling onChanged once with the References property and once with the Scale property. The second call doesn't do anything.
- Note
- Calling onChanged does touch the Document Object but that flag is cleared right after the execute call by the recompute mechanism. See Document::recompute() and DocumentObject::purgeTouched().
Reimplemented from App::DocumentObject.
Reimplemented in Fem::ConstraintDisplacement, Fem::ConstraintFluidBoundary, Fem::ConstraintContact, Fem::ConstraintPulley, Fem::ConstraintBearing, Fem::ConstraintTemperature, Fem::ConstraintInitialTemperature, Fem::ConstraintHeatflux, Fem::ConstraintTransform, Fem::ConstraintGear, Fem::ConstraintForce, Fem::ConstraintFixed, Fem::ConstraintPlaneRotation, and Fem::ConstraintPressure.
References References, Scale, App::DocumentObject::StdReturn, and App::Property::touch().
Referenced by PathScripts.PathDressupDogbone.ObjectDressup::boneStateList(), ArchSite.Compass::buildCoordinates(), Fem::ConstraintPressure::execute(), Fem::ConstraintPlaneRotation::execute(), Fem::ConstraintFixed::execute(), Fem::ConstraintForce::execute(), Fem::ConstraintHeatflux::execute(), Fem::ConstraintTransform::execute(), Fem::ConstraintInitialTemperature::execute(), Fem::ConstraintBearing::execute(), Fem::ConstraintTemperature::execute(), Fem::ConstraintContact::execute(), Fem::ConstraintFluidBoundary::execute(), Fem::ConstraintDisplacement::execute(), PathScripts.PathDressupHoldingTags.ObjectTagDressup::generateTags(), ArchSchedule.CommandArchSchedule::IsActive(), Mod.PartDesign.Scripts.Spring.MySpring::onChanged(), Mod.PartDesign.Scripts.Epitrochoid.Epitrochoid::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.Parallelepiped::onChanged(), Mod.PartDesign.Scripts.DistanceBolt.DistanceBolt::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.BoxCylinder::onChanged(), PathScripts.PathStock.StockFromBase::onChanged(), PathScripts.PathStock.StockCreateBox::onChanged(), PathScripts.PathStock.StockCreateCylinder::onChanged(), and FeaturePython.DistanceBolt::onChanged().
◆ getBasePoint()
|
protected |
Calculate point of cylidrical face where to render widget.
- Note
- This method is very specific and doesn't require access to member variables. It should be rewritten at a different place.
References DraftVecUtils::dist(), Part::PropertyPartShape::getShape(), Part::TopoShape::getSubShape(), Part::Feature::Shape, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by Fem::ConstraintBearing::onChanged().
◆ getCylinder()
|
protected |
Extract properties of cylindrical face.
- Note
- This method is very specific and doesn't require access to member variables. It should be rewritten at a different place.
References Part::PropertyPartShape::getShape(), Part::TopoShape::getSubShape(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), Part::TopoShape::isNull(), References, and Part::Feature::Shape.
Referenced by Fem::ConstraintTransform::onChanged(), and Fem::ConstraintBearing::onChanged().
◆ getDirection()
|
protected |
Get normal vector of point calculated by getBasePoint.
- Note
- This method is very specific and doesn't require access to member variables. It should be rewritten at a different place.
References Fem::Tools::getDirectionFromShape(), Part::PropertyPartShape::getShape(), App::PropertyLinkSub::getSubValues(), App::PropertyLinkSub::getValue(), and Part::Feature::Shape.
Referenced by Fem::ConstraintForce::onChanged(), Fem::ConstraintGear::onChanged(), and Fem::ConstraintFluidBoundary::onChanged().
◆ getPoints()
|
protected |
Returns data based on References relevant for rendering widgets.
Extracts data from all objects inside References relevant for widget rendering by the View Provider. This includes the points at which widgets shall be drawn, a vector per point indicating the direction the widget should face and a global scale factor for all widgets. Two vectors of equal length are used to return the points and their normal vectors. The normal vector of points[i] can be found with the same index in normals[i].
- Parameters
-
[out] points For each vertex a point equal to the location of that vertex is pushed into the points vector. For each edge at least to points, the beginning and the end of the edge, are pushed into the vector. Depending on the length of the edge more points may be added in between. For each face a number of points depending on the size of the face and the step size calculated internally are pushed into the vector. [out] normals For vertexes and edges normal vectors equal to the NormalDirection are pushed onto the vector. For each point of a face a Base::Vector3d equal to the normal vector of the face at that position is added to the vector. [out] scale The scale contains a scale value for the object in References that was processed last. For calculation various versions of calcDrawScaleFactor are used.
- Returns
- If the calculation of points, normals and scale was successful it returns true. If an error occurred and the data couldn't be extracted properly false is returned.
References calcDrawScaleFactor(), Part::PropertyPartShape::getShape(), Part::TopoShape::getShape(), Part::TopoShape::getSubShape(), App::PropertyLinkSubList::getSubValues(), App::PropertyVector::getValue(), App::PropertyLinkSubList::getValues(), Part::TopoShape::isNull(), NormalDirection, References, and Part::Feature::Shape.
Referenced by Fem::ConstraintPressure::onChanged(), Fem::ConstraintPlaneRotation::onChanged(), Fem::ConstraintFixed::onChanged(), Fem::ConstraintForce::onChanged(), Fem::ConstraintTransform::onChanged(), Fem::ConstraintHeatflux::onChanged(), Fem::ConstraintInitialTemperature::onChanged(), Fem::ConstraintTemperature::onChanged(), Fem::ConstraintContact::onChanged(), Fem::ConstraintFluidBoundary::onChanged(), and Fem::ConstraintDisplacement::onChanged().
◆ getViewProviderName()
|
virtual |
returns the type name of the ViewProvider
Reimplemented from App::DocumentObject.
Reimplemented in Fem::ConstraintDisplacement, Fem::ConstraintFluidBoundary, Fem::ConstraintContact, Fem::ConstraintPulley, Fem::ConstraintBearing, Fem::ConstraintTemperature, Fem::ConstraintInitialTemperature, Fem::ConstraintHeatflux, Fem::ConstraintTransform, Fem::ConstraintGear, Fem::ConstraintForce, Fem::ConstraintFixed, Fem::ConstraintPlaneRotation, and Fem::ConstraintPressure.
◆ onChanged()
|
protectedvirtual |
Updates NormalDirection if References change.
Reimplemented from App::DocumentObject.
Reimplemented in Fem::ConstraintDisplacement, Fem::ConstraintFluidBoundary, Fem::ConstraintPulley, Fem::ConstraintBearing, Fem::ConstraintContact, Fem::ConstraintTemperature, Fem::ConstraintGear, Fem::ConstraintInitialTemperature, Fem::ConstraintForce, Fem::ConstraintHeatflux, Fem::ConstraintTransform, Fem::ConstraintFixed, Fem::ConstraintPlaneRotation, and Fem::ConstraintPressure.
References Part::PropertyPartShape::getShape(), Part::TopoShape::getShape(), Part::TopoShape::getSubShape(), App::PropertyLinkSubList::getSubValues(), App::PropertyLinkSubList::getValues(), NormalDirection, App::DocumentObject::onChanged(), References, App::PropertyVector::setValue(), and Part::Feature::Shape.
Referenced by ArchSite.Compass::buildCoordinates(), ArchAxis.CommandArchGrid::IsActive(), Fem::ConstraintPressure::onChanged(), Fem::ConstraintPlaneRotation::onChanged(), Fem::ConstraintFixed::onChanged(), Fem::ConstraintForce::onChanged(), Fem::ConstraintHeatflux::onChanged(), Fem::ConstraintTransform::onChanged(), Fem::ConstraintInitialTemperature::onChanged(), Fem::ConstraintTemperature::onChanged(), Fem::ConstraintBearing::onChanged(), Fem::ConstraintContact::onChanged(), Fem::ConstraintFluidBoundary::onChanged(), and Fem::ConstraintDisplacement::onChanged().
◆ onDocumentRestored()
|
protectedvirtual |
Triggers onChanged to update View Provider.
- Note
- This should not be necessary and is properly a bug in the View Provider of FemConstraint.
Reimplemented from App::DocumentObject.
References App::DocumentObject::onDocumentRestored(), References, and App::Property::touch().
Member Data Documentation
◆ NormalDirection
App::PropertyVector Fem::Constraint::NormalDirection |
Vector pointing into the effective direction of the constraint.
If References contains only one face of a shape than NormalDirection is the normal vector of that face. If more than one face is referenced that it is the normal vector of the first face. If References is empty or doesn't contain a face the value of NormalDirection is the Z-axis or its previous value.
Referenced by getPoints(), Fem::ConstraintForce::onChanged(), Fem::ConstraintFluidBoundary::onChanged(), onChanged(), FemGui::ViewProviderFemConstraintForce::updateData(), FemGui::ViewProviderFemConstraintFluidBoundary::updateData(), and FemGui::ViewProviderFemConstraintBearing::updateData().
◆ References
App::PropertyLinkSubList Fem::Constraint::References |
List of objects the constraints applies to.
This is a list of subobjects (e.g. Faces, Edges, ...) the constraint applies to. It's only supposed to contain objects of or derived from Part::Feature. Altering this property triggers a update of NormalDirection and Scale.
- Note
- Undefined behaviour if a unsupported (not derived from Part::Feature) Document Object is added to the @References.
Referenced by execute(), getCylinder(), getPoints(), Fem::ConstraintPressure::onChanged(), Fem::ConstraintPlaneRotation::onChanged(), Fem::ConstraintFixed::onChanged(), Fem::ConstraintTransform::onChanged(), Fem::ConstraintForce::onChanged(), Fem::ConstraintHeatflux::onChanged(), Fem::ConstraintInitialTemperature::onChanged(), Fem::ConstraintTemperature::onChanged(), Fem::ConstraintBearing::onChanged(), Fem::ConstraintContact::onChanged(), Fem::ConstraintFluidBoundary::onChanged(), Fem::ConstraintDisplacement::onChanged(), onChanged(), onDocumentRestored(), FemGui::TaskFemConstraint::onReferenceDeleted(), FemGui::TaskFemConstraintBearing::onSelectionChanged(), FemGui::TaskFemConstraintBearing::TaskFemConstraintBearing(), FemGui::TaskFemConstraintContact::TaskFemConstraintContact(), FemGui::TaskFemConstraintDisplacement::TaskFemConstraintDisplacement(), FemGui::TaskFemConstraintFixed::TaskFemConstraintFixed(), FemGui::TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(), FemGui::TaskFemConstraintForce::TaskFemConstraintForce(), FemGui::TaskFemConstraintHeatflux::TaskFemConstraintHeatflux(), FemGui::TaskFemConstraintInitialTemperature::TaskFemConstraintInitialTemperature(), FemGui::TaskFemConstraintPlaneRotation::TaskFemConstraintPlaneRotation(), FemGui::TaskFemConstraintPressure::TaskFemConstraintPressure(), FemGui::TaskFemConstraintTemperature::TaskFemConstraintTemperature(), and FemGui::TaskFemConstraintTransform::TaskFemConstraintTransform().
◆ Scale
App::PropertyInteger Fem::Constraint::Scale |
Supposed to reflect the size of the References.
This property should be a scale factor for the widgets rendered by the View Provider but it's always 1. It isn't updated when References changes.
Referenced by execute(), FemGui::TaskFemConstraint::getScale(), Fem::ConstraintPressure::onChanged(), Fem::ConstraintPlaneRotation::onChanged(), Fem::ConstraintFixed::onChanged(), Fem::ConstraintForce::onChanged(), Fem::ConstraintTransform::onChanged(), Fem::ConstraintHeatflux::onChanged(), Fem::ConstraintInitialTemperature::onChanged(), Fem::ConstraintTemperature::onChanged(), Fem::ConstraintContact::onChanged(), Fem::ConstraintFluidBoundary::onChanged(), Fem::ConstraintDisplacement::onChanged(), FemGui::ViewProviderFemConstraintPressure::updateData(), FemGui::ViewProviderFemConstraintFixed::updateData(), FemGui::ViewProviderFemConstraintFluidBoundary::updateData(), FemGui::ViewProviderFemConstraintForce::updateData(), FemGui::ViewProviderFemConstraintDisplacement::updateData(), FemGui::ViewProviderFemConstraintPlaneRotation::updateData(), FemGui::ViewProviderFemConstraintContact::updateData(), FemGui::ViewProviderFemConstraintTemperature::updateData(), FemGui::ViewProviderFemConstraintHeatflux::updateData(), and FemGui::ViewProviderFemConstraintTransform::updateData().
The documentation for this class was generated from the following files:
- src/Mod/Fem/App/FemConstraint.h
- src/Mod/Fem/App/FemConstraint.cpp