[X3D-Public] CADPart contains CADFace nodes - an opposing view

Vincent Marchetti vmarchetti at ameritech.net
Thu Jun 21 11:21:10 PDT 2012


On Jun 20, 2012, at 12:59 PM, Don Brutzman wrote:

> 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.

In his recent message Don suggested resolving a possible ambiguity in the CADGeometry specs by adopting a strict interpretation, limiting what the product structure tree can contain. However, I think the strict interpretation limits the ability to represent CAD geometry using elementary shapes. While anything (a theorem to be proved later) can be represented as a trimmed nurbs surface, it is advantageous to do the easy rods and holes with elementary cylinders.

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>
<!-- --------------------------------------------- -->
However, this is not currently valid under the strict interpretation, because
the Transform node cannot be a child of CADFace for the top and bottom caps.

Nor can I put the CADFace for the top and bottom cap within a Transform node, under the strict interpretation, because a CADPart can only have CADFace as children.

I have circumvented this restriction in the current example
http://www.kshell.com/pages/rev062012/models/laser__top.cad.x3d by using this trick:
<CADFace name="topCap">
    <LOD>
    <Transform translation="0 0 1.5">
    <Shape>
        <Disk2D   innerRadius="1" outerRadius="2" />    
    </Shape>
    </Transform>
    </LOD>
</CADFace>
but I think this is a violation of what the LOD node is intended for -- moreover, the current version of Xj3D  doesn't allow this yet; the code does not allow the LOD node as a child even though the spec does (see BaseCADFace.java, line 499)

Another hack would be to do this:
<CADPart translation="0 0 1.5">
<CADFace name="topCap">
    <Shape>
        <Disk2D   innerRadius="1" outerRadius="2" />    
    </Shape>
</CADFace>
</CADPart>
But this violates what most users/browser developers would expect for the meaning CADPart.

I look forward to discussing this Friday June 22, 9:00 PDT

Vince Marchetti








More information about the X3D-Public mailing list