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_RTTIEXT(PartSet_ResultSketchPrs, ViewerData_AISShape)
34 /// Redefinition of virtual function
35 Standard_EXPORT virtual void Compute(
36 const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
37 const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
39 /// Redefinition of virtual function
40 Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
41 const Standard_Integer theMode) ;
44 /// Appens sensitive and owners for wires of the given shape into selection
45 /// \param theSelection a current filled selection
46 /// \param theShape a shape
47 /// \param theTypeOfSelection type of selection: VERTEX, EDGE, WIRE
48 void appendShapeSelection(const Handle(SelectMgr_Selection)& theSelection,
49 const TopoDS_Shape& theShape,
50 const TopAbs_ShapeEnum& theTypeOfSelection);
52 /// Sets color/line style/width of the presentation depending on the parameter state
53 /// \param isAuxiliary a boolean value if the properties are for auxiliary objects
54 void setAuxiliaryPresentationStyle(const bool isAuxiliary);
56 /// Fills the containers by the current result
57 /// \param theResultShape contains a shape of the result, it will be set as a Shape of AIS_Shape
58 /// \param theAuxiliaryCompound a compound of auxiliary shapes
59 /// \param theFaceList a list of face shapes
60 void fillShapes(TopoDS_Shape& aResultShape,
61 TopoDS_Compound& theAuxiliaryCompound,
62 NCollection_List<TopoDS_Shape>& theFaceList);
64 /// Reference to result object
67 /// Original shape of the result object
68 TopoDS_Shape myOriginalShape;
70 /// Compound of auxiliary shapes
71 TopoDS_Compound myAuxiliaryCompound;
74 //std::list<std::shared_ptr<GeomAPI_Shape> > myFacesList;
75 NCollection_List<TopoDS_Shape> mySketchFaceList;