SHAPER  9.12.0
SketcherPrs_Mirror Class Reference

A redefinition of standard AIS Interactive Object in order to provide
presentation of mirror constraint. More...

Inheritance diagram for SketcherPrs_Mirror:
Inheritance graph

Public Member Functions

 SketcherPrs_Mirror (ModelAPI_Feature *theConstraint, SketchPlugin_Sketch *theSketcher)
 Constructor. More...
 
 DEFINE_STANDARD_RTTIEXT (SketcherPrs_Mirror, SketcherPrs_SymbolPrs) static bool IsReadyToDisplay(ModelAPI_Feature *theConstraint
 Returns true if the constraint feature arguments are correcly filled to build AIS presentation. 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 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...
 
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...
 

Data Fields

const std::shared_ptr< GeomAPI_Ax3 > & thePlane
 

Protected Member Functions

virtual const char * iconName () const
 Returns an icon file name. Has to be redefined in successors. More...
 
virtual void drawLines (const Handle &&thePrs, Quantity_Color theColor) const
 Redefine this function in order to add additiona lines of constraint base. More...
 
virtual bool updateIfReadyToDisplay (double theStep, bool withColor) const
 Update myPntArray according to presentation positions. 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...
 

Detailed Description

A redefinition of standard AIS Interactive Object in order to provide
presentation of mirror constraint.

Constructor & Destructor Documentation

◆ SketcherPrs_Mirror()

SketcherPrs_Mirror::SketcherPrs_Mirror ( ModelAPI_Feature theConstraint,
SketchPlugin_Sketch theSketcher 
)

Constructor.

Parameters
theConstrainta constraint feature
theSketchera sketcher object

Member Function Documentation

◆ DEFINE_STANDARD_RTTIEXT()

SketcherPrs_Mirror::DEFINE_STANDARD_RTTIEXT ( SketcherPrs_Mirror  ,
SketcherPrs_SymbolPrs   
)

Returns true if the constraint feature arguments are correcly filled to build AIS presentation.

Parameters
theConstrainta constraint feature
thePlanea coordinate plane of current sketch
Returns
boolean result value

◆ iconName()

virtual const char* SketcherPrs_Mirror::iconName ( ) const
inlineprotectedvirtual

Returns an icon file name. Has to be redefined in successors.

Implements SketcherPrs_SymbolPrs.

◆ drawLines()

void SketcherPrs_Mirror::drawLines ( const Handle &&  ,
Quantity_Color   
) const
protectedvirtual

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

Parameters
thePrsa presentation
theColora color of additiona lines

Reimplemented from SketcherPrs_SymbolPrs.

◆ updateIfReadyToDisplay()

bool SketcherPrs_Mirror::updateIfReadyToDisplay ( double  theStep,
bool  withColor 
) const
protectedvirtual

Update myPntArray according to presentation positions.

Returns
true in case of success

Reimplemented from SketcherPrs_SymbolPrs.

◆ HilightSelected()

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

Method which draws selected owners ( for fast presentation draw )

◆ HilightOwnerWithColor()

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

Method which hilight an owner belonging to.

◆ plane()

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

Returns sketcher plane.

◆ feature()

ModelAPI_Feature* SketcherPrs_SymbolPrs::feature ( ) const
inlineinherited

Returns feature object.

◆ sketcher()

ModelAPI_CompositeFeature* SketcherPrs_SymbolPrs::sketcher ( ) const
inlineinherited

Returns Sketcher object (owner of the constraint)

◆ pointsArray()

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

Return array of points where symbols will be placed.

◆ SetCustomColor()

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

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)
virtualinherited

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 
)
virtualinherited

Redefinition of virtual function.

Parameters
aSelectionselection
aModecompute mode

◆ prepareAspect()

void SketcherPrs_SymbolPrs::prepareAspect ( )
virtualinherited

Check and creates if it is necessary myAspect member.

It has to be called before the object computation

◆ Handleiicon()

SketcherPrs_SymbolPrs::Handleiicon ( )
inherited

Returns icon corresponded to the current constraint type.

◆ addLine()

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

Add a line into the given group.

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

◆ drawShape()

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

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
inherited

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
protectedinherited

Constraint feature.

◆ mySketcher

SketchPlugin_Sketch* SketcherPrs_SymbolPrs::mySketcher
protectedinherited

Sketcher feature.

◆ HandlemmyAspect

SketcherPrs_SymbolPrs::HandlemmyAspect
protectedinherited

Aspect for entities drawing.

◆ HandlemmyPntArray

SketcherPrs_SymbolPrs::HandlemmyPntArray
mutableprotectedinherited

Array of symbols positions.

◆ HandlemmyOwner

SketcherPrs_SymbolPrs::HandlemmyOwner
protectedinherited

An owner object of the presentation.