[X3D-Public] CADPart contains CADFace nodes; also contains other nodes? fixing spec ambiguity

Don Brutzman brutzman at nps.edu
Wed Jun 20 09:59:48 PDT 2012

In discussion today with Vince, he has identified an important ambiguity in
the handling of CADPart.  Details follow.  We will meet again Friday at
9 pacific, noon eastern on the Web3D conference line for next steps.

Key question:  can CADPart contain only CADFace nodes, or can it also contain
other children nodes too?

I believe that the specification is somewhat ambiguous.  A strict reading of the
node interface would indicate that only CADFace nodes can be contained.
However, the prose that follows is not quite explicit.  Usually our spec
prose makes it very clear what the interface is.  This ambiguity led to
some difficulty on our part with implementations.

Summary status:
- spec ambiguous
- DTD      says only CADFace
- Schema   says CADFace plus other group children
- Tooltips says CADFace plus other group children

Is there a problem if CADPart contains more than CADFace children?  Usually
X3D spec is flexible if there are no confounding conditions.  However, since
CADPart is usually the smallest atomic component that can be manipulated,
with CADFaces simply being presentation pieces of that single CADPart.
As a counterexample, clearly we want to discourage the insertion of a 
CADAssembly within a CADPart.

Of note is that CADFace allows Shape or LOD, but the LOD is only allowed
to contain Shape nodes as children.  Thus each CADFace is geometry only.

What is the correct resolution for CADPart children?  It appears that the
strict interpretation is correct.  Suggest spec revision:

	The CADPart node represents the location and faces that constitute
	a part in the CAD model. 
	CADPart can only contain metadata and CADFace nodes.

Other actions:
- correct X3D Schema to match DTD, strict interpretation of children
- update Tooltips
- create an example for X3D Basic Examples - CAD illustrating use of LOD


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. 

DOCTYPE only supports CADFace nodes as children:


Element Content Model

(IS?, (MetadataDouble | MetadataFloat | MetadataInteger | MetadataSet | MetadataString)?, (CADFace | (ProtoInstance))*)


Schema however does permit other nodes as children:



	<xs:element name="CADPart">
				<xs:attribute name="otherInterfaces" type="xs:string" fixed="X3DProductStructureChildNode"/>
			<xs:documentation source="http://www.web3d.org/x3d/specifications/ISO-IEC-19775-Amendment1-FPDAM-X3DAbstractSpecification/Part01/components/CADGeometry.html#CADPart "/>
				<xs:extension base="X3DGroupingNode">
						<xs:element ref="CADFace" minOccurs="0" maxOccurs="unbounded"/>
					<xs:attribute name="name" type="SFString"/>
					<xs:attribute name="center" type="SFVec3f" default="0 0 0"/>
					<xs:attribute name="rotation" type="SFRotation" default="0 0 1 0"/>
					<xs:attribute name="scale" type="SFVec3f" default="1 1 1"/>
					<xs:attribute name="scaleOrientation" type="SFRotation" default="0 0 1 0"/>
					<xs:attribute name="translation" type="SFVec3f" default="0 0 0"/>


Tooltip interpretation was to contain other nodes besides CADFace:

On 6/13/2012 8:10 AM, Don Brutzman wrote:
> [...]
> http://www.web3d.org/x3d/content/X3dTooltips.html#CADPart
> [X3D 3.1] CADPart defines both coordinate-system location and the faces that constitute a part in a Computer-Aided Design (CAD) model. CADPart is a Grouping node that can contain CADFace nodes.
> Hint: can also contain Shapes or other grouped content.


Comments and discussion welcome.  Absent other feedback we intend to
pursue action items with the strict interpretation.

Simple example to consider


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