File indexing completed on 2026-09-23 09:16:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepFill_Sweep_HeaderFile
0018 #define _BRepFill_Sweep_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <GeomFill_ApproxStyle.hxx>
0025 #include <GeomAbs_Shape.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <TopoDS_Shape.hxx>
0028 #include <TopTools_ShapeMapHasher.hxx>
0029 #include <NCollection_DataMap.hxx>
0030 #include <NCollection_List.hxx>
0031 #include <TopoDS_Wire.hxx>
0032 #include <NCollection_Map.hxx>
0033 #include <NCollection_Array2.hxx>
0034 #include <NCollection_HArray2.hxx>
0035 #include <BRepFill_TransitionStyle.hxx>
0036 class BRepFill_LocationLaw;
0037 class BRepFill_SectionLaw;
0038 class TopoDS_Edge;
0039
0040
0041
0042
0043 class BRepFill_Sweep
0044 {
0045 public:
0046 DEFINE_STANDARD_ALLOC
0047
0048 Standard_EXPORT BRepFill_Sweep(const occ::handle<BRepFill_SectionLaw>& Section,
0049 const occ::handle<BRepFill_LocationLaw>& Location,
0050 const bool WithKPart);
0051
0052 Standard_EXPORT void SetBounds(const TopoDS_Wire& FirstShape, const TopoDS_Wire& LastShape);
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 Standard_EXPORT void SetTolerance(const double Tol3d,
0064 const double BoundTol = 1.0,
0065 const double Tol2d = 1.0e-5,
0066 const double TolAngular = 1.0e-2);
0067
0068
0069
0070
0071
0072 Standard_EXPORT void SetAngularControl(const double AngleMin = 0.01, const double AngleMax = 6.0);
0073
0074
0075
0076
0077 Standard_EXPORT void SetForceApproxC1(const bool ForceApproxC1);
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093 Standard_EXPORT void Build(NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>& ReversedEdges,
0094 NCollection_DataMap<TopoDS_Shape,
0095 occ::handle<NCollection_HArray2<TopoDS_Shape>>,
0096 TopTools_ShapeMapHasher>& Tapes,
0097 NCollection_DataMap<TopoDS_Shape,
0098 occ::handle<NCollection_HArray2<TopoDS_Shape>>,
0099 TopTools_ShapeMapHasher>& Rails,
0100 const BRepFill_TransitionStyle Transition = BRepFill_Modified,
0101 const GeomAbs_Shape Continuity = GeomAbs_C2,
0102 const GeomFill_ApproxStyle Approx = GeomFill_Location,
0103 const int Degmax = 11,
0104 const int Segmax = 30);
0105
0106
0107 Standard_EXPORT bool IsDone() const;
0108
0109
0110 Standard_EXPORT TopoDS_Shape Shape() const;
0111
0112
0113 Standard_EXPORT double ErrorOnSurface() const;
0114
0115 Standard_EXPORT occ::handle<NCollection_HArray2<TopoDS_Shape>> SubShape() const;
0116
0117 Standard_EXPORT occ::handle<NCollection_HArray2<TopoDS_Shape>> InterFaces() const;
0118
0119 Standard_EXPORT occ::handle<NCollection_HArray2<TopoDS_Shape>> Sections() const;
0120
0121
0122 Standard_EXPORT TopoDS_Shape Tape(const int Index) const;
0123
0124 protected:
0125 Standard_EXPORT bool CorrectApproxParameters();
0126
0127 Standard_EXPORT bool BuildWire(const BRepFill_TransitionStyle Transition);
0128
0129 Standard_EXPORT bool BuildShell(
0130 const BRepFill_TransitionStyle Transition,
0131 const int Vf,
0132 const int Vl,
0133 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>& ReversedEdges,
0134 NCollection_DataMap<TopoDS_Shape,
0135 occ::handle<NCollection_HArray2<TopoDS_Shape>>,
0136 TopTools_ShapeMapHasher>& Tapes,
0137 NCollection_DataMap<TopoDS_Shape,
0138 occ::handle<NCollection_HArray2<TopoDS_Shape>>,
0139 TopTools_ShapeMapHasher>& Rails,
0140 const double ExtendFirst = 0.0,
0141 const double ExtendLast = 0.0);
0142
0143 Standard_EXPORT bool PerformCorner(const int Index,
0144 const BRepFill_TransitionStyle Transition,
0145 const occ::handle<NCollection_HArray2<TopoDS_Shape>>& Bounds);
0146
0147 Standard_EXPORT double EvalExtrapol(const int Index,
0148 const BRepFill_TransitionStyle Transition) const;
0149
0150 Standard_EXPORT bool MergeVertex(const TopoDS_Shape& V1, TopoDS_Shape& V2) const;
0151
0152 Standard_EXPORT void UpdateVertex(const int Ipath,
0153 const int Isec,
0154 const double Error,
0155 const double Param,
0156 TopoDS_Shape& V) const;
0157
0158 Standard_EXPORT void RebuildTopOrBottomEdge(
0159 const TopoDS_Edge& aNewEdge,
0160 TopoDS_Edge& anEdge,
0161 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>& ReversedEdges) const;
0162
0163 private:
0164 bool isDone;
0165 bool KPart;
0166 double myTol3d;
0167 double myBoundTol;
0168 double myTol2d;
0169 double myTolAngular;
0170 double myAngMin;
0171 double myAngMax;
0172 GeomFill_ApproxStyle myApproxStyle;
0173 GeomAbs_Shape myContinuity;
0174 int myDegmax;
0175 int mySegmax;
0176 bool myForceApproxC1;
0177 TopoDS_Shape myShape;
0178 occ::handle<BRepFill_LocationLaw> myLoc;
0179 occ::handle<BRepFill_SectionLaw> mySec;
0180 occ::handle<NCollection_HArray2<TopoDS_Shape>> myUEdges;
0181 occ::handle<NCollection_HArray2<TopoDS_Shape>> myVEdges;
0182 NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> myVEdgesModified;
0183 occ::handle<NCollection_HArray2<TopoDS_Shape>> myFaces;
0184 NCollection_List<TopoDS_Shape> myAuxShape;
0185 occ::handle<NCollection_HArray1<TopoDS_Shape>> myTapes;
0186 double Error;
0187 TopoDS_Wire FirstShape;
0188 TopoDS_Wire LastShape;
0189 };
0190
0191 #endif