0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection...
[occt.git] / src / StdPrs / StdPrs_WFShape.hxx
CommitLineData
d5f74e42 1// Copyright (c) 2013-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
d7223c76 14#ifndef _StdPrs_WFShape_H__
15#define _StdPrs_WFShape_H__
7fd59977 16
d7223c76 17#include <Prs3d_Root.hxx>
d7223c76 18#include <Prs3d_Drawer.hxx>
5ad8c033 19#include <Prs3d_Presentation.hxx>
20#include <Prs3d_PointAspect.hxx>
21#include <Prs3d_LineAspect.hxx>
1b9f5d95 22#include <Prs3d_NListOfSequenceOfPnt.hxx>
5ad8c033 23#include <TColgp_SequenceOfPnt.hxx>
24#include <TopoDS_Shape.hxx>
25#include <TopTools_ListOfShape.hxx>
7fd59977 26
5ad8c033 27//! Tool for computing wireframe presentation of a TopoDS_Shape.
c151c0f1 28class StdPrs_WFShape : public Prs3d_Root
29{
c151c0f1 30public:
31
5ad8c033 32 //! Computes wireframe presentation of a shape.
33 //! @param thePresentation [in] the presentation.
34 //! @param theShape [in] the shape.
35 //! @param theDrawer [in] the draw settings.
884cafd8 36 //! @param theIsParallel [in] perform algorithm using multiple threads
37 Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& thePresentation,
38 const TopoDS_Shape& theShape,
39 const Handle(Prs3d_Drawer)& theDrawer,
40 Standard_Boolean theIsParallel = Standard_False);
c151c0f1 41
0a863061 42 //! Compute free and boundary edges on a triangulation of each face in the given shape.
43 //! @param theShape [in] the list of triangulated faces
44 //! @param theToExcludeGeometric [in] flag indicating that Faces with defined Surface should be skipped
45 Standard_EXPORT static Handle(Graphic3d_ArrayOfPrimitives) AddEdgesOnTriangulation (const TopoDS_Shape& theShape,
46 const Standard_Boolean theToExcludeGeometric = Standard_True);
47
48 //! Compute free and boundary edges on a triangulation of each face in the given shape.
49 //! @param theSegments [in] the sequence of points defining segments
50 //! @param theShape [in] the list of triangulated faces
51 //! @param theToExcludeGeometric [in] flag indicating that Faces with defined Surface should be skipped
52 Standard_EXPORT static void AddEdgesOnTriangulation (TColgp_SequenceOfPnt& theSegments,
53 const TopoDS_Shape& theShape,
54 const Standard_Boolean theToExcludeGeometric = Standard_True);
55
c151c0f1 56private:
57
5ad8c033 58 //! Compute edge presentations for a shape.
5ad8c033 59 //! @param theEdges [in] the list of edges.
5ad8c033 60 //! @param theDrawer [in] the drawer settings.
61 //! @param theShapeDeflection [in] the deflection for the wireframe shape.
1b9f5d95 62 static void addEdges (const TopTools_ListOfShape& theEdges,
63 const Handle(Prs3d_Drawer)& theDrawer,
64 const Standard_Real theShapeDeflection,
65 Prs3d_NListOfSequenceOfPnt& thePolylines);
c151c0f1 66
5ad8c033 67 //! Compute vertex presentation for a shape.
68 //! @param thePresentation [in] the presentation.
69 //! @param theVertices [in] the list of points.
70 //! @param theAspect [in] the point drawing aspect.
71 static void addVertices (const Handle (Prs3d_Presentation)& thePresentation,
72 const TColgp_SequenceOfPnt& theVertices,
73 const Handle (Prs3d_PointAspect)& theAspect);
c151c0f1 74};
75
76#endif // _StdPrs_WFShape_H__