Classes | |
| struct | ActionData |
| Plugin action data. More... | |
| struct | CompareShapes |
| Sort shapes in the list by their coordinates. More... | |
| class | Hatcher |
| struct | PluginData |
| Plugin data. More... | |
| struct | Range |
| class | Trsf2d |
| class | TrsfCurve2d |
Typedefs | |
| typedef std::vector< std::string > | NodeLinks |
| typedef std::map< std::string, NodeLinks > | LevelInfo |
| typedef std::vector< LevelInfo > | LevelsList |
| typedef std::map< std::string, std::pair< LevelsList, LevelsList > > | TreeModel |
| typedef std::vector< Range > | Distribution |
| typedef std::list< PluginData > | PluginInfo |
| Plugins information. More... | |
Enumerations | |
| enum | ComparisonCondition { CC_GT , CC_GE , CC_LT , CC_LE } |
| This enumeration represents comparison conditions. More... | |
Functions | |
| Standard_EXPORT std::pair< double, double > | ShapeToDouble (const TopoDS_Shape &theShape, bool isOldSorting=false) |
| Compute numerical functor for the shape. More... | |
| Standard_EXPORT gp_Ax3 | GetPosition (const TopoDS_Shape &theShape) |
| Get Local Coordinate System, corresponding to the given shape. More... | |
| Standard_EXPORT gp_Vec | GetVector (const TopoDS_Shape &theShape, Standard_Boolean doConsiderOrientation) |
| Get vector, defined by the given edge. More... | |
| Standard_EXPORT void | 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 | CompsolidToCompound (const TopoDS_Shape &theCompsolid) |
| Convert TopoDS_COMPSOLID to TopoDS_COMPOUND. More... | |
| Standard_EXPORT void | 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 TopAbs_ShapeEnum | 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 TopAbs_ShapeEnum | GetCommonShapeType (const TopoDS_Shape &theShape) |
| Get the common shape type of the top-level shapes contained in the given shape. More... | |
| Standard_EXPORT TopoDS_Shape | GetEdgeNearPoint (const TopoDS_Shape &theShape, const TopoDS_Vertex &thePoint) |
| Find an edge of theShape, closest to thePoint. More... | |
| Standard_EXPORT Standard_Boolean | 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 | 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 | 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 Standard_Real | DistanceToProjectionOnFace (const gp_Pnt &thePoint, const TopoDS_Shape &theFace, const double theTol=1e-04) |
| Computes distance from thePoint to its normal projection on theFace. More... | |
| Standard_EXPORT gp_Pnt | ConvertClickToPoint (int x, int y, Handle(V3d_View) theView) |
| Returns the point clicked in 3D view. More... | |
| Standard_EXPORT void | ConvertTreeToString (const TreeModel &tree, std::string &dependencyStr) |
| Convert dependency tree data to the string representation. More... | |
| Standard_EXPORT void | ConvertStringToTree (const std::string &dependencyStr, TreeModel &tree) |
| Restore dependency tree data from the string representation. More... | |
| Standard_EXPORT bool | CheckShape (TopoDS_Shape &shape, bool checkGeometry=false, bool isExact=false) |
| Check shape. More... | |
| Standard_EXPORT bool | CheckBOPArguments (const TopoDS_Shape &theShape) |
| Check boolean and partition operations arguments. More... | |
| Standard_EXPORT bool | FixShapeTolerance (TopoDS_Shape &shape, TopAbs_ShapeEnum type=TopAbs_SHAPE, Standard_Real tolerance=Precision::Confusion(), bool checkGeometry=false, bool isExactAdjust=false) |
| Limit shape tolerance to the given value. More... | |
| Standard_EXPORT bool | FixShapeCurves (TopoDS_Shape &shape) |
| Fix curves of the given shape. More... | |
| Standard_EXPORT bool | Write (const TopoDS_Shape &shape, const char *fileName) |
| Write shape to the BREP file. More... | |
| Standard_EXPORT TopoDS_Shape | ReduceCompound (const TopoDS_Shape &shape) |
| Extract single SOLID from COMPSOLID or COMPOUND. More... | |
| Standard_EXPORT double | DefaultDeflection () |
| Get default deflection coefficient used for triangulation. More... | |
| Standard_EXPORT bool | MeshShape (const TopoDS_Shape theShape, const double theDeflection=DefaultDeflection(), const bool theForced=true, const double theAngleDeflection=0.5, const bool isRelative=true, const bool doPostCheck=false) |
| Generate triangulation for theShape. More... | |
| Standard_EXPORT bool | CheckTriangulation (const TopoDS_Shape &theShape) |
| Build a triangulation on theShape if it is absent. More... | |
| Standard_EXPORT bool | IsOpenPath (const TopoDS_Shape &theShape) |
| Check if the shape is not a closed wire or edge. More... | |
| Standard_EXPORT int | CompareToleranceValues (const double theTolShape, const double theTolRef) |
| This function compares two tolerances. More... | |
| Standard_EXPORT bool | IsFitCondition (const ComparisonCondition theCondition, const double theTolShape, const double theTolRef) |
| Check if the comarison of tolerances fit the condition. More... | |
| std::map< int, double > | ComputeMeasures (std::list< TopoDS_Shape > shapes, TopAbs_ShapeEnum entity, Range &range) |
| Distribution | ComputeDistribution (TopoDS_Shape shape, TopAbs_ShapeEnum entity, int intervals, Range range) |
| Distribution | ComputeDistribution (std::list< TopoDS_Shape > shapes, TopAbs_ShapeEnum entity, int nbIntervals, Range range) |
| PluginInfo | ReadPluginInfo () |
This class represents a hatcher for topological faces.
This class represents a non-persistent transformation in 2D space. The transformations can be represented as follow :
V1 V2 T XY XY
| a11 a12 a13 | | x | | x'| | a21 a22 a23 | | y | | y'| | 0 0 1 | | 1 | | 1 |
where {V1, V2} defines the vectorial part of the transformation and T defines the translation part of the transformation. This transformation can change the nature of the objects if it is anisotropic.
| typedef std::vector<Range> GEOMUtils::Distribution |
| typedef std::map<std::string, NodeLinks> GEOMUtils::LevelInfo |
| typedef std::vector<LevelInfo> GEOMUtils::LevelsList |
| typedef std::vector<std::string> GEOMUtils::NodeLinks |
| typedef std::list<PluginData> GEOMUtils::PluginInfo |
| typedef std::map<std::string,std::pair<LevelsList,LevelsList> > GEOMUtils::TreeModel |
| void GEOMUtils::AddSimpleShapes | ( | const TopoDS_Shape & | theShape, |
| TopTools_ListOfShape & | theList | ||
| ) |
If theShape is not compound or compsolid, theList will contain only theShape itself.
| theShape | The shape to be exploded. |
| theList | Output parameter. |
References AddSimpleShapes().
| bool GEOMUtils::CheckBOPArguments | ( | const TopoDS_Shape & | theShape | ) |
| theShape | the argument of an operation to be checked |
true if the argument is valid for a boolean or partition operation or false otherwise | bool GEOMUtils::CheckShape | ( | TopoDS_Shape & | shape, |
| bool | checkGeometry = false, |
||
| bool | isExact = false |
||
| ) |
| shape | input shape object |
| checkGeometry | when set to true, causes check of underlying geometry in addition to the topology |
| isExact | when set to true, causes exact check of curves on surfaces |
true if shape is valid or false otherwise | bool GEOMUtils::CheckTriangulation | ( | const TopoDS_Shape & | theShape | ) |
| theShape | The shape to check/build triangulation on. |
| bool | Returns false if the shape has no faces, i.e. impossible to build triangulation. |
References DefaultDeflection(), and MeshShape().
| int GEOMUtils::CompareToleranceValues | ( | const double | theTolShape, |
| const double | theTolRef | ||
| ) |
The shape tolerance (the first argument) is considered less than the reference tolerance (the second argument) if theTolShape < theTolRef - Tolerance(theTolRef). theTolShape is considered greater than theTolRef if theTolShape > theTolRef + Tolerance(theTolRef). Otherwise these tolerances are equal. Tolerance(theTolRef) = theTolRef*DEFAULT_TOLERANCE_TOLERANCE. But this value should not be greated than DEFAULT_MAX_TOLERANCE_TOLERANCE.
| theTolShape | the shape tolerance |
| theTolRef | the reference tolerance |
References aResult, DEFAULT_MAX_TOLERANCE_TOLERANCE, and DEFAULT_TOLERANCE_TOLERANCE.
| TopoDS_Shape GEOMUtils::CompsolidToCompound | ( | const TopoDS_Shape & | theCompsolid | ) |
If the argument shape is not of type TopoDS_COMPSOLID, this method returns it as is.
| theCompsolid | The compsolid to be converted. |
| TopoDS_Shape | Returns the resulting compound. |
| Standard_EXPORT Distribution GEOMUtils::ComputeDistribution | ( | std::list< TopoDS_Shape > | shapes, |
| TopAbs_ShapeEnum | entity, | ||
| int | nbIntervals, | ||
| Range | range | ||
| ) |
| Standard_EXPORT Distribution GEOMUtils::ComputeDistribution | ( | TopoDS_Shape | shape, |
| TopAbs_ShapeEnum | entity, | ||
| int | intervals, | ||
| Range | range | ||
| ) |
References ComputeDistribution().
| Standard_EXPORT std::map< int, double > GEOMUtils::ComputeMeasures | ( | std::list< TopoDS_Shape > | shapes, |
| TopAbs_ShapeEnum | entity, | ||
| Range & | range | ||
| ) |
References GEOMUtils::Range::max, and GEOMUtils::Range::min.
| gp_Pnt GEOMUtils::ConvertClickToPoint | ( | int | x, |
| int | y, | ||
| Handle(V3d_View) | theView | ||
| ) |
| x | The X coordinate in the view. |
| y | The Y coordinate in the view. |
| theView | View where the given point takes place. |
| gp_Pnt | Returns the point clicked in 3D view |
| void GEOMUtils::ConvertStringToTree | ( | const std::string & | dependencyStr, |
| TreeModel & | tree | ||
| ) |
| dependencyStr | string representation of tree data |
| tree | output dependency tree data |
| void GEOMUtils::ConvertTreeToString | ( | const TreeModel & | tree, |
| std::string & | dependencyStr | ||
| ) |
| tree | dependency tree data |
| dependencyStr | output string |
| double GEOMUtils::DefaultDeflection | ( | ) |
References DefaultDeflection().
| Standard_Real GEOMUtils::DistanceToProjectionOnFace | ( | const gp_Pnt & | thePoint, |
| const TopoDS_Shape & | theFace, | ||
| const double | theTol = 1e-04 |
||
| ) |
| thePoint | the 3d point |
| theFace | the face shape |
| theTol | the tolerance value. Maximum of theTol and 1e-04 will be used for calculation. |
| distance | from thePoint to the projection point. If projection point is not found or is OUT of face boundary, -1 is returned. |
References Handle().
| bool GEOMUtils::FixShapeCurves | ( | TopoDS_Shape & | shape | ) |
The function checks each curve of the input shape in the following way:
| shape | shape being fixed |
true if resulting shape is valid References CheckShape().
| bool GEOMUtils::FixShapeTolerance | ( | TopoDS_Shape & | shape, |
| TopAbs_ShapeEnum | type = TopAbs_SHAPE, |
||
| Standard_Real | tolerance = Precision::Confusion(), |
||
| bool | checkGeometry = false, |
||
| bool | isExactAdjust = false |
||
| ) |
| shape | shape being fixed |
| type | topology type which tolerance is to be limited; TopAbs_SHAPE means all types of topology |
| tolerance | expected tolerance value (1e-7 by default) |
| checkGeometry | check geometry validity of result |
true if resulting shape is validtrue to checkGeometry parameter References CheckShape(), and Handle().
| TopAbs_ShapeEnum GEOMUtils::GetCommonShapeType | ( | const TopoDS_Shape & | theShape | ) |
In contrast to GetTypeOfSimplePart(), this function returns the common type of the top-level sub-shapes of the COMPOUND, if there are multiple sub-shapes. If there is no common shape type for the same COMPOUND, the generic SHAPE value is returned.
| theShape | The shape to get common type of. |
| TopAbs_ShapeEnum | Returns the common shape type. |
References GetCommonShapeType().
| TopoDS_Shape GEOMUtils::GetEdgeNearPoint | ( | const TopoDS_Shape & | theShape, |
| const TopoDS_Vertex & | thePoint | ||
| ) |
| theShape | The shape to explore. |
| thePoint | The point near the required edge. |
| TopoDS_Shape | Returns the found edge or an empty shape if multiple edges found. |
References aResult.
| Standard_Real GEOMUtils::GetMinDistance | ( | const TopoDS_Shape & | theShape1, |
| const TopoDS_Shape & | theShape2, | ||
| gp_Pnt & | thePnt1, | ||
| gp_Pnt & | thePnt2 | ||
| ) |
| theShape1 | the first shape |
| theShape2 | the second shape |
| thePnt1 | the output result point on the first shape |
| thePnt2 | the output result point on the second shape |
| negative | value in case of failure; otherwise the real distance. |
References aResult.
| gp_Ax3 GEOMUtils::GetPosition | ( | const TopoDS_Shape & | theShape | ) |
Origin of the LCS is situated at the shape's center of mass. Axes of the LCS are obtained from shape's location or, if the shape is a planar face, from position of its plane.
References aResult, GetTypeOfSimplePart(), and Handle().
| TopAbs_ShapeEnum GEOMUtils::GetTypeOfSimplePart | ( | const TopoDS_Shape & | theShape | ) |
| theShape | The shape to get type of. |
| TopAbs_ShapeEnum | Return type of shape for explode. |
References GetTypeOfSimplePart().
| gp_Vec GEOMUtils::GetVector | ( | const TopoDS_Shape & | theShape, |
| Standard_Boolean | doConsiderOrientation | ||
| ) |
| theShape | The edge. |
| doConsiderOrientation | If True, take into account the edge orientation. |
References GEOM::Vertices.
| bool GEOMUtils::IsFitCondition | ( | const ComparisonCondition | theCondition, |
| const double | theTolShape, | ||
| const double | theTolRef | ||
| ) |
The comparison of tolerances is performed using the function CompareToleranceValues.
| theCondition | the condition |
| theTolShape | the shape tolerance |
| theTolRef | the reference tolerance |
References CC_GE, CC_GT, CC_LE, CC_LT, and CompareToleranceValues().
| bool GEOMUtils::IsOpenPath | ( | const TopoDS_Shape & | theShape | ) |
This function is used for pipe creation algorithm to test if the pipe path is not closed. It returns false if theShape is a wire or an edge with coincident end vertices. Otherwise it returns true.
| theShape | the shape to be tested. |
References GEOM::Vertices.
| bool GEOMUtils::MeshShape | ( | const TopoDS_Shape | theShape, |
| const double | theDeflection = DefaultDeflection(), |
||
| const bool | theForced = true, |
||
| const double | theAngleDeflection = 0.5, |
||
| const bool | isRelative = true, |
||
| const bool | doPostCheck = false |
||
| ) |
| theShape | shape to be meshed. |
| theDeflection | deflection coefficient to be used. |
| theForced | if true, causes generation of mesh regardless it is already present in the shape. |
| theAngleDeflection | angular deflection coefficient to be used. |
| isRelative | if true, theDeflection is considered relative to theShape maximum axial dimension. |
| doPostCheck | if true, check mesh generation result and return corresponding boolean value. |
| bool | Returns false in the following cases:
|
References MeshShape().
| Standard_Boolean GEOMUtils::PreciseBoundingBox | ( | const TopoDS_Shape & | theShape, |
| Bnd_Box & | theBox | ||
| ) |
| theShape | the shape. |
| theBox | rough bounding box on input; precise bounding box on output. |
| Standard_True | in case of success; Standard_False otherwise. |
References GetMinDistance().
| gp_Pnt GEOMUtils::ProjectPointOnFace | ( | const gp_Pnt & | thePoint, |
| const TopoDS_Shape & | theFace, | ||
| double & | theU, | ||
| double & | theV, | ||
| const double | theTol = 1e-04 |
||
| ) |
| thePoint | the 3d point |
| theFace | the face shape |
| theU | the output U parameter of the point on the face |
| theV | the output V parameter of the point on the face |
| theTol | the tolerance value. Maximum of theTol and 1e-04 will be used for calculation. |
| the | projection (3d point) if found, throws an exception otherwise |
References Handle().
| Standard_EXPORT PluginInfo GEOMUtils::ReadPluginInfo | ( | ) |
References GEOMUtils::ActionData::accel, GEOMUtils::PluginData::actions, GEOMUtils::PluginData::clientLib, GEOMUtils::ActionData::icon, GEOMUtils::ActionData::label, GEOMUtils::ActionData::menuText, GEOMUtils::PluginData::name, GEOMUtils::PluginData::serverLib, GEOMUtils::ActionData::statusText, and GEOMUtils::ActionData::toolTip.
| TopoDS_Shape GEOMUtils::ReduceCompound | ( | const TopoDS_Shape & | shape | ) |
If the argument shape is a COMPOUND or COMPSOLID and there's only single simple-shape type inside, this sub-shape is returned as a result; otherwise, the shape is not changed.
| shape | compound or compsolid being processed. |
| TopoDS_Shape | resulting shape |
References ReduceCompound().
| std::pair< double, double > GEOMUtils::ShapeToDouble | ( | const TopoDS_Shape & | theShape, |
| bool | isOldSorting = false |
||
| ) |
Resulting value can be used to sort out shapes according to some parameter.
Returns a pair of two values (dist, functor) where
The numerical functor is computed according to the shape's topological properties as follows:
If isOldSorting parameter is set to true, for all cases linear properties of the shape are used (to support backward compatibility in some methods). By default, this parameter is set to false.
| void GEOMUtils::SortShapes | ( | TopTools_ListOfShape & | SL, |
| const Standard_Boolean | isOldSorting = Standard_True |
||
| ) |
| bool GEOMUtils::Write | ( | const TopoDS_Shape & | shape, |
| const char * | fileName | ||
| ) |