File indexing completed on 2026-09-19 09:27:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepFill_PipeShell_HeaderFile
0018 #define _BRepFill_PipeShell_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <TopoDS_Wire.hxx>
0024 #include <TopoDS_Shape.hxx>
0025 #include <BRepFill_Section.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <NCollection_List.hxx>
0028 #include <TopTools_ShapeMapHasher.hxx>
0029 #include <NCollection_DataMap.hxx>
0030 #include <Standard_Integer.hxx>
0031 #include <NCollection_Array2.hxx>
0032 #include <NCollection_HArray2.hxx>
0033 #include <GeomFill_Trihedron.hxx>
0034 #include <BRepFill_TransitionStyle.hxx>
0035 #include <GeomFill_PipeError.hxx>
0036 #include <Standard_Transient.hxx>
0037 #include <BRepFill_TypeOfContact.hxx>
0038 class Law_Function;
0039 class BRepFill_LocationLaw;
0040 class BRepFill_SectionLaw;
0041 class gp_Ax2;
0042 class gp_Dir;
0043 class TopoDS_Vertex;
0044 class gp_Trsf;
0045 class BRepFill_Sweep;
0046
0047
0048
0049
0050 class BRepFill_PipeShell : public Standard_Transient
0051 {
0052
0053 public:
0054
0055
0056 Standard_EXPORT BRepFill_PipeShell(const TopoDS_Wire& Spine);
0057
0058
0059
0060 Standard_EXPORT void Set(const bool Frenet = false);
0061
0062
0063 Standard_EXPORT void SetDiscrete();
0064
0065
0066
0067 Standard_EXPORT void Set(const gp_Ax2& Axe);
0068
0069
0070
0071 Standard_EXPORT void Set(const gp_Dir& BiNormal);
0072
0073
0074
0075
0076
0077 Standard_EXPORT bool Set(const TopoDS_Shape& SpineSupport);
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099 Standard_EXPORT void Set(const TopoDS_Wire& AuxiliarySpine,
0100 const bool CurvilinearEquivalence = true,
0101 const BRepFill_TypeOfContact KeepContact = BRepFill_NoContact);
0102
0103
0104 Standard_EXPORT void SetMaxDegree(const int NewMaxDegree);
0105
0106
0107
0108 Standard_EXPORT void SetMaxSegments(const int NewMaxSegments);
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120 Standard_EXPORT void SetForceApproxC1(const bool ForceApproxC1);
0121
0122
0123
0124
0125 inline void SetIsBuildHistory(const bool theIsBuildHistory)
0126 {
0127 myIsBuildHistory = theIsBuildHistory;
0128 }
0129
0130
0131
0132 inline bool IsBuildHistory() const { return myIsBuildHistory; }
0133
0134
0135 Standard_EXPORT void Add(const TopoDS_Shape& Profile,
0136 const bool WithContact = false,
0137 const bool WithCorrection = false);
0138
0139
0140 Standard_EXPORT void Add(const TopoDS_Shape& Profile,
0141 const TopoDS_Vertex& Location,
0142 const bool WithContact = false,
0143 const bool WithCorrection = false);
0144
0145
0146
0147 Standard_EXPORT void SetLaw(const TopoDS_Shape& Profile,
0148 const occ::handle<Law_Function>& L,
0149 const bool WithContact = false,
0150 const bool WithCorrection = false);
0151
0152
0153
0154 Standard_EXPORT void SetLaw(const TopoDS_Shape& Profile,
0155 const occ::handle<Law_Function>& L,
0156 const TopoDS_Vertex& Location,
0157 const bool WithContact = false,
0158 const bool WithCorrection = false);
0159
0160
0161 Standard_EXPORT void DeleteProfile(const TopoDS_Shape& Profile);
0162
0163
0164
0165 Standard_EXPORT bool IsReady() const;
0166
0167
0168 Standard_EXPORT GeomFill_PipeError GetStatus() const;
0169
0170 Standard_EXPORT void SetTolerance(const double Tol3d = 1.0e-4,
0171 const double BoundTol = 1.0e-4,
0172 const double TolAngular = 1.0e-2);
0173
0174
0175
0176 Standard_EXPORT void SetTransition(const BRepFill_TransitionStyle Mode = BRepFill_Modified,
0177 const double Angmin = 1.0e-2,
0178 const double Angmax = 6.0);
0179
0180
0181
0182 Standard_EXPORT void Simulate(const int NumberOfSection,
0183 NCollection_List<TopoDS_Shape>& Sections);
0184
0185
0186 Standard_EXPORT bool Build();
0187
0188
0189
0190 Standard_EXPORT bool MakeSolid();
0191
0192
0193 Standard_EXPORT const TopoDS_Shape& Shape() const;
0194
0195 Standard_EXPORT double ErrorOnSurface() const;
0196
0197
0198 Standard_EXPORT const TopoDS_Shape& FirstShape() const;
0199
0200
0201 Standard_EXPORT const TopoDS_Shape& LastShape() const;
0202
0203
0204 void Profiles(NCollection_List<TopoDS_Shape>& theProfiles)
0205 {
0206 for (int i = 1; i <= mySeq.Length(); ++i)
0207 theProfiles.Append(mySeq(i).OriginalShape());
0208 }
0209
0210
0211 const TopoDS_Wire& Spine() { return mySpine; }
0212
0213
0214
0215 Standard_EXPORT void Generated(const TopoDS_Shape& S, NCollection_List<TopoDS_Shape>& L);
0216
0217 DEFINE_STANDARD_RTTIEXT(BRepFill_PipeShell, Standard_Transient)
0218
0219 private:
0220 Standard_EXPORT void Prepare();
0221
0222 Standard_EXPORT void Place(const BRepFill_Section& Sec,
0223 TopoDS_Wire& W,
0224 gp_Trsf& Trsf,
0225 double& param);
0226
0227 Standard_EXPORT void ResetLoc();
0228
0229 Standard_EXPORT void BuildHistory(const BRepFill_Sweep& theSweep);
0230
0231 TopoDS_Wire mySpine;
0232 TopoDS_Shape myFirst;
0233 TopoDS_Shape myLast;
0234 TopoDS_Shape myShape;
0235 NCollection_Sequence<BRepFill_Section> mySeq;
0236 NCollection_Sequence<TopoDS_Shape> WSeq;
0237 NCollection_Sequence<int> myIndOfSec;
0238 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0239 myEdgeNewEdges;
0240 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0241 myGenMap;
0242 double myTol3d;
0243 double myBoundTol;
0244 double myTolAngular;
0245 double angmin;
0246 double angmax;
0247 int myMaxDegree;
0248 int myMaxSegments;
0249 bool myForceApproxC1;
0250 occ::handle<Law_Function> myLaw;
0251 bool myIsAutomaticLaw;
0252 occ::handle<BRepFill_LocationLaw> myLocation;
0253 occ::handle<BRepFill_SectionLaw> mySection;
0254 occ::handle<NCollection_HArray2<TopoDS_Shape>> myFaces;
0255 GeomFill_Trihedron myTrihedron;
0256 BRepFill_TransitionStyle myTransition;
0257 GeomFill_PipeError myStatus;
0258 double myErrorOnSurf;
0259 bool myIsBuildHistory;
0260 };
0261
0262 #endif