
Re: How to get the height of a cylinder using IFace::ISurface::CylinderParams ?
Daniel Seaman Oct 9, 2014 9:32 AM (in response to Edgar Quintana)Hi Edgar,
The ISurface object defines the infinite cylinder from which your cylindrical face is trimmed. To calculate the height of the cylinder you need to look at the edges which terminate the cylinder at the top and bottom.
The exact process will vary considerably depending on how the cylinder is terminated. For the simple case of finding the distance between to parallel circular edges you would use IFace2:GetEdges to get hold of the two edges, pick a point on one edge and then use IEdge::GetClosestPointOn to find the closest point on the other edge. You then need to subtract one point from the other to get the vector distance between them.
If your cylinder is terminated by multiple circular and elliptical section edges then you might find it easier to start from IFace2::GetFirstLoop to group together the edges which make up each end of the cylinder.
Regards,
Dan

Re: How to get the height of a cylinder using IFace::ISurface::CylinderParams ?
Josh Brady Oct 9, 2014 9:10 PM (in response to Edgar Quintana)Assuming your cylinder is complete (like not a halfcylinder), you can take the face area and divide by the circumference. It's a little bit shortcutty, but worked pretty well for me once.

Re: How to get the height of a cylinder using IFace::ISurface::CylinderParams ?
Edgar Quintana Oct 29, 2014 3:40 PM (in response to Edgar Quintana)I wish i could make both answer correct !!!

Re: How to get the height of a cylinder using IFace::ISurface::CylinderParams ?
Daniel Seaman Nov 3, 2014 1:17 PM (in response to Edgar Quintana)Josh's answer is much better than mine for a full cylinder with parallel ends. It will be quicker to implement and execute too.
Josh, have some mention points as compensation. Josh Brady
Dan
