<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.1//EN" "http://www.web3d.org/specifications/x3d-3.1.dtd">
<X3D profile='Immersive' version='3.1' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.1.xsd'>
  <head>
    <meta content='CADGeometryPrototypes.x3d' name='title'/>
    <meta content='X3D Amendment 1 CAD Component node prototypes for backwards compatibility with VRML97 and X3D v3.0.' name='description'/>
    <meta content='Travis Rauch, Alan Shaffer, Mounir Sidhom, Patrick Sullivan and Don Brutzman' name='creator'/>
    <meta content='28 April 2005' name='created'/>
    <meta content='3 December 2011' name='modified'/>
    <meta content='Example scenes using these prototypes do not get support for making embdedded metadata values visible at run time, though metadata can certainly be saved in the scene file OK.' name='warning'/>
    <meta content='CADGeometryExternPrototypes.x3d' name='reference'/>
    <meta content='http://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/CADGeometry.html' name='reference'/>
    <meta content='http://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/CADInterchange.html' name='reference'/>
    <meta content='CADAssembly CADFace CADLayer CADPart IndexedQuadSet QuadSet' name='subject'/>
    <meta content='http://www.web3d.org/x3d/content/examples/Basic/CAD/CADGeometryPrototypes.x3d' name='identifier'/>
    <meta content='X3D-Edit, https://savage.nps.edu/X3D-Edit' name='generator'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <!-- =========================================== -->
    <ProtoDeclare appinfo='The IndexedQuadSet node represents a 3D shape composed of a collection of individual quadrilaterals (quads). IndexedQuadSet uses the indices in its index field to specify the vertices of each quad from the coord field. Each quad is formed from a set of four vertices of the Coordinate node identified by four consecutive indices from the index field If the index field does not contain a multiple of four coordinate values the remaining vertices shall be ignored.' documentation='http://www.web3d.org/x3d/specifications/ISO-IEC-19775-Amendment1-PDAM-X3DAbstractSpecification/Part01/components/CADGeometry.html#IndexedQuadSet' name='IndexedQuadSet'>
      <ProtoInterface>
        <field accessType='inputOnly' appinfo='range [0..∞) or -1' name='set_index' type='MFInt32'>
          <!-- No specific initialization value -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DVertexAttributeNode]' name='attrib' type='MFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DColorNode]' name='color' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DCoordinateNode]' name='coord' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[FogCoordinate]' name='fogCoord' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DNormalNode]' name='normal' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DTextureCoordinateNode]' name='texCoord' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='initializeOnly' name='ccw' type='SFBool' value='true'/>
        <field accessType='initializeOnly' appinfo='colorPerVertex ignored in IndexedQuadSet. and always treated as true' name='colorPerVertex' type='SFBool' value='true'/>
        <field accessType='initializeOnly' name='normalPerVertex' type='SFBool' value='true'/>
        <field accessType='initializeOnly' name='solid' type='SFBool' value='true'/>
        <field accessType='initializeOnly' appinfo='range [0..∞) or -1' name='index' type='MFInt32'>
          <!-- No specific initialization value -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DMetadataObject]' name='metadata' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
      </ProtoInterface>
      <ProtoBody>
        <IndexedFaceSet DEF='RenderedIQS' colorPerVertex='true'>
          <IS>
            <connect nodeField='attrib' protoField='attrib'/>
            <connect nodeField='color' protoField='color'/>
            <connect nodeField='colorPerVertex' protoField='colorPerVertex'/>
            <connect nodeField='coord' protoField='coord'/>
            <connect nodeField='fogCoord' protoField='fogCoord'/>
            <connect nodeField='normal' protoField='normal'/>
            <connect nodeField='texCoord' protoField='texCoord'/>
            <connect nodeField='ccw' protoField='ccw'/>
            <connect nodeField='normalPerVertex' protoField='normalPerVertex'/>
            <connect nodeField='solid' protoField='solid'/>
          </IS>
        </IndexedFaceSet>
        <!-- Initial node in the PROTO body is actual node type, and the only node rendered. Remaining ProtoBody nodes not rendered -->
        <Group DEF='UnrenderedIQS'>
          <Script DEF='IndexedQuadSetToIndexedFaceSet' directOutput='true'>
            <field accessType='initializeOnly' name='index' type='MFInt32'/>
            <field accessType='inputOnly' name='set_index' type='MFInt32'/>
            <field accessType='initializeOnly' name='renderedIQS' type='SFNode'>
              <IndexedFaceSet USE='RenderedIQS'/>
            </field>
            <field accessType='initializeOnly' name='localTraceEnabled' type='SFBool' value='true'/>
            <field accessType='initializeOnly' name='coordIndexNew' type='MFInt32'>
              <!-- constructed during initialization -->
            </field>
            <IS>
              <connect nodeField='index' protoField='index'/>
              <connect nodeField='set_index' protoField='set_index'/>
            </IS>
            <![CDATA[ecmascript:

function initialize()
{
	//colorPerVertex ignored in IndexedQuadSet, and always treated as "true"
	RenderedIQS.colorPerVertex = true;

	// index is an array of quad indices. The ordering of
	// the vertices is ccw (counter-clockwise).

	// ensure legal index values
	for (ii=0; ii <= index.length-1; ii++)
	{
	  if (index[ii] < -1)
	  {
		alwaysPrint ('error, index[' + ii + ']=' + index[ii] + ' is illegal value');
		return;
	  }
	}
	tracePrint ('index.length=' + index.length);
	tracePrint ('index=' + index);

	if (index.length < 4)
	{
		alwaysPrint ('warning, index.length=' + index.length + ' insufficient to construct a quad, IQS ignored');
		return;
	}

	coordIndexNew = new MFInt32 ();

	// ii walks through index array,
	// goal is to initialize coordIndexNew list to match quads
	for (ii=0; ii <= index.length-1; ii+=4)
	{
		if ((index[ii]   == index[ii+1]) || (index[ii]   == index[ii+2]) || (index[ii] == index[ii+3]) ||
		    (index[ii+1] == index[ii+2]) || (index[ii+1] == index[ii+3]) ||
		    (index[ii+2] == index[ii+3]))
		{
			alwaysPrint ('index=' + index);
			alwaysPrint ('error, pair of equal indices in quad');
			return;
		}

		if (index[ii] >= 0)
		{
			// add another quad from latest 4 points of fan set to IQS
			// order is ccw, i.e. in correct halfplane direction
			// note: there is an implicit "malloc" here for the'length' element of the array
			coordIndexNew [coordIndexNew.length] = index[ii];
			coordIndexNew [coordIndexNew.length] = index[ii+1];
			coordIndexNew [coordIndexNew.length] = index[ii+2];
			coordIndexNew [coordIndexNew.length] = index[ii+3];
			coordIndexNew [coordIndexNew.length] = -1;
		}

		if (index.length % 4 != 0) {
			alwaysPrint ('error, index field does not contain a multiple of four coordinate values.');
			alwaysPrint ('The remaining vertices shall be ignored');
			return;
		}

	  // incremental trace of array being built
	  tracePrint ('coordIndexNew=' + coordIndexNew);
	}
	renderedIQS.set_coordIndex = coordIndexNew;
	tracePrint ('renderedIQS.coordIndex=' + renderedIQS.coordIndex);
	// match colorIndex if any Color node exists
//	if (nodesHolder.color)
//	{
//	  if (nodesHolder.color.color.length > 0)
//	  {
		//  Could implement color count check here
//	  }
//	}

	// no need to set colorIndex since indexedFaceSet semantics handles this
}
function set_index (value, timestamp)
{
	index = value;
	initialize ();
}
function tracePrint(outputString)
{
    if (localTraceEnabled)
	  Browser.print ('[IndexedQuadSet]' + outputString);
}
function alwaysPrint(outputString)
{
	Browser.print ('[IndexedQuadSet]' + outputString);
}
]]>
          </Script>
          <Group>
            <!-- metadata holder -->
            <MetadataString>
              <IS>
                <connect nodeField='metadata' protoField='metadata'/>
              </IS>
            </MetadataString>
          </Group>
        </Group>
      </ProtoBody>
    </ProtoDeclare>
    <!-- =========================================== -->
    <ProtoDeclare appinfo='The QuadSet node represents a 3D shape that represents a collection of individual planar quadrilaterals. The coord field contains a Coordinate node that defines the 3D vertices that define the quad. Each quad is formed from a consecutive set of four vertices of the coordinate node. If the coordinate node does not contain a multiple of four coordinate values the remaining vertices shall be ignored.' documentation='http://www.web3d.org/x3d/specifications/ISO-IEC-19775-Amendment1-PDAM-X3DAbstractSpecification/Part01/components/CADGeometry.html#QuadSet' name='QuadSet'>
      <ProtoInterface>
        <field accessType='inputOutput' appinfo='[X3DVertexAttributeNode]' name='attrib' type='MFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DColorNode]' name='color' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DCoordinateNode]' name='coord' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[FogCoordinate]' name='fogCoord' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DNormalNode]' name='normal' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='[X3DTextureCoordinateNode]' name='texCoord' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='initializeOnly' name='ccw' type='SFBool' value='true'/>
        <field accessType='initializeOnly' appinfo='colorPerVertex ignored in QuadSet and always treated as true' name='colorPerVertex' type='SFBool' value='true'/>
        <field accessType='initializeOnly' name='normalPerVertex' type='SFBool' value='true'/>
        <field accessType='initializeOnly' name='solid' type='SFBool' value='true'/>
        <field accessType='inputOutput' appinfo='[X3DMetadataObject]' name='metadata' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
      </ProtoInterface>
      <ProtoBody>
        <IndexedFaceSet DEF='RenderedQS' colorPerVertex='true'>
          <IS>
            <connect nodeField='attrib' protoField='attrib'/>
            <connect nodeField='color' protoField='color'/>
            <connect nodeField='colorPerVertex' protoField='colorPerVertex'/>
            <connect nodeField='coord' protoField='coord'/>
            <connect nodeField='fogCoord' protoField='fogCoord'/>
            <connect nodeField='normal' protoField='normal'/>
            <connect nodeField='texCoord' protoField='texCoord'/>
            <connect nodeField='ccw' protoField='ccw'/>
            <connect nodeField='normalPerVertex' protoField='normalPerVertex'/>
            <connect nodeField='solid' protoField='solid'/>
          </IS>
        </IndexedFaceSet>
        <!-- Initial node in the PROTO body is actual node type, and the only node rendered. Remaining ProtoBody nodes not rendered -->
        <Group DEF='UnrenderedQS'>
          <Script DEF='QuadSetToIndexedFaceSet' directOutput='true'>
            <field accessType='initializeOnly' name='index' type='MFInt32'>
              <!-- initialized in ecmascript -->
            </field>
            <field accessType='inputOnly' name='set_index' type='MFInt32'/>
            <field accessType='initializeOnly' name='renderedQS' type='SFNode'>
              <IndexedFaceSet USE='RenderedQS'/>
            </field>
            <field accessType='initializeOnly' name='localTraceEnabled' type='SFBool' value='true'/>
            <field accessType='initializeOnly' name='coordIndexNew' type='MFInt32'>
              <!-- constructed during initialization -->
            </field>
            <![CDATA[ecmascript:

function initialize()
{
	//colorPerVertex ignored in QuadSet, and always treated as "true"
	RenderedQS.colorPerVertex = true;

	// calculate index value from QuadSet coord values
	if (renderedQS.coord)
	{
		numberOfCoordinatePoints = renderedQS.coord.point.length;
	}
	else
	{
		tracePrint ('no Coordinate node found');
		return;
	}
	if (numberOfCoordinatePoints < 4)
	{
		alwaysPrint ('warning, numberOfCoordinatePoints=' + numberOfCoordinatePoints + ' insufficient to construct a quad, QuadSet ignored');
		return;
	}

	coordIndexNew = new MFInt32 ();

	// ii walks through index array,
	// goal is to initialize coordIndexNew list to match quads
	for (ii=0; ii <= numberOfCoordinatePoints-1; ii+=4)
	{
		// check if at least 4 vertices remaining to build a quad
		if ((numberOfCoordinatePoints - ii) < 4)
		{
			alwaysPrint ('error, index field does not contain a multiple' +
' of four coordinate values.');
			alwaysPrint ('The remaining vertices shall be ignored');
			return;
		}

		if ((index[ii]   == index[ii+1]) || (index[ii]   == index[ii+2]) || (index[ii] == index[ii+3]) ||
		    (index[ii+1] == index[ii+2]) || (index[ii+1] == index[ii+3]) ||
		    (index[ii+2] == index[ii+3]))
		{
			alwaysPrint ('index=' + index);
			alwaysPrint ('error, pair of equal indices in quad');
			return;
		}

		if (index[ii] >= 0)
		{
			// add another quad from latest 4 points of fan set to QS
			// order is ccw, i.e. in correct halfplane direction
			// note: there is an implicit "malloc" here for the'length' element of the array
			coordIndexNew [coordIndexNew.length] = index[ii];
			coordIndexNew [coordIndexNew.length] = index[ii+1];
			coordIndexNew [coordIndexNew.length] = index[ii+2];
			coordIndexNew [coordIndexNew.length] = index[ii+3];
			coordIndexNew [coordIndexNew.length] = -1;
		}

	  // incremental trace of array being built
	  tracePrint ('coordIndexNew=' + coordIndexNew);
	}
	renderedQS.set_coordIndex = coordIndexNew;
	tracePrint ('renderedQS.coordIndex=' + renderedQS.coordIndex);
	// match colorIndex if any Color node exists
//	if (nodesHolder.color)
//	{
//	  if (nodesHolder.color.color.length > 0)
//	  {
		//  Could implement color count check here
//	  }
//	}

	// no need to set colorIndex since indexedFaceSet semantics handles this
}
function set_index (value, timestamp)
{
	index = value;
	initialize ();
}
function tracePrint(outputString)
{
    if (localTraceEnabled)
	  Browser.print ('[IndexedQuadSet]' + outputString);
}
function alwaysPrint(outputString)
{
	Browser.print ('[IndexedQuadSet]' + outputString);
}
          ]]>
          </Script>
          <Group>
            <!-- metadata holder -->
            <MetadataString>
              <IS>
                <connect nodeField='metadata' protoField='metadata'/>
              </IS>
            </MetadataString>
          </Group>
        </Group>
      </ProtoBody>
    </ProtoDeclare>
    <!-- ======================================== -->
    <ProtoDeclare appinfo='The CADAssembly node holds a set of assemblies or parts grouped together.' name='CADAssembly'>
      <ProtoInterface>
        <field accessType='inputOnly' name='addChildren' type='MFNode'/>
        <field accessType='inputOnly' name='removeChildren' type='MFNode'/>
        <field accessType='inputOutput' appinfo='The children field can contain X3DProductStructureChildNode types. Each child will be either a sub-assembly or a part.' name='children' type='MFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='The name field documents the name of this CADAssembly.' name='name' type='SFString'/>
        <field accessType='initializeOnly' appinfo='Bounding box center: position offset from origin of local coordinate system.' name='bboxCenter' type='SFVec3f' value='0 0 0'/>
        <field accessType='initializeOnly' appinfo='Bounding box size: automatically calculated can be specified as an optimization or constraint.' name='bboxSize' type='SFVec3f' value='-1 -1 -1'/>
        <field accessType='inputOutput' appinfo='[X3DMetadataObject]' name='metadata' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
      </ProtoInterface>
      <ProtoBody>
        <Group>
          <IS>
            <connect nodeField='addChildren' protoField='addChildren'/>
            <connect nodeField='removeChildren' protoField='removeChildren'/>
            <connect nodeField='children' protoField='children'/>
            <connect nodeField='bboxCenter' protoField='bboxCenter'/>
            <connect nodeField='bboxSize' protoField='bboxSize'/>
          </IS>
        </Group>
        <Group>
          <!-- metadata holder -->
          <MetadataString>
            <IS>
              <connect nodeField='metadata' protoField='metadata'/>
            </IS>
          </MetadataString>
          <!-- name holder -->
          <Anchor url='"#hideWarning1"'>
            <IS>
              <connect nodeField='description' protoField='name'/>
            </IS>
          </Anchor>
        </Group>
      </ProtoBody>
    </ProtoDeclare>
    <!-- ======================================== -->
    <ProtoDeclare appinfo='local dummy node to hold value for CADFace' name='ShapeHolder'>
      <ProtoInterface>
        <field accessType='inputOutput' name='shape' type='SFNode'>
          <!-- no initialization value -->
        </field>
      </ProtoInterface>
      <ProtoBody>
        <Script directOutput='true'>
          <field accessType='inputOutput' appinfo='holder for IS field' name='shape' type='SFNode'>
            <!-- no initialization node -->
          </field>
          <IS>
            <connect nodeField='shape' protoField='shape'/>
          </IS>
          <![CDATA[
ecmascript:
// no script code, this node is simply a container
]]>
        </Script>
      </ProtoBody>
    </ProtoDeclare>
    <!-- = = = = = -->
    <ProtoDeclare appinfo='The CADFace node holds the geometry representing a face of a part.' documentation='http://www.web3d.org/x3d/specifications/ISO-IEC-19775-Amendment1-PDAM-X3DAbstractSpecification/Part01/components/CADGeometry.html#CADPart' name='CADFace'>
      <ProtoInterface>
        <field accessType='inputOutput' appinfo='The name field documents the name of this CADFace.' name='name' type='SFString'/>
        <field accessType='inputOutput' appinfo='[X3DShapeNode | LOD]' name='shape' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='initializeOnly' appinfo='Bounding box center: position offset from origin of local coordinate system.' name='bboxCenter' type='SFVec3f' value='0 0 0'/>
        <field accessType='initializeOnly' appinfo='Bounding box size: automatically calculated can be specified as an optimization or constraint.' name='bboxSize' type='SFVec3f' value='-1 -1 -1'/>
        <field accessType='inputOutput' appinfo='[X3DMetadataObject]' name='metadata' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
      </ProtoInterface>
      <ProtoBody>
        <ProtoInstance name='ShapeHolder'>
          <IS>
            <connect nodeField='shape' protoField='shape'/>
          </IS>
        </ProtoInstance>
        <Group>
          <IS>
            <connect nodeField='bboxCenter' protoField='bboxCenter'/>
            <connect nodeField='bboxSize' protoField='bboxSize'/>
          </IS>
          <!-- metadata holder -->
          <MetadataString>
            <IS>
              <connect nodeField='metadata' protoField='metadata'/>
            </IS>
          </MetadataString>
          <!-- name holder -->
          <Anchor url='"#hideWarning2"'>
            <IS>
              <connect nodeField='description' protoField='name'/>
            </IS>
          </Anchor>
        </Group>
      </ProtoBody>
    </ProtoDeclare>
    <!-- ======================================== -->
    <ProtoDeclare appinfo='The CADLayer node defines a hierarchy of nodes used for showing layer structure.' documentation='http://www.web3d.org/x3d/specifications/ISO-IEC-19775-Amendment1-PDAM-X3DAbstractSpecification/Part01/components/CADGeometry.html#CADPart' name='CADLayer'>
      <ProtoInterface>
        <field accessType='inputOnly' name='addChildren' type='MFNode'/>
        <field accessType='inputOnly' name='removeChildren' type='MFNode'/>
        <field accessType='inputOutput' appinfo='The children field can contain X3DChildNode types.' name='children' type='MFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' appinfo='The name field documents the name of this CADLayer.' name='name' type='SFString'/>
        <field accessType='inputOutput' appinfo='specifies whether a particular child and its subchildren are visible. If the number of values is less than the number of children the remaining children shall be visible.' name='visible' type='MFBool'/>
        <field accessType='initializeOnly' appinfo='Bounding box center: position offset from origin of local coordinate system.' name='bboxCenter' type='SFVec3f' value='0 0 0'/>
        <field accessType='initializeOnly' appinfo='Bounding box size: automatically calculated can be specified as an optimization or constraint.' name='bboxSize' type='SFVec3f' value='-1 -1 -1'/>
        <field accessType='inputOutput' appinfo='[X3DMetadataObject]' name='metadata' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
      </ProtoInterface>
      <ProtoBody>
        <Group>
          <IS>
            <connect nodeField='addChildren' protoField='addChildren'/>
            <connect nodeField='removeChildren' protoField='removeChildren'/>
            <connect nodeField='children' protoField='children'/>
            <connect nodeField='bboxCenter' protoField='bboxCenter'/>
            <connect nodeField='bboxSize' protoField='bboxSize'/>
          </IS>
        </Group>
        <Group>
          <!-- metadata holder -->
          <MetadataString>
            <IS>
              <connect nodeField='metadata' protoField='metadata'/>
            </IS>
          </MetadataString>
          <!-- name holder -->
          <Anchor url='"#hideWarning3"'>
            <IS>
              <connect nodeField='description' protoField='name'/>
            </IS>
          </Anchor>
        </Group>
        <Script>
          <field accessType='inputOutput' name='visible' type='MFBool'>
            <!-- no initialization node -->
          </field>
          <IS>
            <connect nodeField='visible' protoField='visible'/>
          </IS>
          <![CDATA[
ecmascript:
// no script code, this node is simply a container
]]>
        </Script>
        <!-- No support for MFBool in VRML97, so no functionality provided for visible -->
      </ProtoBody>
    </ProtoDeclare>
    <!-- ======================================== -->
    <ProtoDeclare appinfo='CADPart represents the location and faces that constitute apart' documentation='http://www.web3d.org/x3d/specifications/ISO-IEC-19775-Amendment1-PDAM-X3DAbstractSpecification/Part01/components/CADGeometry.html#CADPart' name='CADPart'>
      <ProtoInterface>
        <field accessType='inputOnly' name='addChildren' type='MFNode'/>
        <field accessType='inputOnly' name='removeChildren' type='MFNode'/>
        <field accessType='inputOutput' appinfo='The children field can only contain CADFace nodes.' name='children' type='MFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
        <field accessType='inputOutput' name='name' type='SFString'/>
        <field accessType='inputOutput' name='translation' type='SFVec3f' value='0 0 0'/>
        <field accessType='inputOutput' name='rotation' type='SFRotation' value='0 0 1 0'/>
        <field accessType='inputOutput' name='center' type='SFVec3f' value='0 0 0'/>
        <field accessType='inputOutput' name='scale' type='SFVec3f' value='1 1 1'/>
        <field accessType='inputOutput' name='scaleOrientation' type='SFRotation' value='0 0 1 0'/>
        <field accessType='initializeOnly' name='bboxCenter' type='SFVec3f' value='0 0 0'/>
        <field accessType='initializeOnly' name='bboxSize' type='SFVec3f' value='-1 -1 -1'/>
        <field accessType='inputOutput' appinfo='[X3DMetadataObject]' name='metadata' type='SFNode'>
          <!-- Specification initialization: NULL node -->
        </field>
      </ProtoInterface>
      <ProtoBody>
        <Transform>
          <IS>
            <connect nodeField='children' protoField='children'/>
            <connect nodeField='addChildren' protoField='addChildren'/>
            <connect nodeField='removeChildren' protoField='removeChildren'/>
            <connect nodeField='translation' protoField='translation'/>
            <connect nodeField='rotation' protoField='rotation'/>
            <connect nodeField='center' protoField='center'/>
            <connect nodeField='scale' protoField='scale'/>
            <connect nodeField='scaleOrientation' protoField='scaleOrientation'/>
            <connect nodeField='bboxCenter' protoField='bboxCenter'/>
            <connect nodeField='bboxSize' protoField='bboxSize'/>
          </IS>
        </Transform>
        <Group>
          <!-- metadata holder -->
          <MetadataString>
            <IS>
              <connect nodeField='metadata' protoField='metadata'/>
            </IS>
          </MetadataString>
          <!-- name holder -->
          <Anchor url='"#hideWarning4"'>
            <IS>
              <connect nodeField='description' protoField='name'/>
            </IS>
          </Anchor>
        </Group>
      </ProtoBody>
    </ProtoDeclare>
    <!-- ======================================== -->
    <Anchor description='CADGeometryExternPrototypes' parameter='"target=_blank"' url='"CADGeometryExternPrototypes.x3d" "http://www.web3d.org/x3d/content/examples/Basic/development/CADGeometryExternPrototypes.x3d" "CADGeometryExternPrototypes.wrl" "http://www.web3d.org/x3d/content/examples/Basic/development/CADGeometryExternPrototypes.wrl"'>
      <Shape>
        <Text string='"CADGeometryExternPrototypes" "defines prototype examples" "" "Click text to see" "CADGeometryExternPrototypes"'>
          <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.9'/>
        </Text>
        <Appearance>
          <Material diffuseColor='1 1 0.2'/>
        </Appearance>
      </Shape>
    </Anchor>
  </Scene>
</X3D>
