1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_ResultSketchPrs.h
4 // Created: 25 March 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef PartSet_ResultSketchPrs_H
8 #define PartSet_ResultSketchPrs_H
10 #include "ModuleBase.h"
12 #include <ModelAPI_Result.h>
14 #include <ViewerData_AISShape.hxx>
16 #include <TopoDS_Compound.hxx>
18 DEFINE_STANDARD_HANDLE(PartSet_ResultSketchPrs, ViewerData_AISShape)
22 * A redefinition of standard AIS Interactive Object in order to provide specific behaviour
23 * for wire presentations based in a one plane
25 class PartSet_ResultSketchPrs: public ViewerData_AISShape
29 /// \param theResult a result object
30 Standard_EXPORT PartSet_ResultSketchPrs(ResultPtr theResult);
32 DEFINE_STANDARD_RTTI(PartSet_ResultSketchPrs)
34 /// Redefinition of virtual function
35 Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
36 const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
38 /// Redefinition of virtual function
39 Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
40 const Standard_Integer theMode) ;
43 /// Appens sensitive and owners for wires of the given shape into selection
44 /// \param theSelection a current filled selection
45 /// \param theShape a shape
46 /// \param theTypeOfSelection type of selection: VERTEX, EDGE, WIRE
47 void appendShapeSelection(const Handle(SelectMgr_Selection)& theSelection,
48 const TopoDS_Shape& theShape, const TopAbs_ShapeEnum& theTypeOfSelection);
50 /// Sets color/line style/width of the presentation depending on the parameter state
51 /// \param isAuxiliary a boolean value if the properties are for auxiliary objects
52 void setAuxiliaryPresentationStyle(const bool isAuxiliary);
54 /// Fills the containers by the current result
55 /// \param theResultShape contains a shape of the result, it will be set as a Shape of AIS_Shape
56 /// \param theAuxiliaryCompound a compound of auxiliary shapes
57 /// \param theFaceList a list of face shapes
58 void fillShapes(TopoDS_Shape& aResultShape,
59 TopoDS_Compound& theAuxiliaryCompound,
60 NCollection_List<TopoDS_Shape>& theFaceList);
62 /// Reference to result object
65 /// Original shape of the result object
66 TopoDS_Shape myOriginalShape;
68 /// Compound of auxiliary shapes
69 TopoDS_Compound myAuxiliaryCompound;
72 //std::list<std::shared_ptr<GeomAPI_Shape> > myFacesList;
73 NCollection_List<TopoDS_Shape> mySketchFaceList;