4b114473 |
1 | // Copyright (c) 2018 OPEN CASCADE SAS |
2 | // This file is part of Open CASCADE Technology software library. |
3 | // |
4 | // This library is free software; you can redistribute it and/or modify it under |
5 | // the terms of the GNU Lesser General Public License version 2.1 as published |
6 | // by the Free Software Foundation, with special exception defined in the file |
7 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
8 | // distribution for complete text of the license and disclaimer of any warranty. |
9 | // |
10 | // Alternatively, this file may be used under the terms of Open CASCADE |
11 | // commercial license or contractual agreement. |
12 | |
13 | #ifndef _BRepGProp_MeshCinert_HeaderFile |
14 | #define _BRepGProp_MeshCinert_HeaderFile |
15 | |
16 | #include <Standard.hxx> |
17 | #include <Standard_DefineAlloc.hxx> |
18 | #include <Standard_Handle.hxx> |
19 | #include <TColgp_Array1OfPnt.hxx> |
20 | #include <TColgp_HArray1OfPnt.hxx> |
21 | #include <GProp_GProps.hxx> |
22 | class gp_Pnt; |
23 | class TopoDS_Edge; |
24 | |
25 | |
26 | |
27 | //! Computes the global properties of |
28 | //! of polylines represented by set of points. |
29 | //! This class is used for computation of global |
30 | //! properties of edge, which has no exact geometry |
31 | //! (3d or 2d curve), but has any of allowed |
32 | //! polygons. |
33 | //! |
34 | class BRepGProp_MeshCinert : public GProp_GProps |
35 | { |
36 | public: |
37 | |
38 | DEFINE_STANDARD_ALLOC |
39 | |
40 | |
41 | Standard_EXPORT BRepGProp_MeshCinert(); |
42 | |
43 | Standard_EXPORT void SetLocation (const gp_Pnt& CLocation); |
44 | |
45 | //! Computes the global properties of |
46 | //! of polylines represented by set of points. |
47 | Standard_EXPORT void Perform(const TColgp_Array1OfPnt& theNodes); |
48 | |
49 | //! Prepare set of 3d points on base of any available edge polygons: |
50 | //! 3D polygon, polygon on triangulation, 2d polygon on surface |
51 | //! If edge has no polygons, array thePolyg is left unchanged |
52 | Standard_EXPORT static void PreparePolygon(const TopoDS_Edge& theE, Handle(TColgp_HArray1OfPnt)& thePolyg); |
53 | |
54 | protected: |
55 | |
56 | |
57 | |
58 | |
59 | |
60 | private: |
61 | |
62 | |
63 | |
64 | |
65 | }; |
66 | |
67 | #endif // _BRepGProp_MeshCinert_HeaderFile |