SHAPER  9.12.0
SketcherPrs_SymbolPrs Class Referenceabstract

A base class of constraint presentation which is represented by an icon. More...

Inheritance diagram for SketcherPrs_SymbolPrs:
Inheritance graph

Public Member Functions

 SketcherPrs_SymbolPrs (ModelAPI_Feature *theConstraint, SketchPlugin_Sketch *theSketcher)
 Constructor. More...
 
virtual void HilightSelected (const Handle &&thePM, const SelectMgr_SequenceOfOwner &theOwners)
 Method which draws selected owners ( for fast presentation draw ) More...
 
virtual void HilightOwnerWithColor (const Handle &&thePM, const Handle &&theStyle, const Handle &&theOwner)
 Method which hilight an owner belonging to. More...
 
std::shared_ptr< GeomAPI_Ax3plane () const
 Returns sketcher plane. More...
 
ModelAPI_Featurefeature () const
 Returns feature object. More...
 
ModelAPI_CompositeFeaturesketcher () const
 Returns Sketcher object (owner of the constraint) More...
 
const Handle && pointsArray () const
 Return array of points where symbols will be placed. More...
 
void SetCustomColor (const std::vector< int > &theColor)
 Set state of the presentation, in case of conflicting state, the icon of the presentation is visualized in error color. More...
 
virtual void BoundingBox (Bnd_Box &theBndBox) Standard_OVERRIDE
 Add a bounding box of the presentation to common bounding box. More...
 
virtual DEFINE_STANDARD_RTTIEXT(SketcherPrs_SymbolPrs, AIS_InteractiveObject) protected void ComputeSelection (const Handle &&aSelection, const Standard_Integer aMode)
 Redefinition of virtual function. More...
 
virtual const char * iconName () const =0
 Returns an icon file name. Has to be redefined in successors. More...
 
virtual void prepareAspect ()
 Check and creates if it is necessary myAspect member. More...
 
 Handleiicon ()
 Returns icon corresponded to the current constraint type. More...
 
void addLine (const Handle &&theGroup, std::string theAttrName) const
 Add a line into the given group. More...
 
virtual void drawLines (const Handle &&, Quantity_Color) const
 Redefine this function in order to add additiona lines of constraint base. More...
 
virtual bool updateIfReadyToDisplay (double, bool) const
 Update myPntArray according to presentation positions. More...
 
void drawShape (const std::shared_ptr< GeomAPI_Shape > &theShape, const Handle &&thePrs, Quantity_Color theColor) const
 Draw a shape into the given presentation scene. More...
 
void drawListOfShapes (const std::shared_ptr< ModelAPI_AttributeRefList > &theListAttr, const Handle &&thePrs, Quantity_Color theColor) const
 Draw a list of shapes stored in a RefListAttribute. More...
 

Protected Attributes

ModelAPI_FeaturemyConstraint
 Constraint feature. More...
 
SketchPlugin_SketchmySketcher
 Sketcher feature. More...
 
 HandlemmyAspect
 Aspect for entities drawing. More...
 
 HandlemmyPntArray
 Array of symbols positions. More...
 
 HandlemmyOwner
 An owner object of the presentation. More...
 

Friends

class SketcherPrs_SymbolArray
 

Detailed Description

A base class of constraint presentation which is represented by an icon.

Constructor & Destructor Documentation

◆ SketcherPrs_SymbolPrs()

SketcherPrs_SymbolPrs::SketcherPrs_SymbolPrs ( ModelAPI_Feature theConstraint,
SketchPlugin_Sketch theSketcher 
)

Constructor.

Parameters
theConstrainta constraint feature
thePlanea coordinate plane of current sketch

Member Function Documentation

◆ HilightSelected()

void SketcherPrs_SymbolPrs::HilightSelected ( const Handle &&  thePM,
const SelectMgr_SequenceOfOwner &  theOwners 
)
virtual

Method which draws selected owners ( for fast presentation draw )

◆ HilightOwnerWithColor()

void SketcherPrs_SymbolPrs::HilightOwnerWithColor ( const Handle &&  thePM,
const Handle &&  theStyle,
const Handle &&  theOwner 
)
virtual

Method which hilight an owner belonging to.

◆ plane()

std::shared_ptr<GeomAPI_Ax3> SketcherPrs_SymbolPrs::plane ( ) const
inline

Returns sketcher plane.

◆ feature()

ModelAPI_Feature* SketcherPrs_SymbolPrs::feature ( ) const
inline

Returns feature object.

◆ sketcher()

ModelAPI_CompositeFeature* SketcherPrs_SymbolPrs::sketcher ( ) const
inline

Returns Sketcher object (owner of the constraint)

◆ pointsArray()

const Handle&& SketcherPrs_SymbolPrs::pointsArray ( ) const
inline

Return array of points where symbols will be placed.

◆ SetCustomColor()

void SketcherPrs_SymbolPrs::SetCustomColor ( const std::vector< int > &  theColor)

Set state of the presentation, in case of conflicting state, the icon of the presentation is visualized in error color.

The state is stored in an internal field, so should be changed when constraint become not conflicting

Parameters
theColora color for conflicting object

◆ BoundingBox()

void SketcherPrs_SymbolPrs::BoundingBox ( Bnd_Box &  theBndBox)
virtual

Add a bounding box of the presentation to common bounding box.

Parameters
theBndBoxthe common bounding box to update

◆ ComputeSelection()

void SketcherPrs_SymbolPrs::ComputeSelection ( const Handle &&  aSelection,
const Standard_Integer  aMode 
)
virtual

Redefinition of virtual function.

Parameters
aSelectionselection
aModecompute mode

◆ iconName()

virtual const char* SketcherPrs_SymbolPrs::iconName ( ) const
pure virtual

◆ prepareAspect()

void SketcherPrs_SymbolPrs::prepareAspect ( )
virtual

Check and creates if it is necessary myAspect member.

It has to be called before the object computation

◆ Handleiicon()

SketcherPrs_SymbolPrs::Handleiicon ( )

Returns icon corresponded to the current constraint type.

◆ addLine()

void SketcherPrs_SymbolPrs::addLine ( const Handle &&  theGroup,
std::string  theAttrName 
) const

Add a line into the given group.

Parameters
theGroupa group for drawing
theAttrNamean attribute name which corresponds to referenced line

◆ drawLines()

virtual void SketcherPrs_SymbolPrs::drawLines ( const Handle &&  ,
Quantity_Color   
) const
inlinevirtual

Redefine this function in order to add additiona lines of constraint base.

Parameters
thePrsa presentation
theColora color of additiona lines

Reimplemented in SketcherPrs_Transformation, SketcherPrs_Tangent, SketcherPrs_Rigid, SketcherPrs_Perpendicular, SketcherPrs_Parallel, SketcherPrs_Offset, SketcherPrs_Mirror, SketcherPrs_Middle, SketcherPrs_HVDirection, SketcherPrs_Equal, and SketcherPrs_Collinear.

◆ updateIfReadyToDisplay()

virtual bool SketcherPrs_SymbolPrs::updateIfReadyToDisplay ( double  ,
bool   
) const
inlinevirtual

◆ drawShape()

void SketcherPrs_SymbolPrs::drawShape ( const std::shared_ptr< GeomAPI_Shape > &  theShape,
const Handle &&  thePrs,
Quantity_Color  theColor 
) const

Draw a shape into the given presentation scene.

Parameters
theShapethe shape to draw
thePrsthe presentation scene

◆ drawListOfShapes()

void SketcherPrs_SymbolPrs::drawListOfShapes ( const std::shared_ptr< ModelAPI_AttributeRefList > &  theListAttr,
const Handle &&  thePrs,
Quantity_Color  theColor 
) const

Draw a list of shapes stored in a RefListAttribute.

Parameters
theListAttrthe attribute of reference3s list
thePrsthe presentation scene

Field Documentation

◆ myConstraint

ModelAPI_Feature* SketcherPrs_SymbolPrs::myConstraint
protected

Constraint feature.

◆ mySketcher

SketchPlugin_Sketch* SketcherPrs_SymbolPrs::mySketcher
protected

Sketcher feature.

◆ HandlemmyAspect

SketcherPrs_SymbolPrs::HandlemmyAspect
protected

Aspect for entities drawing.

◆ HandlemmyPntArray

SketcherPrs_SymbolPrs::HandlemmyPntArray
mutableprotected

Array of symbols positions.

◆ HandlemmyOwner

SketcherPrs_SymbolPrs::HandlemmyOwner
protected

An owner object of the presentation.