23 #ifndef _GEOMUtils_HXX_
24 #define _GEOMUtils_HXX_
26 #include <Standard_Macro.hxx>
27 #include <TopoDS_Shape.hxx>
28 #include <TopoDS_Vertex.hxx>
30 #include <TopTools_ListOfShape.hxx>
37 #include <V3d_View.hxx>
39 #include <NCollection_DataMap.hxx>
50 inline Standard_Boolean
IsEqual (
const TopoDS_Shape& S1,
const TopoDS_Shape& S2)
71 typedef std::map<std::string,std::pair<LevelsList,LevelsList> >
TreeModel;
92 Standard_EXPORT std::pair<double, double>
ShapeToDouble (
const TopoDS_Shape& theShape,
93 bool isOldSorting =
false);
102 Standard_EXPORT gp_Ax3
GetPosition (
const TopoDS_Shape& theShape);
112 Standard_EXPORT gp_Vec
GetVector (
const TopoDS_Shape& theShape,
113 Standard_Boolean doConsiderOrientation);
119 struct CompareShapes :
public std::binary_function<TopoDS_Shape, TopoDS_Shape, bool>
124 bool operator() (
const TopoDS_Shape& lhs,
const TopoDS_Shape& rhs);
134 Standard_EXPORT
void SortShapes (TopTools_ListOfShape& SL,
135 const Standard_Boolean isOldSorting = Standard_True);
156 TopTools_ListOfShape& theList);
179 Standard_EXPORT TopoDS_Shape
GetEdgeNearPoint (
const TopoDS_Shape& theShape,
180 const TopoDS_Vertex& thePoint);
189 Standard_EXPORT Standard_Boolean
PreciseBoundingBox(
const TopoDS_Shape &theShape, Bnd_Box &theBox);
202 const TopoDS_Shape& aSh2,
203 gp_Pnt& Ptmp1, gp_Pnt& Ptmp2);
214 Standard_EXPORT Standard_Real
GetMinDistance(
const TopoDS_Shape& theShape1,
215 const TopoDS_Shape& theShape2,
216 gp_Pnt& thePnt1, gp_Pnt& thePnt2);
235 std::string& dependencyStr );
254 Standard_EXPORT
bool CheckShape( TopoDS_Shape& shape,
bool checkGeometry =
false );
281 TopAbs_ShapeEnum type,
282 Standard_Real tolerance = Precision::Confusion(),
283 bool checkGeometry =
false );
290 Standard_Real tolerance = Precision::Confusion(),
291 bool checkGeometry =
false );
298 bool checkGeometry );
320 Standard_EXPORT
bool Write(
const TopoDS_Shape& shape,
321 const char* fileName );
333 Standard_EXPORT TopoDS_Shape
ReduceCompound(
const TopoDS_Shape& shape );
342 Standard_EXPORT
void MeshShape(
const TopoDS_Shape shape,
343 double deflection,
bool forced =
true );
361 Standard_EXPORT
bool IsOpenPath(
const TopoDS_Shape &theShape);
378 const double theTolRef);
390 const double theTolShape,
391 const double theTolRef);