|
||||
File indexing completed on 2025-01-18 10:05:01
0001 // Copyright (c) 2013-2014 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef StdPrs_WFShape_HeaderFile 0015 #define StdPrs_WFShape_HeaderFile 0016 0017 #include <Prs3d_Root.hxx> 0018 #include <Prs3d_Drawer.hxx> 0019 #include <Prs3d_Presentation.hxx> 0020 #include <Prs3d_PointAspect.hxx> 0021 #include <Prs3d_LineAspect.hxx> 0022 #include <Prs3d_NListOfSequenceOfPnt.hxx> 0023 #include <TColgp_SequenceOfPnt.hxx> 0024 #include <TopTools_ListOfShape.hxx> 0025 0026 class Graphic3d_ArrayOfPoints; 0027 0028 //! Tool for computing wireframe presentation of a TopoDS_Shape. 0029 class StdPrs_WFShape : public Prs3d_Root 0030 { 0031 public: 0032 0033 //! Computes wireframe presentation of a shape. 0034 //! @param thePresentation [in] the presentation. 0035 //! @param theShape [in] the shape. 0036 //! @param theDrawer [in] the draw settings. 0037 //! @param theIsParallel [in] perform algorithm using multiple threads 0038 Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& thePresentation, 0039 const TopoDS_Shape& theShape, 0040 const Handle(Prs3d_Drawer)& theDrawer, 0041 Standard_Boolean theIsParallel = Standard_False); 0042 0043 //! Compute free and boundary edges on a triangulation of each face in the given shape. 0044 //! @param theShape [in] the list of triangulated faces 0045 //! @param theToExcludeGeometric [in] flag indicating that Faces with defined Surface should be skipped 0046 Standard_EXPORT static Handle(Graphic3d_ArrayOfPrimitives) AddEdgesOnTriangulation (const TopoDS_Shape& theShape, 0047 const Standard_Boolean theToExcludeGeometric = Standard_True); 0048 0049 //! Compute free and boundary edges on a triangulation of each face in the given shape. 0050 //! @param theSegments [in] the sequence of points defining segments 0051 //! @param theShape [in] the list of triangulated faces 0052 //! @param theToExcludeGeometric [in] flag indicating that Faces with defined Surface should be skipped 0053 Standard_EXPORT static void AddEdgesOnTriangulation (TColgp_SequenceOfPnt& theSegments, 0054 const TopoDS_Shape& theShape, 0055 const Standard_Boolean theToExcludeGeometric = Standard_True); 0056 0057 //! Compute all edges (wire, free, unfree) and put them into single primitive array. 0058 //! @param theShape [in] the shape 0059 //! @param theDrawer [in] the drawer settings (deviation angle and maximal parameter value) 0060 Standard_EXPORT static Handle(Graphic3d_ArrayOfPrimitives) AddAllEdges (const TopoDS_Shape& theShape, 0061 const Handle(Prs3d_Drawer)& theDrawer); 0062 0063 //! Compute vertex presentation for a shape. 0064 //! @param theShape [in] the shape 0065 //! @param theVertexMode [in] vertex filter 0066 Standard_EXPORT static Handle(Graphic3d_ArrayOfPoints) AddVertexes (const TopoDS_Shape& theShape, 0067 Prs3d_VertexDrawMode theVertexMode); 0068 0069 private: 0070 0071 //! Compute edge presentations for a shape. 0072 //! @param theShape [in] the shape 0073 //! @param theDrawer [in] the drawer settings (deviation angle and maximal parameter value) 0074 //! @param theShapeDeflection [in] the deflection for the wireframe shape 0075 //! @param theWire [out] output polylines for lonely wires 0076 //! @param theFree [out] output polylines for free edges 0077 //! @param theUnFree [out] output polylines for non-free edges 0078 Standard_EXPORT static void addEdges (const TopoDS_Shape& theShape, 0079 const Handle(Prs3d_Drawer)& theDrawer, 0080 Standard_Real theShapeDeflection, 0081 Prs3d_NListOfSequenceOfPnt* theWire, 0082 Prs3d_NListOfSequenceOfPnt* theFree, 0083 Prs3d_NListOfSequenceOfPnt* theUnFree); 0084 0085 //! Compute edge presentations for a shape. 0086 //! @param theEdges [in] the list of edges 0087 //! @param theDrawer [in] the drawer settings (deviation angle and maximal parameter value) 0088 //! @param theShapeDeflection [in] the deflection for the wireframe shape 0089 //! @param thePolylines [out] output polylines 0090 static void addEdges (const TopTools_ListOfShape& theEdges, 0091 const Handle(Prs3d_Drawer)& theDrawer, 0092 const Standard_Real theShapeDeflection, 0093 Prs3d_NListOfSequenceOfPnt& thePolylines); 0094 0095 }; 0096 0097 #endif // _StdPrs_WFShape_H__
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |