
Fri, 09/02/2005 - 12:19
Forums:
My goal is to determine if a face is a basic element (cylinder, sphere, disc, quadrilateral...).
In the case of the cylinder, the sphere or the cone, it's easy to do using the method IsKind( STANDARD_TYPE( Geom_SphericalSurface ))
But when the type of surface is planar, I don't know how to determine efficiently if the face correspond to a basic element (disc, quadrilateral, rectangle...)
For the moment I compute the number of edges in this face and the type of edges. And then I analyse these edges.
For example, the face is an entire disc if the number of edges is 2 and the types of edge is "circle".
Is it the way to do it or is it possible to do it more efficiently?
Thanks in advance
Elisa
Tue, 09/06/2005 - 20:12
Hi Elisa,
Not sure if I completely understood your need but I feel you mix two issues - type of the surface and shape of your element. Disc is not an analogue of a cylinder - indeed, you should distinguish between cylindrical and planar face. You can do so by IsKind(STANDARD_TYPE(Geom_Plane))...
Among planar elements you may want to distinguish among rectangles, disks/circles, triangles, etc. Then you may apply different checks if you know how these elements be represented. You can apply this checks for simple cases - e.g. triangle is bounded by a wire of 3 straight edges, disk is a single edge lying on Geom_Circle, etc.
For more complex cases you might benefit from the canonical recognition component (see among value-add software). It can concatenate several adjacent edges (e.g. several circular arcs into one) thus you could apply simple post-checks.
Hope this helps.
Roman Lygin