Symmetry

Hye, I want to find in a solid the axis of symmetry if it (they) exist. The Cascade function GProp_PrincipalProps:: HasSymmetryAxis() allow to know if an axis of symmetry exist but not determine the axis of symmetry. I don't remember properties of inertial matrice which allow to answer this question. Can you help me.

I try the cascade function GProp_PrincipalProps:: HasSymmetryPoint() in case of spherical solid and the answer is no? has this function a problem (I use the Cascade version 2.1).

Thanks

Igor Feoktistov's picture

Hello, Karine

to get axes of symmetry there are methods FirstAxisOfInertia(), SecondAxisOfInertia(0 ... of class GProp_PrincipalProps. But to use them you need do something like that:

//Define GProp_GProps

GProp_Gprops G;

//calculate appropriate properties, e. g volume properties for solid

BRepGProp::VolumeProperties(Solid, G);

//define associated GProp_PrincipalProps

GProp_PrincipalProps Pr = G.PrincipalProperties();

if(!Pr.HasSymmetryPoint() ) {

gp_Vec FirstAxis = Pr.FirstAxisOfInertia(); ....

Best regards, Igor