For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Surface's Length

Anonymous's picture

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's picture

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.

Yass's picture

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".

Rob Bachrach's picture

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.

Yass's picture

Thank You Rob !!
It works perfectly.

Yass's picture

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 !!

Rob Bachrach's picture

Try the following:

GProp_GProps myProps;
BRepGProp::SurfaceProperties(myFace, myProps);
Standard_Real area = myProps.Mass();

Yass's picture

Thank you Rob !
It's done and it works now !

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.