[X3D-Public] [Cad] CADPart contains CADFace nodes; also contain Transform, LOD nodes

Don Brutzman brutzman at nps.edu
Fri Jun 22 20:26:10 PDT 2012


On 6/22/2012 10:30 AM, Vincent Marchetti wrote:
> Don Brutzman and I had a phone conference earlier today on this issue and developed a proposed change to the spec for the X3DFace node in the CADGeometry component. In summary, the change would allow the CADFace node to contain a Transform node in addition to the Shape or LOD nodes currently allowed.
> 
> Detailed changes to the text of the spec are in notes submitted as a Mantis ticket 528:
> http://www.web3d.org/membership/login/mantis/view.php?id=528
> 
> All comments are welcome.
> 
> Vincent Marchetti
> vmarchetti at ameritech.net <mailto:vmarchetti at ameritech.net>

thanks for the productive session today Vince, and for the impressive
steady progress on your CAD converter tool.

In order to facilitate public review, here are the current contents
of Mantis issue 528 that we think can productively resolve this issue.
Absent any objections, I will reconcile the X3D Schema, X3D DTD and
X3D Schematron rules to match.  We'll review these further during
next Wednesday's teleconferences.

========================================================================

Summary	0000528: allow CADPart to also contain Transform nodes with CADFace, LOD

Description

Current specification says that CADPart can contain CADFace nodes.

CADFace nodes can contain Shape node, plus LOD nodes that only contain Shape nodes.

It is difficult to author some geometry within CADFace nodes because everything must be in the coordinate system of the CADPart transformations.

Also allowing Transform as a child of CADFace, with the a similar restriction that it only contain Shape or LOD, would support easier authoring without changing the semantics of CAD node structures.

========================================================================
http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/CADGeometry.html#CADPart [^]
32.4.4 CADPart

CADPart : X3DGroupingNode, X3DProductStructureChildNode {
  MFNode [in] addChildren
  MFNode [in] removeChildren
  SFVec3f [in,out] center 0 0 0 (-?,?)
  MFNode [in,out] children [] [CADFace]

[...]
The CADPart node represents the location and faces that constitute a part in the CAD model.
========================================================================

Here is Vince's example of a preferable design pattern. Note Transform child under CADFace permits use of simple geometry nodes.
Suppose I want to model a bushing (a thick walled cylinder) as a Part of an assembly, and construct it out of elementary shapes Cylinder and Disk2D. My preferred solution would be:

<!-- --------------------------------------------- -->
<CADPart rotation="..." translation="...">
<!-- the rotation and translation attributes serve to position
     the bushing within the assembly -->
<CADFace name="outerSurface">
    <Shape
        <Cylinder radius="2" height="3" bottom="FALSE" top="FALSE" />
    </Shape>
</CADFace>

<CADFace name="innerSurface">
    <Shape
        <Cylinder radius="1" height="3" bottom="FALSE" top="FALSE" />
    </Shape
</CADFace>

<CADFace name="topCap">
    <Transform translation="0 0 1.5">
    <Shape>
        <Disk2D innerRadius="1" outerRadius="2" />
    </Shape>
    </Transform>
</CADFace>

<CADFace name="bottomCap">
    <Transform translation="0 0 -1.5">
    <Shape>
        <Disk2D innerRadius="1" outerRadius="2" />
    </Shape>
    </Transform>
</CADFace>

</CADPart>

Suggested resolution:

- Allow CADFace to also include Transform children, but no more than one Shape at a time
- Make X3D Schema and X3D DTD consistent on these parent-child restrictions
- Add rules to X3D Schematron that further detect proper limits on LOD and Transform when they are used inside a CADFace node

========================================================================
Suggested changes to specification prose:

1. Suggest spec clarification to 32.4.4 CADPart:
http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/CADGeometry.html#CADPart [^]

    The CADPart node represents the location and faces that constitute
    a part in the CAD model.

add:

    CADPart can only contain metadata and CADFace nodes.

========================================================================
2. Suggest spec revision to 32.4.2 CADFace:
http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/CADGeometry.html#CADFace [^]

32.4.2 CADFace

CADFace : X3DProductStructureChildNode, X3DBoundedObject {
  SFNode [in,out] metadata NULL [X3DMetadataObject]
  SFString [in,out] name ""
  SFNode [in,out] shape NULL [X3DShapeNode, LOD]
  SFVec3f [] bboxCenter 0 0 0 (-?, ?)
  SFVec3f [] bboxSize -1 -1 -1 [0, ?) or -1 -1 -1
}

The CADFace node holds the geometry representing a face of a part.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

First change:

  SFNode [in,out] shape NULL [X3DShapeNode, LOD]

modified to:

  SFNode [in,out] shape NULL [X3DShapeNode, LOD, Transform]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Second change:

   The shape field contains the Shape node providing the geometry and appearance for the face or an LOD node containing different detail levels of the shape. If an LOD node is provided, each child of the LOD node shall be a single Shape of varying complexity.

modified to the following paragraph (sentences separated here for discussion clarity):

   The shape field contains the Shape node providing the geometry and appearance for the face, or a Transform node relocating its children, or an LOD node containing different detail levels of the shape.

If an LOD node is provided, each child of the LOD node shall be a single Shape of varying complexity or another Transform or LOD node.

If a Transform node is provided, each child of the Transform node shall be a single Shape or another Transform or LOD node.

In any case, only zero or one Shape under the CADFace node shall be possible at one time.
========================================================================

Change summary:

the currently allowed node hierarchy follows, with proposed addition of (Transform) shown in parentheses.

- CADPart
-- CADFace
--- Shape
--- LOD
---- Shape (or Transform) only
--- (Transform)
---- Shape (or Transform) only

We think that this is a good refinement to the spec that simplifies an author's construction of geometry within CADFace/CADPart. It is kind of silly to force an author or conversion tool to always use pre-transformed pre-computed Shape/IFS/Coordinate or other polygonal nodes, when simple insertion of a Transform will allow better common constructs such as the geometric primitives. Not allowing Transform essentially results in the forced obfuscation of the geometric relationships.

========================================================================

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman





More information about the X3D-Public mailing list