|
|
|||
File indexing completed on 2026-10-06 09:22:10
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 <gp_Pnt.hxx> 0023 #include <NCollection_Sequence.hxx> 0024 #include <NCollection_HSequence.hxx> 0025 #include <NCollection_List.hxx> 0026 #include <TopoDS_Shape.hxx> 0027 0028 class Graphic3d_ArrayOfPoints; 0029 0030 //! Tool for computing wireframe presentation of a TopoDS_Shape. 0031 class StdPrs_WFShape : public Prs3d_Root 0032 { 0033 public: 0034 //! Computes wireframe presentation of a shape. 0035 //! @param[in] thePresentation the presentation. 0036 //! @param[in] theShape the shape. 0037 //! @param[in] theDrawer the draw settings. 0038 //! @param[in] theIsParallel perform algorithm using multiple threads 0039 Standard_EXPORT static void Add(const occ::handle<Prs3d_Presentation>& thePresentation, 0040 const TopoDS_Shape& theShape, 0041 const occ::handle<Prs3d_Drawer>& theDrawer, 0042 bool theIsParallel = false); 0043 0044 //! Compute free and boundary edges on a triangulation of each face in the given shape. 0045 //! @param[in] theShape the list of triangulated faces 0046 //! @param[in] theToExcludeGeometric flag indicating that Faces with defined Surface should be 0047 //! skipped 0048 Standard_EXPORT static occ::handle<Graphic3d_ArrayOfPrimitives> AddEdgesOnTriangulation( 0049 const TopoDS_Shape& theShape, 0050 const bool theToExcludeGeometric = true); 0051 0052 //! Compute free and boundary edges on a triangulation of each face in the given shape. 0053 //! @param[in] theSegments the sequence of points defining segments 0054 //! @param[in] theShape the list of triangulated faces 0055 //! @param[in] theToExcludeGeometric flag indicating that Faces with defined Surface should be 0056 //! skipped 0057 Standard_EXPORT static void AddEdgesOnTriangulation(NCollection_Sequence<gp_Pnt>& theSegments, 0058 const TopoDS_Shape& theShape, 0059 const bool theToExcludeGeometric = true); 0060 0061 //! Compute all edges (wire, free, unfree) and put them into single primitive array. 0062 //! @param[in] theShape the shape 0063 //! @param[in] theDrawer the drawer settings (deviation angle and maximal parameter value) 0064 Standard_EXPORT static occ::handle<Graphic3d_ArrayOfPrimitives> AddAllEdges( 0065 const TopoDS_Shape& theShape, 0066 const occ::handle<Prs3d_Drawer>& theDrawer); 0067 0068 //! Compute vertex presentation for a shape. 0069 //! @param[in] theShape the shape 0070 //! @param[in] theVertexMode vertex filter 0071 Standard_EXPORT static occ::handle<Graphic3d_ArrayOfPoints> AddVertexes( 0072 const TopoDS_Shape& theShape, 0073 Prs3d_VertexDrawMode theVertexMode); 0074 0075 private: 0076 //! Compute edge presentations for a shape. 0077 //! @param[in] theShape the shape 0078 //! @param[in] theDrawer the drawer settings (deviation angle and maximal parameter value) 0079 //! @param[in] theShapeDeflection the deflection for the wireframe shape 0080 //! @param[out] theWire output polylines for lonely wires 0081 //! @param[out] theFree output polylines for free edges 0082 //! @param[out] theUnFree output polylines for non-free edges 0083 Standard_EXPORT static void addEdges( 0084 const TopoDS_Shape& theShape, 0085 const occ::handle<Prs3d_Drawer>& theDrawer, 0086 double theShapeDeflection, 0087 NCollection_List<occ::handle<NCollection_HSequence<gp_Pnt>>>* theWire, 0088 NCollection_List<occ::handle<NCollection_HSequence<gp_Pnt>>>* theFree, 0089 NCollection_List<occ::handle<NCollection_HSequence<gp_Pnt>>>* theUnFree); 0090 0091 //! Compute edge presentations for a shape. 0092 //! @param[in] theEdges the list of edges 0093 //! @param[in] theDrawer the drawer settings (deviation angle and maximal parameter value) 0094 //! @param[in] theShapeDeflection the deflection for the wireframe shape 0095 //! @param[out] thePolylines output polylines 0096 static void addEdges(const NCollection_List<TopoDS_Shape>& theEdges, 0097 const occ::handle<Prs3d_Drawer>& theDrawer, 0098 const double theShapeDeflection, 0099 NCollection_List<occ::handle<NCollection_HSequence<gp_Pnt>>>& thePolylines); 0100 }; 0101 0102 #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 |
|