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!
Markus
Kreshnik Thu, 10/05/2006 - 18:52
What do you mean by sise ? Can you put a concrete example ? (Ex: getting the height of a TopoDS_Edge)
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.
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();
Thu, 10/05/2006 - 18:52
What do you mean by sise ? Can you put a concrete example ? (Ex: getting the height of a TopoDS_Edge)
Thu, 10/05/2006 - 19:05
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.
Markus
Fri, 10/06/2006 - 12:44
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();
}
Fri, 10/06/2006 - 12:52
Ahh thanks, that will get me on the right way!!