[x3d-public] Edge cases of Extrusion

Alekseyev, Vsevolod (NIH/NIAID) [E] VAlekseyev at niaid.nih.gov
Tue Jun 2 09:32:01 PDT 2015


Hi everyone,

I'm building an X3D geometry import module for the Blender application, and the standard is unclear when it comes to the Extrusion geometry node. I wonder if anyone who was involved with the standard can clarify some things for me. The spec I'm going by is at http://www.web3d.org/documents/specifications/19775-1/V3.3/index.html , under Geometry3D.

So, extrusions. A spine and a cross-section. An algorithm to build a spine-aligned cross-section plane (SCP) at every point of the spine. Here's where the questions start.

Under "Special cases", there's a line: "If two points are coincident, they both have the same SCP." That means to me that coincident spine points are legal under the spec. The potential for that renders some statements from the previous portion of the spec potentially ill defined. Specifically:

1. The algorithm for generating Y for the SCP is ill defined if three spine points in a row are coincident. In the spirit of the spec, reusing the last value of Y makes sense, but the spec doesn't say so.

2. The algorithm for generating Y for the SCP at the first point of an open spine is ill defined if the first two spine points are coincident. Similarly, one may employ look-ahead to the first non-null spine segment, but the spec doesn't say so.

3. The wording for generating the first (and only) SCP for collinear spines is unclear; specifically, "rotation along the axis" is a funny notion. I can imagine a translation along the axis and a rotation around an axis, but not a "rotation along something". Here's how I understand it: you calculate a rotation that takes the vector (0,1,0) to the spine direction vector (the first nonnull spine segment), then you apply the same rotation to the vector (0,0,1), and that's the Z for the SCP. Notably, that's *not* how the popular X3DOM implementation treats those cases.

4. If the above interpretation is right, the algorithm is ill defined if the spine goes in the negative Y direction. The rotation between (0,1,0) and (0,-1,0) is not uniquely defined, and the resultant SCP Z can be anywhere in the XZ plane.

Those cases, while pathological, may represent geometries that do make intuitive sense to me. For example, a collinear spine with coincident points is useful if you want to make a model for a piece of penne pasta, or more formally, a cylinder with a coaxial cylindrical hole inside. Since I'm not authoring X3D files but consuming them, avoiding or ignoring those cases is not really an option. Any advice/clarification/reference would be welcome. Thank you very much in advance!

Regards,
Seva Alekseyev




More information about the x3d-public mailing list