SHAPER  9.12.0
SketcherPrs_Angle Class Reference

A class for representation of angle constraint. More...

Inheritance diagram for SketcherPrs_Angle:
Inheritance graph

Public Member Functions

 SketcherPrs_Angle (ModelAPI_Feature *theConstraint, SketchPlugin_Sketch *theSketcher)
 Constructor. More...
 
 ~SketcherPrs_Angle ()
 Destructor. More...
 
 DEFINE_STANDARD_RTTIEXT (SketcherPrs_Angle, PrsDim_AngleDimension) static bool IsReadyToDisplay(ModelAPI_Feature *theConstraint
 Returns true if the constraint feature arguments are correcly filled to build AIS presentation. More...
 
std::shared_ptr< GeomAPI_Ax3plane () const
 Returns sketcher plane. More...
 

Data Fields

const std::shared_ptr< GeomAPI_Ax3 > & thePlane
 

Protected Member Functions

virtual void Compute (const Handle &&thePresentationManager, const Handle &&thePresentation, const Standard_Integer theMode=0)
 Redefinition of virtual function. More...
 
virtual void ComputeSelection (const Handle &&aSelection, const Standard_Integer aMode)
 Redefinition of virtual function. More...
 
bool isAnglePlaneReversedToSketchPlane ()
 Checks is the angle plane has inverted direction of normal to the plane of current sketcher Returns true if crossed product is negative. More...
 
double calculateDistanceToFlyoutPoint ()
 Calculates a distance between center of the angle presentation and the value of flyout point attribute. More...
 

Static Protected Member Functions

static bool readyToDisplay (ModelAPI_Feature *theConstraint, const std::shared_ptr< GeomAPI_Ax3 > &thePlane, gp_Pnt &theFirstPoint, gp_Pnt &theSecondPoint, gp_Pnt &theCenterPoint)
 

Detailed Description

A class for representation of angle constraint.

Constructor & Destructor Documentation

◆ SketcherPrs_Angle()

SketcherPrs_Angle::SketcherPrs_Angle ( ModelAPI_Feature theConstraint,
SketchPlugin_Sketch theSketcher 
)

Constructor.

Parameters
theConstrainta constraint feature
thePlanea coordinate plane of current sketch

◆ ~SketcherPrs_Angle()

SketcherPrs_Angle::~SketcherPrs_Angle ( )

Destructor.

Member Function Documentation

◆ DEFINE_STANDARD_RTTIEXT()

SketcherPrs_Angle::DEFINE_STANDARD_RTTIEXT ( SketcherPrs_Angle  ,
PrsDim_AngleDimension   
)

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

◆ plane()

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

Returns sketcher plane.

◆ Compute()

void SketcherPrs_Angle::Compute ( const Handle &&  thePresentationManager,
const Handle &&  thePresentation,
const Standard_Integer  theMode = 0 
)
protectedvirtual

Redefinition of virtual function.

it was not calculated yet

◆ ComputeSelection()

void SketcherPrs_Angle::ComputeSelection ( const Handle &&  aSelection,
const Standard_Integer  aMode 
)
protectedvirtual

Redefinition of virtual function.

◆ isAnglePlaneReversedToSketchPlane()

bool SketcherPrs_Angle::isAnglePlaneReversedToSketchPlane ( )
protected

Checks is the angle plane has inverted direction of normal to the plane of current sketcher Returns true if crossed product is negative.

Returns
bolean value

◆ calculateDistanceToFlyoutPoint()

double SketcherPrs_Angle::calculateDistanceToFlyoutPoint ( )
protected

Calculates a distance between center of the angle presentation and the value of flyout point attribute.

It should be used after setting measured geometry for the angle presentation as it uses calculated center/first/second point coordinates

Returns
real value