Version: 9.12.0
GEOMUtils.hxx File Reference
#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopAbs.hxx>
#include <gp_Ax3.hxx>
#include <gp_Vec.hxx>
#include <V3d_View.hxx>
#include <NCollection_DataMap.hxx>
#include <functional>
#include <map>
#include <vector>
#include <string>
#include <utility>

Go to the source code of this file.

Classes

struct  GEOMUtils::CompareShapes
 Sort shapes in the list by their coordinates. More...
 

Namespaces

 GEOMUtils
 

Typedefs

typedef std::vector< std::string > GEOMUtils::NodeLinks
 
typedef std::map< std::string, NodeLinks > GEOMUtils::LevelInfo
 
typedef std::vector< LevelInfo > GEOMUtils::LevelsList
 
typedef std::map< std::string, std::pair< LevelsList, LevelsList > > GEOMUtils::TreeModel
 

Enumerations

enum  GEOMUtils::ComparisonCondition { GEOMUtils::CC_GT , GEOMUtils::CC_GE , GEOMUtils::CC_LT , GEOMUtils::CC_LE }
 This enumeration represents comparison conditions. More...
 

Functions

Standard_Boolean IsEqual (const TopoDS_Shape &S1, const TopoDS_Shape &S2)
 
Standard_EXPORT std::pair< double, double > GEOMUtils::ShapeToDouble (const TopoDS_Shape &theShape, bool isOldSorting=false)
 Compute numerical functor for the shape. More...
 
Standard_EXPORT gp_Ax3 GEOMUtils::GetPosition (const TopoDS_Shape &theShape)
 Get Local Coordinate System, corresponding to the given shape. More...
 
Standard_EXPORT gp_Vec GEOMUtils::GetVector (const TopoDS_Shape &theShape, Standard_Boolean doConsiderOrientation)
 Get vector, defined by the given edge. More...
 
Standard_EXPORT void GEOMUtils::SortShapes (TopTools_ListOfShape &SL, const Standard_Boolean isOldSorting=Standard_True)
 Sort shapes by their centers of mass, using formula X*999 + Y*99 + Z*0.9. More...
 
Standard_EXPORT TopoDS_Shape GEOMUtils::CompsolidToCompound (const TopoDS_Shape &theCompsolid)
 Convert TopoDS_COMPSOLID to TopoDS_COMPOUND. More...
 
Standard_EXPORT void GEOMUtils::AddSimpleShapes (const TopoDS_Shape &theShape, TopTools_ListOfShape &theList)
 Recursively extract all shapes from compounds and compsolids of the given shape into theList. More...
 
Standard_EXPORT bool GEOMUtils::CheckTriangulation (const TopoDS_Shape &theShape)
 Build a triangulation on theShape if it is absent. More...
 
Standard_EXPORT TopAbs_ShapeEnum GEOMUtils::GetTypeOfSimplePart (const TopoDS_Shape &theShape)
 Return type of shape for explode. In case of compound it will be a type of its first sub shape. More...
 
Standard_EXPORT TopoDS_Shape GEOMUtils::GetEdgeNearPoint (const TopoDS_Shape &theShape, const TopoDS_Vertex &thePoint)
 Find an edge of theShape, closest to thePoint. More...
 
Standard_EXPORT Standard_Boolean GEOMUtils::PreciseBoundingBox (const TopoDS_Shape &theShape, Bnd_Box &theBox)
 Compute precise bounding box of the shape based on the rough bounding box. More...
 
Standard_EXPORT Standard_Real GEOMUtils::GetMinDistanceSingular (const TopoDS_Shape &aSh1, const TopoDS_Shape &aSh2, gp_Pnt &Ptmp1, gp_Pnt &Ptmp2)
 Computes minumal distance between two shapes for singular cases (workaround for bugs 19899, 19908 and 19910 from Mantis). More...
 
Standard_EXPORT Standard_Real GEOMUtils::GetMinDistance (const TopoDS_Shape &theShape1, const TopoDS_Shape &theShape2, gp_Pnt &thePnt1, gp_Pnt &thePnt2)
 Computes minumal distance between two shapes. More...
 
Standard_EXPORT gp_Pnt GEOMUtils::ProjectPointOnFace (const gp_Pnt &thePoint, const TopoDS_Shape &theFace, double &theU, double &theV, const double theTol=1e-04)
 Computes normal projection of thePoint to theFace. More...
 
Standard_EXPORT gp_Pnt GEOMUtils::ConvertClickToPoint (int x, int y, Handle(V3d_View) theView)
 Returns the point clicked in 3D view. More...
 
Standard_EXPORT void GEOMUtils::ConvertTreeToString (const TreeModel &tree, std::string &dependencyStr)
 Convert dependency tree data to the string representation. More...
 
Standard_EXPORT void GEOMUtils::ConvertStringToTree (const std::string &dependencyStr, TreeModel &tree)
 Restore dependency tree data from the string representation. More...
 
Standard_EXPORT bool GEOMUtils::CheckShape (TopoDS_Shape &shape, bool checkGeometry=false)
 Check shape. More...
 
Standard_EXPORT bool GEOMUtils::CheckBOPArguments (const TopoDS_Shape &theShape)
 Check boolean and partition operations arguments. More...
 
Standard_EXPORT bool GEOMUtils::FixShapeTolerance (TopoDS_Shape &shape, TopAbs_ShapeEnum type, Standard_Real tolerance=Precision::Confusion(), bool checkGeometry=false)
 Limit shape tolerance to the given value. More...
 
Standard_EXPORT bool GEOMUtils::FixShapeTolerance (TopoDS_Shape &shape, Standard_Real tolerance=Precision::Confusion(), bool checkGeometry=false)
 Limit shape tolerance to the given value This is overloaded function, it behaves exactly as previous one. More...
 
Standard_EXPORT bool GEOMUtils::FixShapeTolerance (TopoDS_Shape &shape, bool checkGeometry)
 Limit shape tolerance to the given value This is overloaded function, it behaves exactly as previous one. More...
 
Standard_EXPORT bool GEOMUtils::FixShapeCurves (TopoDS_Shape &shape)
 Fix curves of the given shape. More...
 
Standard_EXPORT bool GEOMUtils::Write (const TopoDS_Shape &shape, const char *fileName)
 Write shape to the BREP file. More...
 
Standard_EXPORT TopoDS_Shape GEOMUtils::ReduceCompound (const TopoDS_Shape &shape)
 Extract single SOLID from COMPSOLID or COMPOUND. More...
 
Standard_EXPORT void GEOMUtils::MeshShape (const TopoDS_Shape shape, double deflection, bool forced=true)
 Generate triangulation for the shape. More...
 
Standard_EXPORT double GEOMUtils::DefaultDeflection ()
 Get default deflection coefficient used for triangulation. More...
 
Standard_EXPORT bool GEOMUtils::IsOpenPath (const TopoDS_Shape &theShape)
 Check if the shape is not a closed wire or edge. More...
 
Standard_EXPORT int GEOMUtils::CompareToleranceValues (const double theTolShape, const double theTolRef)
 This function compares two tolerances. More...
 
Standard_EXPORT bool GEOMUtils::IsFitCondition (const ComparisonCondition theCondition, const double theTolShape, const double theTolRef)
 Check if the comarison of tolerances fit the condition. More...
 

Function Documentation

◆ IsEqual()

Standard_Boolean IsEqual ( const TopoDS_Shape &  S1,
const TopoDS_Shape &  S2 
)
inline