What do you mean by sise ? Can you put a concrete example ? (Ex: getting the height of a TopoDS_Edge)
Archived discussion
Getting the size of a shape
Hello,
i'm new in OpenCascade and have a simple problem. How do i get the size of the shape? The Class itself has no member like "get_XXX" to a size-vector or something else.
Thanks!
Author
Discussion
4 archived replies
Posts are displayed in their archived order.
I'll try to explain in easy words. I have two TopoDS_Shape objects. Now i want to know for example for much one of this shapes is greater than the other one. In height, length, width. I have clue how to get this.
Author
First you have to know what kind of shape it is. For example if you compare two edges, you will have a code like this :
TopoDS_Shape sShape = ...
if(sShape.ShapeType == TopAbs_EDGE)
myEdge=TopoDS::Edge(sShape
}
catch(Standard_Failure)
{
}
if (myEdge.IsNull())
{
Message = "Error : The selected line is invalid";
}
else
{
// Obtention du rayon de la longueur du segment
GProp_GProps myProps;
BRepGProp::LinearProperties(myEdge, myProps);
Standard_Real fLength = myProps.Mass();
}
Ahh thanks, that will get me on the right way!!