OpenLexocad  27.1
OpenLxApp::ProductImpl Class Reference

ProductImpl implements the Product behavior of an object. This is used in Product and SubElement. More...

#include <ProductImpl.h>

Public Member Functions

 ProductImpl (App::Product *aProduct)
 
 ~ProductImpl (void)
 
std::shared_ptr< DocumentgetDocument () const
 
virtual bool setGeometry (std::shared_ptr< Geometry > geo)
 
std::shared_ptr< GeometrygetGeometry () const
 
Geom::Trsf getGeometryToWorldTransform () const
 
Geom::Bnd_Box getBoundingBox () const
 
Geom::Ax2 getLocalPlacement () const
 
void setLocalPlacement (const Geom::Ax2 &pos)
 
Geom::Trsf getTransform () const
 
Geom::Trsf getLocalToWorldTransform () const
 
void setTransform (const Geom::Trsf &t)
 
void translate (const Geom::Vec &aVec, Geom::CoordSpace aCoordSpace=Geom::CoordSpace::WCS)
 
void rotate (const Geom::Ax1 &axis, double angle, Geom::CoordSpace aCoordSpace=Geom::CoordSpace::WCS)
 
bool getLocalAxes (Geom::Ax2 &localAxes)
 
void setLocalAxes (const Geom::Dir &zHeight, const Geom::Dir &xLength)
 
pConstShape getShape () const
 
pConstShape getLocalShape () const
 
void setOglMaterial (const Draw::OglMaterial &mat, int faceIndex=-1)
 
Draw::OglMaterial getOglMaterial () const
 
void setAmbientColor (const Base::Color &aCol)
 
void setDiffuseColor (const Base::Color &aCol)
 
void setSpecularColor (const Base::Color &aCol)
 
void setEmissiveColor (const Base::Color &aCol)
 
void setReflectiveColor (const Base::Color &aCol)
 
void setShininess (int aVal)
 
void setTransparency (int aVal)
 
void setDrawStyle (const Draw::DrawStyle &ds)
 
Draw::DrawStyle getDrawStyle () const
 
void setLineWidth (float width)
 
void setTexture (const Draw::Texture2 &tex, int faceIndex=-1)
 
void setLengthAndCrossTexture (const Draw::Texture2 &lengthTexture, const Draw::Texture2 &crossTexture, const Draw::Texture2Transform &lengthTextureTrsf=Draw::Texture2Transform(), const Draw::Texture2Transform &crossTextureTrsf=Draw::Texture2Transform())
 
void setPositionNb (long value)
 
long getPositionNb () const
 
bool isVisible () const
 
void setVisible (bool onoff)
 
std::shared_ptr< PropertyIntegerregisterPropertyInteger (const std::string &aName, int aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyEnumregisterPropertyEnum (const std::string &aName, int aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyDoubleregisterPropertyDouble (const std::string &aName, double aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyButtonregisterPropertyButton (const std::string &aName, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyBoolregisterPropertyBool (const std::string &aName, bool aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyStringregisterPropertyString (const std::string &aName, const Base::String &aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyColorregisterPropertyColor (const std::string &aName, const Base::Color &aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< OpenLxApp::PropertygetProperty (const std::string &aName) const
 
std::map< std::string, std::shared_ptr< Property > > getPropertyMap () const
 
std::shared_ptr< PropertyIntegergetPropertyInteger (const std::string &aName) const
 
std::shared_ptr< PropertyEnumgetPropertyEnum (const std::string &aName) const
 
std::shared_ptr< PropertyDoublegetPropertyDouble (const std::string &aName) const
 
std::shared_ptr< PropertyButtongetPropertyButton (const std::string &aName) const
 
std::shared_ptr< PropertyBoolgetPropertyBool (const std::string &aName) const
 
std::shared_ptr< PropertyStringgetPropertyString (const std::string &aName) const
 
std::shared_ptr< PropertyColorgetPropertyColor (const std::string &aName) const
 
bool isRegisteredProperty (const std::string &aName) const
 
void translateAfterScaled (const Geom::Vec &aVec, const Geom::Pnt &aScaleBasePnt)
 
void setStandardManipulatorPolicy (const Core::StandardManipulatorPolicy &aPolicy)
 
void setPropertyHeader (const Base::String &aDefaultName, int aTranslationId)
 
void setPropertyGroupName (const Base::String &aDefaultName, int aTranslationId)
 
Base::String getPropertyHeader () const
 
Base::String getPropertyGroupName () const
 
std::shared_ptr< PropertyUsergetPropertyUser (const std::string &aName) const
 
std::vector< std::shared_ptr< PropertyUser > > getPropertyUser () const
 
std::vector< Base::StringgetPropertySetNames () const
 
std::shared_ptr< PropertySetgetPropertySetByName (const Base::String &aName) const
 
template<typename T >
bool registerPythonClass (std::shared_ptr< T > aObject, const std::string &aClassName, const std::string &aParentClassName)
 
template<typename T >
void onChange (std::shared_ptr< T > aObject, Core::DocObject *aCaller, const Core::DocObjectObserverMsg &aReason)
 

Detailed Description

ProductImpl implements the Product behavior of an object. This is used in Product and SubElement.

Constructor & Destructor Documentation

◆ ProductImpl()

OpenLxApp::ProductImpl::ProductImpl ( App::Product *  aProduct)

◆ ~ProductImpl()

OpenLxApp::ProductImpl::~ProductImpl ( void  )

Member Function Documentation

◆ getBoundingBox()

Geom::Bnd_Box OpenLxApp::ProductImpl::getBoundingBox ( ) const

◆ getDocument()

std::shared_ptr<Document> OpenLxApp::ProductImpl::getDocument ( ) const

◆ getDrawStyle()

Draw::DrawStyle OpenLxApp::ProductImpl::getDrawStyle ( ) const

◆ getGeometry()

std::shared_ptr<Geometry> OpenLxApp::ProductImpl::getGeometry ( ) const

◆ getGeometryToWorldTransform()

Geom::Trsf OpenLxApp::ProductImpl::getGeometryToWorldTransform ( ) const

◆ getLocalAxes()

bool OpenLxApp::ProductImpl::getLocalAxes ( Geom::Ax2 localAxes)

◆ getLocalPlacement()

Geom::Ax2 OpenLxApp::ProductImpl::getLocalPlacement ( ) const

◆ getLocalShape()

pConstShape OpenLxApp::ProductImpl::getLocalShape ( ) const

◆ getLocalToWorldTransform()

Geom::Trsf OpenLxApp::ProductImpl::getLocalToWorldTransform ( ) const

◆ getOglMaterial()

Draw::OglMaterial OpenLxApp::ProductImpl::getOglMaterial ( ) const

◆ getPositionNb()

long OpenLxApp::ProductImpl::getPositionNb ( ) const

◆ getProperty()

std::shared_ptr<OpenLxApp::Property> OpenLxApp::ProductImpl::getProperty ( const std::string &  aName) const

◆ getPropertyBool()

std::shared_ptr<PropertyBool> OpenLxApp::ProductImpl::getPropertyBool ( const std::string &  aName) const

◆ getPropertyButton()

std::shared_ptr<PropertyButton> OpenLxApp::ProductImpl::getPropertyButton ( const std::string &  aName) const

◆ getPropertyColor()

std::shared_ptr<PropertyColor> OpenLxApp::ProductImpl::getPropertyColor ( const std::string &  aName) const

◆ getPropertyDouble()

std::shared_ptr<PropertyDouble> OpenLxApp::ProductImpl::getPropertyDouble ( const std::string &  aName) const

◆ getPropertyEnum()

std::shared_ptr<PropertyEnum> OpenLxApp::ProductImpl::getPropertyEnum ( const std::string &  aName) const

◆ getPropertyGroupName()

Base::String OpenLxApp::ProductImpl::getPropertyGroupName ( ) const

◆ getPropertyHeader()

Base::String OpenLxApp::ProductImpl::getPropertyHeader ( ) const

◆ getPropertyInteger()

std::shared_ptr<PropertyInteger> OpenLxApp::ProductImpl::getPropertyInteger ( const std::string &  aName) const

◆ getPropertyMap()

std::map<std::string, std::shared_ptr<Property> > OpenLxApp::ProductImpl::getPropertyMap ( ) const

◆ getPropertySetByName()

std::shared_ptr<PropertySet> OpenLxApp::ProductImpl::getPropertySetByName ( const Base::String aName) const

◆ getPropertySetNames()

std::vector<Base::String> OpenLxApp::ProductImpl::getPropertySetNames ( ) const

◆ getPropertyString()

std::shared_ptr<PropertyString> OpenLxApp::ProductImpl::getPropertyString ( const std::string &  aName) const

◆ getPropertyUser() [1/2]

std::shared_ptr<PropertyUser> OpenLxApp::ProductImpl::getPropertyUser ( const std::string &  aName) const

◆ getPropertyUser() [2/2]

std::vector<std::shared_ptr<PropertyUser> > OpenLxApp::ProductImpl::getPropertyUser ( ) const

◆ getShape()

pConstShape OpenLxApp::ProductImpl::getShape ( ) const

◆ getTransform()

Geom::Trsf OpenLxApp::ProductImpl::getTransform ( ) const

◆ isRegisteredProperty()

bool OpenLxApp::ProductImpl::isRegisteredProperty ( const std::string &  aName) const

◆ isVisible()

bool OpenLxApp::ProductImpl::isVisible ( ) const

◆ onChange()

template<typename T >
void OpenLxApp::ProductImpl::onChange ( std::shared_ptr< T >  aObject,
Core::DocObject aCaller,
const Core::DocObjectObserverMsg aReason 
)
inline

◆ registerPropertyBool()

std::shared_ptr<PropertyBool> OpenLxApp::ProductImpl::registerPropertyBool ( const std::string &  aName,
bool  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyButton()

std::shared_ptr<PropertyButton> OpenLxApp::ProductImpl::registerPropertyButton ( const std::string &  aName,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyColor()

std::shared_ptr<PropertyColor> OpenLxApp::ProductImpl::registerPropertyColor ( const std::string &  aName,
const Base::Color aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyDouble()

std::shared_ptr<PropertyDouble> OpenLxApp::ProductImpl::registerPropertyDouble ( const std::string &  aName,
double  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyEnum()

std::shared_ptr<PropertyEnum> OpenLxApp::ProductImpl::registerPropertyEnum ( const std::string &  aName,
int  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyInteger()

std::shared_ptr<PropertyInteger> OpenLxApp::ProductImpl::registerPropertyInteger ( const std::string &  aName,
int  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyString()

std::shared_ptr<PropertyString> OpenLxApp::ProductImpl::registerPropertyString ( const std::string &  aName,
const Base::String aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPythonClass()

template<typename T >
bool OpenLxApp::ProductImpl::registerPythonClass ( std::shared_ptr< T >  aObject,
const std::string &  aClassName,
const std::string &  aParentClassName 
)
inline

Implementation of registerPythonClass

Parameters
[in]TaCaller: The calling instance
[in]conststd::string & aClassName : The name of the Python class.
[in]conststd::string & aParentClassName : The full name of the parent class (or super class) e.g. OpenLxApp.Element
Returns
bool : Returns true if successfully registered.
Since
26.0
Author
HPK
Date
2019-04-14

◆ rotate()

void OpenLxApp::ProductImpl::rotate ( const Geom::Ax1 axis,
double  angle,
Geom::CoordSpace  aCoordSpace = Geom::CoordSpace::WCS 
)

◆ setAmbientColor()

void OpenLxApp::ProductImpl::setAmbientColor ( const Base::Color aCol)

◆ setDiffuseColor()

void OpenLxApp::ProductImpl::setDiffuseColor ( const Base::Color aCol)

◆ setDrawStyle()

void OpenLxApp::ProductImpl::setDrawStyle ( const Draw::DrawStyle &  ds)

◆ setEmissiveColor()

void OpenLxApp::ProductImpl::setEmissiveColor ( const Base::Color aCol)

◆ setGeometry()

virtual bool OpenLxApp::ProductImpl::setGeometry ( std::shared_ptr< Geometry geo)
virtual

◆ setLengthAndCrossTexture()

void OpenLxApp::ProductImpl::setLengthAndCrossTexture ( const Draw::Texture2 &  lengthTexture,
const Draw::Texture2 &  crossTexture,
const Draw::Texture2Transform &  lengthTextureTrsf = Draw::Texture2Transform(),
const Draw::Texture2Transform &  crossTextureTrsf = Draw::Texture2Transform() 
)

◆ setLineWidth()

void OpenLxApp::ProductImpl::setLineWidth ( float  width)

◆ setLocalAxes()

void OpenLxApp::ProductImpl::setLocalAxes ( const Geom::Dir zHeight,
const Geom::Dir xLength 
)

◆ setLocalPlacement()

void OpenLxApp::ProductImpl::setLocalPlacement ( const Geom::Ax2 pos)

◆ setOglMaterial()

void OpenLxApp::ProductImpl::setOglMaterial ( const Draw::OglMaterial &  mat,
int  faceIndex = -1 
)

◆ setPositionNb()

void OpenLxApp::ProductImpl::setPositionNb ( long  value)

◆ setPropertyGroupName()

void OpenLxApp::ProductImpl::setPropertyGroupName ( const Base::String aDefaultName,
int  aTranslationId 
)

◆ setPropertyHeader()

void OpenLxApp::ProductImpl::setPropertyHeader ( const Base::String aDefaultName,
int  aTranslationId 
)

◆ setReflectiveColor()

void OpenLxApp::ProductImpl::setReflectiveColor ( const Base::Color aCol)

◆ setShininess()

void OpenLxApp::ProductImpl::setShininess ( int  aVal)

◆ setSpecularColor()

void OpenLxApp::ProductImpl::setSpecularColor ( const Base::Color aCol)

◆ setStandardManipulatorPolicy()

void OpenLxApp::ProductImpl::setStandardManipulatorPolicy ( const Core::StandardManipulatorPolicy aPolicy)

◆ setTexture()

void OpenLxApp::ProductImpl::setTexture ( const Draw::Texture2 &  tex,
int  faceIndex = -1 
)

◆ setTransform()

void OpenLxApp::ProductImpl::setTransform ( const Geom::Trsf t)

◆ setTransparency()

void OpenLxApp::ProductImpl::setTransparency ( int  aVal)

◆ setVisible()

void OpenLxApp::ProductImpl::setVisible ( bool  onoff)

◆ translate()

void OpenLxApp::ProductImpl::translate ( const Geom::Vec aVec,
Geom::CoordSpace  aCoordSpace = Geom::CoordSpace::WCS 
)

◆ translateAfterScaled()

void OpenLxApp::ProductImpl::translateAfterScaled ( const Geom::Vec aVec,
const Geom::Pnt aScaleBasePnt 
)

The documentation for this class was generated from the following file: