File indexing completed on 2026-06-16 08:28:02
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_IndexedMapOfShape.hxx>
0026 #include <TopTools_ListOfShape.hxx>
0027
0028 class BOPAlgo_MakerVolume;
0029 class TopoDS_Face;
0030
0031
0032
0033 class BRepFill_AdvancedEvolved
0034 {
0035 public:
0036 DEFINE_STANDARD_ALLOC;
0037
0038
0039 Standard_EXPORT BRepFill_AdvancedEvolved()
0040 : myErrorStatus(BRepFill_AdvancedEvolved_Empty),
0041 myFuzzyValue(0.0),
0042 myIsParallel(Standard_True),
0043 myDebugShapesPath("C:\\Temp")
0044 {
0045 }
0046
0047 Standard_EXPORT void Perform(const TopoDS_Wire& theSpine,
0048 const TopoDS_Wire& theProfile,
0049 const Standard_Real theTolerance,
0050 const Standard_Boolean theSolidReq = Standard_True);
0051
0052 Standard_Boolean IsDone(unsigned int* theErrorCode = 0) const
0053 {
0054 if (theErrorCode)
0055 *theErrorCode = myErrorStatus;
0056
0057 return (myErrorStatus == BRepFill_AdvancedEvolved_OK);
0058 }
0059
0060
0061 const TopoDS_Shape& Shape() const { return myResult; }
0062
0063
0064 void SetTemporaryDirectory(const Standard_CString& thePath) { myDebugShapesPath = thePath; }
0065
0066
0067 void SetParallelMode(const Standard_Boolean theVal) { myIsParallel = theVal; }
0068
0069 protected:
0070 Standard_EXPORT void PerformSweep();
0071
0072 Standard_EXPORT void GetLids();
0073
0074 Standard_EXPORT void BuildSolid();
0075
0076 Standard_EXPORT void RemoveExcessSolids(const TopTools_ListOfShape& theLSplits,
0077 const TopoDS_Shape& theShape,
0078 TopTools_ListOfShape& theArgsList,
0079 BOPAlgo_MakerVolume& theMV);
0080
0081 Standard_EXPORT void ExtractOuterSolid(TopoDS_Shape& theShape, TopTools_ListOfShape& theArgsList);
0082
0083 Standard_EXPORT void GetSpineAndProfile(const TopoDS_Wire& theSpine,
0084 const TopoDS_Wire& theProfile);
0085
0086 Standard_EXPORT void UnifyShape();
0087
0088 Standard_EXPORT Standard_Boolean PerformBoolean(const TopTools_ListOfShape& theArgsList,
0089 TopoDS_Shape& theResult) const;
0090
0091 Standard_EXPORT Standard_Boolean
0092 CheckSingularityAndAdd(const TopoDS_Face& theF,
0093 const Standard_Real theFuzzyToler,
0094 TopTools_ListOfShape& theListOfFaces,
0095 TopTools_ListOfShape& theListOfSplits) const;
0096
0097 Standard_EXPORT Standard_Boolean IsLid(const TopoDS_Face& theF,
0098 const TopTools_IndexedMapOfShape& theMapOfLids) const;
0099
0100 private:
0101 enum
0102 {
0103 BRepFill_AdvancedEvolved_Empty = 0,
0104 BRepFill_AdvancedEvolved_NotPlanarSpine,
0105 BRepFill_AdvancedEvolved_SweepError,
0106 BRepFill_AdvancedEvolved_NoLids,
0107 BRepFill_AdvancedEvolved_NotSolid,
0108 BRepFill_AdvancedEvolved_NotVolume,
0109 BRepFill_AdvancedEvolved_OK = UINT_MAX
0110 } myErrorStatus;
0111
0112 TopoDS_Wire mySpine;
0113 TopoDS_Wire myProfile;
0114 TopoDS_Shape myPipeShell;
0115 TopoDS_Compound myTopBottom;
0116 TopoDS_Shape myResult;
0117 Standard_Real myFuzzyValue;
0118 Standard_Boolean myIsParallel;
0119 Standard_CString myDebugShapesPath;
0120 };
0121
0122 #endif