Customosation of ModuleBase_WidgetShapeSelector in order to provide working with sketch specific objects.
More...
|
| | PartSet_ExternalObjectsMgr (const std::string &theExternal, const std::string &theCanCreateExternal, const bool theDefaultValue) |
| | Constructor. More...
|
| |
| bool | useExternal () const |
| | Returns the state whether the external object is used. More...
|
| |
| bool | canCreateExternal () |
| | Returns if new external objects can be created. More...
|
| |
| bool | isValidObject (const ObjectPtr &theObject) |
| | Checks validity of the given object. More...
|
| |
| ObjectPtr | externalObject (const ObjectPtr &theSelectedObject, const GeomShapePtr &theShape, const CompositeFeaturePtr &theSketch, const bool theTemporary=false) |
| | Finds or create and external object. More...
|
| |
| ObjectPtr | externalCenterObject (const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs, const CompositeFeaturePtr &theSketch, const bool theTemporary) |
| | Finds or create and external object by selected circle center (PartSet_CenterPrs) More...
|
| |
| ObjectPtr | getExternalObjectValidated () const |
| | Returns created external object or NULL. More...
|
| |
| void | removeExternal (const CompositeFeaturePtr &theSketch, const FeaturePtr &theFeature, ModuleBase_IWorkshop *theWorkshop, const bool theTemporary) |
| |
| virtual void | getGeomSelection (const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs, ObjectPtr &theObject, GeomShapePtr &theShape, ModuleBase_IWorkshop *theWorkshop, const CompositeFeaturePtr &theSketch, const bool isInValidate) |
| | Return an object and geom shape by the viewer presentation. More...
|
| |
Customosation of ModuleBase_WidgetShapeSelector in order to provide working with sketch specific objects.
◆ PartSet_ExternalObjectsMgr()
| PartSet_ExternalObjectsMgr::PartSet_ExternalObjectsMgr |
( |
const std::string & |
theExternal, |
|
|
const std::string & |
theCanCreateExternal, |
|
|
const bool |
theDefaultValue |
|
) |
| |
Constructor.
- Parameters
-
| theExternal | the external state |
| theCanCreateExternal | the state if it can and should create external features |
| theDefaultValue | the default value for the external object using |
◆ useExternal()
| bool PartSet_ExternalObjectsMgr::useExternal |
( |
| ) |
const |
|
inline |
Returns the state whether the external object is used.
◆ canCreateExternal()
| bool PartSet_ExternalObjectsMgr::canCreateExternal |
( |
| ) |
|
|
inline |
Returns if new external objects can be created.
- Returns
- boolean value
◆ isValidObject()
| bool PartSet_ExternalObjectsMgr::isValidObject |
( |
const ObjectPtr & |
theObject | ) |
|
Checks validity of the given object.
- Parameters
-
| theObject | an object to check |
- Returns
- valid or not valid
◆ externalObject()
| ObjectPtr PartSet_ExternalObjectsMgr::externalObject |
( |
const ObjectPtr & |
theSelectedObject, |
|
|
const GeomShapePtr & |
theShape, |
|
|
const CompositeFeaturePtr & |
theSketch, |
|
|
const bool |
theTemporary = false |
|
) |
| |
Finds or create and external object.
- Parameters
-
| theSelectedObject | an object |
| theShape | a selected shape, which is used in the selection attribute |
| theSketch | a current sketch |
| theTemporary | the created external object is temporary, execute is not performed for it |
- Returns
- the object
◆ externalCenterObject()
| ObjectPtr PartSet_ExternalObjectsMgr::externalCenterObject |
( |
const std::shared_ptr< ModuleBase_ViewerPrs > & |
thePrs, |
|
|
const CompositeFeaturePtr & |
theSketch, |
|
|
const bool |
theTemporary |
|
) |
| |
Finds or create and external object by selected circle center (PartSet_CenterPrs)
- Parameters
-
| thePrs | a selection |
| theSketch | a current sketch |
| theTemporary | the created external object is temporary, execute is not performed for it |
- Returns
- the object
◆ getExternalObjectValidated()
| ObjectPtr PartSet_ExternalObjectsMgr::getExternalObjectValidated |
( |
| ) |
const |
|
inline |
Returns created external object or NULL.
- Returns
- an object instance
◆ removeExternal()
| void PartSet_ExternalObjectsMgr::removeExternal |
( |
const CompositeFeaturePtr & |
theSketch, |
|
|
const FeaturePtr & |
theFeature, |
|
|
ModuleBase_IWorkshop * |
theWorkshop, |
|
|
const bool |
theTemporary |
|
) |
| |
- Parameters
-
| theSketch | a current sketch |
| theFeature | a current feature |
| theWorkshop | a current workshop |
| theTemporary | if true, a temporary external object is removed, otherwise all ext objects |
◆ getGeomSelection()
| void PartSet_ExternalObjectsMgr::getGeomSelection |
( |
const std::shared_ptr< ModuleBase_ViewerPrs > & |
thePrs, |
|
|
ObjectPtr & |
theObject, |
|
|
GeomShapePtr & |
theShape, |
|
|
ModuleBase_IWorkshop * |
theWorkshop, |
|
|
const CompositeFeaturePtr & |
theSketch, |
|
|
const bool |
isInValidate |
|
) |
| |
|
virtual |
Return an object and geom shape by the viewer presentation.
- Parameters
-
| thePrs | a selection |
| theObject | an output object |
| theShape | a shape of the selection |
use objects of found selection
the object is null if the selected feature is "external"(not sketch entity feature of the current sketch) and it is not created by object manager
◆ removeExternalObject()
| void PartSet_ExternalObjectsMgr::removeExternalObject |
( |
const ObjectPtr & |
theObject, |
|
|
const CompositeFeaturePtr & |
theSketch, |
|
|
const FeaturePtr & |
theFeature, |
|
|
ModuleBase_IWorkshop * |
theWorkshop |
|
) |
| |
|
protected |
Delete from the document the feature of the object.
It deletes all objects, which refers to the deleted one. The parameter feature is ignored even it refer to the deleted object.
- Parameters
-
| theObject | a removed object |
| theSketch | a current sketch |
| theFeature | a current feature |
| theWorkshop | a current workshop |
◆ workshop()
◆ myExternalObjectValidated
| ObjectPtr PartSet_ExternalObjectsMgr::myExternalObjectValidated |
|
protected |
◆ myUseExternal
| bool PartSet_ExternalObjectsMgr::myUseExternal |
|
protected |
Boolean value about the neccessity of the external object use.
◆ myCanCreateExternal
| bool PartSet_ExternalObjectsMgr::myCanCreateExternal |
|
protected |
Boolean value about the necessity of a new external object creation.