Skip to main content
18-Opal
August 25, 2021
Question

How to check the cylindrical shape?

  • August 25, 2021
  • 2 replies
  • 2839 views

Hi,

 

We calculate the outline size of the model through the "ProSolidOutlineCompute" function.

In the case of a cylinder, two values among the outer sizes of X, Y, and Z are the same.
However, if only two values of X, Y, and Z are the same, there is an error in judging it as a cylinder.
Any ideas on how to determine if a shape is circular?

 

Thanks ,

Warm Regards.

SeonHo Cha.

2 replies

1-Visitor
January 3, 2022

Hi CHASEONHO,

 

Use the function ProSolidOutlineGet() to get maximum and minimum values of the solid in all three axes of the coordinate system. Then, check whether any two axes' maximum and minimum values are the same. If it passes the above condition, it's a solid cylinder.

17-Peridot
January 4, 2022

$0.02.

what about a prismatic extrusion with a square cross-section? ProSolidOutlineGet(...) will have at least two dimensions equal but the shape is definitely non-cylindrical...  

1-Visitor
January 5, 2022

Just put x-value and y-value in the circle equation (( x)^2 + ( y )^2 = r^2) and take (0,0) as center. Since ProSolidOutlineGet(...) gets values according to solid coordinate so we can make the center as (0,0) by putting the solid coordinate system in the center of the cylinder. 

 

17-Peridot
January 10, 2022

You can check a surface type by

ProSurfaceTypeGet()

 

typedef enum pro_srf_type
{
 PRO_SRF_NONE = -3,
 PRO_SRF_PLANE = 34,
 PRO_SRF_CYL = 36,
 PRO_SRF_CONE = 37,
 PRO_SRF_TORUS = 38,
 PRO_SRF_COONS = 39,
 PRO_SRF_SPL = 40,
 PRO_SRF_FIL = 41,
 PRO_SRF_RUL = 42,
 PRO_SRF_REV = 43,
 PRO_SRF_TABCYL = 44,
 PRO_SRF_B_SPL = 45,
 PRO_SRF_FOREIGN = 46,
 PRO_SRF_CYL_SPL = 48,
 PRO_SRF_SPL2DER = 50
} ProSrftype;