shapesmith.deprecated
shapesmith.deprecated copied to clipboard
edge line has different tessellation to face
when cut a cylinder from a cube, the edge and faces don't match.
on inspection the cylinder hole has 24 sides, while the edge 'highlight' line has 20 sides
image on user news group
I'll explain how this works. The faces and edges are tesselated separately. In OpenCASCADE, you can mesh faces using a standard algorithm, then you can traverse the triangles in the mesh. To tesselate 1D wires, e.g. if you create a Bezier curve, there are no faces and it uses a deflection algorithm to discretize the wire.
I've use the same algorithm that is aimed at 1D objects to tesselate the edges of the solids for visualisation. It should be possible to re-use the face mesh for the edge tesselation by finding the triangles that are connected to the wire and using those.
thanks, i did come to think it was just a visualisation effect more than anything fundamental, but posted just in case it wasn't.
i think it could just be marked as closed.