1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketcherPrs_Angle.h
4 // Created: 20 August 2015
5 // Author: Vitaly SMETANNIKOV
8 #ifndef SketcherPrs_Angle_H
9 #define SketcherPrs_Angle_H
11 #include <GeomAPI_Ax3.h>
12 #include <ModelAPI_Feature.h>
14 #include <AIS_AngleDimension.hxx>
15 #include <Standard_DefineHandle.hxx>
17 class SketcherPrs_DimensionStyleListener;
19 DEFINE_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension)
23 * A class for representation of angle constraint
25 class SketcherPrs_Angle : public AIS_AngleDimension
29 /// \param theConstraint a constraint feature
30 /// \param thePlane a coordinate plane of current sketch
31 Standard_EXPORT SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
32 const std::shared_ptr<GeomAPI_Ax3>& thePlane);
35 Standard_EXPORT ~SketcherPrs_Angle();
37 DEFINE_STANDARD_RTTI(SketcherPrs_Angle)
39 /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
40 /// \param theConstraint a constraint feature
41 /// \param thePlane a coordinate plane of current sketch
42 /// \return boolean result value
43 static bool IsReadyToDisplay(ModelAPI_Feature* theConstraint,
44 const std::shared_ptr<GeomAPI_Ax3>& thePlane);
46 /// Redefinition of virtual function
47 Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
48 const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
50 /// Redefinition of virtual function
51 Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
52 const Standard_Integer aMode);
55 /// Constraint feature
56 ModelAPI_Feature* myConstraint;
58 /// Plane of the current sketcher
59 std::shared_ptr<GeomAPI_Ax3> myPlane;
61 Handle(Prs3d_DimensionAspect) myAspect;
63 /// Listener to update dimension visualization style
64 SketcherPrs_DimensionStyleListener* myStyleListener;