Hi everyone,
I want to know if someone can help !
I'm trying to calculate a surface length. Is there a method or any suggestion?
Thank you.
Rob Bachrach Tue, 01/04/2005 - 16:57
I am not sure what you mean by surface length.
If you are looking for the surface area, you can
use BRepGProp::SurfaceProperties. The Mass function
on the GProp_GProps object will contain the area.
If you are not referring to the area, please clarify what
you mean by the length.
In that case, my previous response should give what you want.
Just pass in a TopoDS_Face as the shape. You can also pass in
a shell or solid and the result will be the sum of the areas of
all faces.
I was wrong, it ask me to enter an SGProps for the mass. I don't know how to use it cause ther's no header file for this class.
BRepGProp::SurfaceProperties(S : Shape, SProps : in out GProps)
Mass(me) ----> returns an area if it's an SGProps.
Tue, 01/04/2005 - 16:57
I am not sure what you mean by surface length.
If you are looking for the surface area, you can
use BRepGProp::SurfaceProperties. The Mass function
on the GProp_GProps object will contain the area.
If you are not referring to the area, please clarify what
you mean by the length.
Tue, 01/04/2005 - 17:27
Hi Rob,
I'm looking for the area (sorry for my bad english) as for a rectangle is : width * length. I think the correct name is "area".
Tue, 01/04/2005 - 17:41
In that case, my previous response should give what you want.
Just pass in a TopoDS_Face as the shape. You can also pass in
a shell or solid and the result will be the sum of the areas of
all faces.
Tue, 01/04/2005 - 18:19
Thank You Rob !!
It works perfectly.
Tue, 01/04/2005 - 19:13
I was wrong, it ask me to enter an SGProps for the mass. I don't know how to use it cause ther's no header file for this class.
BRepGProp::SurfaceProperties(S : Shape, SProps : in out GProps)
Mass(me) ----> returns an area if it's an SGProps.
Please Help !!
Tue, 01/04/2005 - 19:21
Try the following:
GProp_GProps myProps;
BRepGProp::SurfaceProperties(myFace, myProps);
Standard_Real area = myProps.Mass();
Wed, 01/05/2005 - 12:58
Thank you Rob !
It's done and it works now !