File indexing completed on 2025-01-18 10:03:11
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
0037 DEFINE_STANDARD_ALLOC;
0038
0039
0040 Standard_EXPORT BRepFill_AdvancedEvolved() :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
0062 {
0063 return myResult;
0064 }
0065
0066
0067 void SetTemporaryDirectory(const Standard_CString& thePath)
0068 {
0069 myDebugShapesPath = thePath;
0070 }
0071
0072
0073 void SetParallelMode(const Standard_Boolean theVal)
0074 {
0075 myIsParallel = theVal;
0076 }
0077
0078 protected:
0079
0080 Standard_EXPORT void PerformSweep();
0081
0082 Standard_EXPORT void GetLids();
0083
0084 Standard_EXPORT void BuildSolid();
0085
0086 Standard_EXPORT void RemoveExcessSolids(const TopTools_ListOfShape& theLSplits,
0087 const TopoDS_Shape& theShape,
0088 TopTools_ListOfShape& theArgsList,
0089 BOPAlgo_MakerVolume& theMV);
0090
0091 Standard_EXPORT void ExtractOuterSolid(TopoDS_Shape& theShape,
0092 TopTools_ListOfShape& theArgsList);
0093
0094 Standard_EXPORT void GetSpineAndProfile(const TopoDS_Wire& theSpine,
0095 const TopoDS_Wire& theProfile);
0096
0097 Standard_EXPORT void UnifyShape();
0098
0099 Standard_EXPORT Standard_Boolean PerformBoolean(const TopTools_ListOfShape& theArgsList,
0100 TopoDS_Shape& theResult) const;
0101
0102 Standard_EXPORT Standard_Boolean CheckSingularityAndAdd(const TopoDS_Face& theF,
0103 const Standard_Real theFuzzyToler,
0104 TopTools_ListOfShape& theListOfFaces,
0105 TopTools_ListOfShape& theListOfSplits) const;
0106
0107 Standard_EXPORT Standard_Boolean IsLid(const TopoDS_Face& theF,
0108 const TopTools_IndexedMapOfShape& theMapOfLids) const;
0109
0110 private:
0111
0112 enum
0113 {
0114 BRepFill_AdvancedEvolved_Empty = 0,
0115 BRepFill_AdvancedEvolved_NotPlanarSpine,
0116 BRepFill_AdvancedEvolved_SweepError,
0117 BRepFill_AdvancedEvolved_NoLids,
0118 BRepFill_AdvancedEvolved_NotSolid,
0119 BRepFill_AdvancedEvolved_NotVolume,
0120 BRepFill_AdvancedEvolved_OK = UINT_MAX
0121 } myErrorStatus;
0122
0123 TopoDS_Wire mySpine;
0124 TopoDS_Wire myProfile;
0125 TopoDS_Shape myPipeShell;
0126 TopoDS_Compound myTopBottom;
0127 TopoDS_Shape myResult;
0128 Standard_Real myFuzzyValue;
0129 Standard_Boolean myIsParallel;
0130 Standard_CString myDebugShapesPath;
0131
0132 };
0133
0134
0135
0136
0137
0138
0139
0140 #endif