1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketcherPrs_Perpendicular.h
4 // Created: 12 March 2015
5 // Author: Vitaly SMETANNIKOV
7 #ifndef SketcherPrs_Perpendicular_H
8 #define SketcherPrs_Perpendicular_H
10 #include "SketcherPrs_SymbolPrs.h"
12 class SketchPlugin_Sketch;
15 DEFINE_STANDARD_HANDLE(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs)
19 * A redefinition of standard AIS Interactive Object in order to provide
20 * presentation of perpendicular constraint
22 class SketcherPrs_Perpendicular: public SketcherPrs_SymbolPrs
26 /// \param theConstraint a constraint feature
27 /// \param thePlane a coordinate plane of current sketch
28 Standard_EXPORT SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint,
29 const std::shared_ptr<GeomAPI_Ax3>& thePlane);
31 DEFINE_STANDARD_RTTI(SketcherPrs_Perpendicular)
33 /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
34 /// \param theConstraint a constraint feature
35 /// \param thePlane a coordinate plane of current sketch
36 /// \return boolean result value
37 static bool IsReadyToDisplay(ModelAPI_Feature* theConstraint,
38 const std::shared_ptr<GeomAPI_Ax3>& thePlane);
40 virtual const char* iconName() const { return "perpendicular.png"; }
42 /// Redefine this function in order to add additiona lines of constraint base
43 /// \param thePrs a presentation
44 /// \param theColor a color of additiona lines
45 virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const;
47 /// Update myPntArray according to presentation positions
48 /// \return true in case of success
49 virtual bool updateIfReadyToDisplay(double theStep) const;