File indexing completed on 2026-10-04 09:13:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepAlgo_NormalProjection_HeaderFile
0018 #define _BRepAlgo_NormalProjection_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022
0023 #include <TopoDS_Shape.hxx>
0024 #include <GeomAbs_Shape.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TopTools_ShapeMapHasher.hxx>
0027 #include <NCollection_DataMap.hxx>
0028 #include <NCollection_List.hxx>
0029 class TopoDS_Edge;
0030 class Adaptor3d_Curve;
0031
0032
0033
0034 class BRepAlgo_NormalProjection
0035 {
0036 public:
0037 DEFINE_STANDARD_ALLOC
0038
0039 Standard_EXPORT BRepAlgo_NormalProjection();
0040
0041 Standard_EXPORT BRepAlgo_NormalProjection(const TopoDS_Shape& S);
0042
0043 Standard_EXPORT void Init(const TopoDS_Shape& S);
0044
0045
0046 Standard_EXPORT void Add(const TopoDS_Shape& ToProj);
0047
0048
0049
0050
0051
0052
0053
0054
0055 Standard_EXPORT void SetParams(const double Tol3D,
0056 const double Tol2D,
0057 const GeomAbs_Shape InternalContinuity,
0058 const int MaxDegree,
0059 const int MaxSeg);
0060
0061
0062
0063 Standard_EXPORT void SetDefaultParams();
0064
0065
0066
0067
0068
0069 Standard_EXPORT void SetMaxDistance(const double MaxDist);
0070
0071
0072
0073 Standard_EXPORT void Compute3d(const bool With3d = true);
0074
0075
0076 Standard_EXPORT void SetLimit(const bool FaceBoundaries = true);
0077
0078
0079 Standard_EXPORT void Build();
0080
0081 Standard_EXPORT bool IsDone() const;
0082
0083
0084 Standard_EXPORT const TopoDS_Shape& Projection() const;
0085
0086
0087 Standard_EXPORT const TopoDS_Shape& Ancestor(const TopoDS_Edge& E) const;
0088
0089
0090 Standard_EXPORT const TopoDS_Shape& Couple(const TopoDS_Edge& E) const;
0091
0092
0093
0094 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Generated(const TopoDS_Shape& S);
0095
0096 Standard_EXPORT bool IsElementary(const Adaptor3d_Curve& C) const;
0097
0098
0099
0100 Standard_EXPORT bool BuildWire(NCollection_List<TopoDS_Shape>& Liste) const;
0101
0102 private:
0103 TopoDS_Shape myShape;
0104 bool myIsDone;
0105 double myTol3d;
0106 double myTol2d;
0107 double myMaxDist;
0108 bool myWith3d;
0109 GeomAbs_Shape myContinuity;
0110 int myMaxDegree;
0111 int myMaxSeg;
0112 bool myFaceBounds;
0113 TopoDS_Shape myToProj;
0114 NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> myAncestorMap;
0115 NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> myCorresp;
0116 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0117 myDescendants;
0118 TopoDS_Shape myRes;
0119 };
0120
0121 #endif