File indexing completed on 2026-09-14 09:13:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BRepFill_AdvancedEvolved_HeaderFile
0017 #define _BRepFill_AdvancedEvolved_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022
0023 #include <TopoDS_Compound.hxx>
0024 #include <TopoDS_Wire.hxx>
0025 #include <TopTools_ShapeMapHasher.hxx>
0026 #include <NCollection_IndexedMap.hxx>
0027 #include <TopoDS_Shape.hxx>
0028 #include <NCollection_List.hxx>
0029
0030 class BOPAlgo_MakerVolume;
0031 class TopoDS_Face;
0032
0033
0034
0035 class BRepFill_AdvancedEvolved
0036 {
0037 public:
0038 DEFINE_STANDARD_ALLOC;
0039
0040
0041 Standard_EXPORT BRepFill_AdvancedEvolved()
0042 : myErrorStatus(BRepFill_AdvancedEvolved_Empty),
0043 myFuzzyValue(0.0),
0044 myIsParallel(true),
0045 myDebugShapesPath("C:\\Temp")
0046 {
0047 }
0048
0049 Standard_EXPORT void Perform(const TopoDS_Wire& theSpine,
0050 const TopoDS_Wire& theProfile,
0051 const double theTolerance,
0052 const bool theSolidReq = true);
0053
0054 bool IsDone(unsigned int* theErrorCode = nullptr) const
0055 {
0056 if (theErrorCode)
0057 *theErrorCode = myErrorStatus;
0058
0059 return (myErrorStatus == BRepFill_AdvancedEvolved_OK);
0060 }
0061
0062
0063 const TopoDS_Shape& Shape() const { return myResult; }
0064
0065
0066 void SetTemporaryDirectory(const char* const thePath) { myDebugShapesPath = thePath; }
0067
0068
0069 void SetParallelMode(const bool theVal) { myIsParallel = theVal; }
0070
0071 protected:
0072 Standard_EXPORT void PerformSweep();
0073
0074 Standard_EXPORT void GetLids();
0075
0076 Standard_EXPORT void BuildSolid();
0077
0078 Standard_EXPORT void RemoveExcessSolids(const NCollection_List<TopoDS_Shape>& theLSplits,
0079 const TopoDS_Shape& theShape,
0080 NCollection_List<TopoDS_Shape>& theArgsList,
0081 BOPAlgo_MakerVolume& theMV);
0082
0083 Standard_EXPORT void ExtractOuterSolid(TopoDS_Shape& theShape,
0084 NCollection_List<TopoDS_Shape>& theArgsList);
0085
0086 Standard_EXPORT void GetSpineAndProfile(const TopoDS_Wire& theSpine,
0087 const TopoDS_Wire& theProfile);
0088
0089 Standard_EXPORT void UnifyShape();
0090
0091 Standard_EXPORT bool PerformBoolean(const NCollection_List<TopoDS_Shape>& theArgsList,
0092 TopoDS_Shape& theResult) const;
0093
0094 Standard_EXPORT bool CheckSingularityAndAdd(
0095 const TopoDS_Face& theF,
0096 const double theFuzzyToler,
0097 NCollection_List<TopoDS_Shape>& theListOfFaces,
0098 NCollection_List<TopoDS_Shape>& theListOfSplits) const;
0099
0100 Standard_EXPORT bool IsLid(
0101 const TopoDS_Face& theF,
0102 const NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher>& theMapOfLids) const;
0103
0104 private:
0105 enum
0106 {
0107 BRepFill_AdvancedEvolved_Empty = 0,
0108 BRepFill_AdvancedEvolved_NotPlanarSpine,
0109 BRepFill_AdvancedEvolved_SweepError,
0110 BRepFill_AdvancedEvolved_NoLids,
0111 BRepFill_AdvancedEvolved_NotSolid,
0112 BRepFill_AdvancedEvolved_NotVolume,
0113 BRepFill_AdvancedEvolved_OK = UINT_MAX
0114 } myErrorStatus;
0115
0116 TopoDS_Wire mySpine;
0117 TopoDS_Wire myProfile;
0118 TopoDS_Shape myPipeShell;
0119 TopoDS_Compound myTopBottom;
0120 TopoDS_Shape myResult;
0121 double myFuzzyValue;
0122 bool myIsParallel;
0123 const char* myDebugShapesPath;
0124 };
0125
0126 #endif