<!DOCTYPE html>
<html>
<head>
  <meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
  <title>Cobweb Viewer</title>
    <link rel='stylesheet' type='text/css' href='https://cdn.rawgit.com/create3000/cobweb/master/stable/1/1.19/cobweb.css'/>
    <script type='text/javascript' src='https://cdn.rawgit.com/create3000/cobweb/master/stable/1/1.19/cobweb.min.js'/>
<!--
<link rel="stylesheet" type="text/css" href="https://rawgit.com/create3000/cobweb/master/stable/latest/cobweb.css"/>
<script type="text/javascript" src="https://rawgit.com/create3000/cobweb/master/stable/latest/cobweb.min.js"></script>
-->

    <style type='text/css'>
        X3D {
           width: 768px;
           height: 432px;
        }
    </style>
  </head>
  <body>
<X3D profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
  <head>
    <meta content='ArchPrototype.x3d' name='title'/>
    <meta content='Create an arch. Can modify general parameters: clearSpanWidth, riseHeight, depth, topAbutmentHeight, pierWidth, pierHeight. See the reference file ArchModelingDiagrams.pdf to find further information. See also ArchPrototypeScript_more_readable.js.' name='description'/>
    <meta content='Possibility to create shapes related to arch: ArchHalf; IntradosOnly; ArchFilled; ArchHalfFilled; Lintel. See the reference file ArchModelingDiagrams.pdf to find further information.' name='description'/>
    <meta content='Michele Foti, Don Brutzman' name='creator'/>
    <meta content='15 December 2014' name='created'/>
    <meta content='17 October 2015' name='modified'/>
    <meta content='ArchModelingDiagrams.pdf' name='reference'/>
    <meta content='https://en.wikipedia.org/wiki/Arch' name='reference'/>
    <meta content='http://X3dGraphics.com/examples/X3dForAdvancedModeling/Buildings/ArchPrototype.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit' name='generator'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <ProtoDeclare appinfo='Create an arch. Can modify general parameters: clearSpanWidth, riseHeight, depth, topAbutmentHeight, pierWidth, pierHeight. - Possibility to create shapes related to an arch: ArchHalf; IntradosOnly; ArchFilled; ArchHalfFilled; Lintel. See the reference file ArchModelingDiagrams.pdf to find further information. See also ArchPrototypeScript_more_readable.js.js.' name='ArchPrototype'>
      <ProtoInterface>
        <!-- COLOR OF ARCH -->
        <field accessType='inputOutput' appinfo='color of arch' name='diffuseColor' type='SFColor' value='0.2 0.8 0.8'/>
        <field accessType='inputOutput' appinfo='color of arch' name='emissiveColor' type='SFColor' value='0.2 0.8 0.8'/>
        <!-- INPUT PARAMETERS -->
        <!-- General parameters: measures in meters -->
        <field accessType='initializeOnly' appinfo='clearSpanWidth: clearSpanWidth must be double of riseHeight to obtain an half circumference' name='clearSpanWidth' type='SFFloat' value='4'/>
        <field accessType='initializeOnly' appinfo='riseHeight: riseHeight must be half of clearSpanWidth to obtain an half circumference' name='riseHeight' type='SFFloat' value='2'/>
        <field accessType='initializeOnly' appinfo='depth' name='depth' type='SFFloat' value='3'/>
        <field accessType='initializeOnly' appinfo='topAbutmentHeight:topAbutmentHeight=0 means no topAbutment' name='topAbutmentHeight' type='SFFloat' value='0.5'/>
        <field accessType='initializeOnly' appinfo='pierWidth:pierWidtht=0 means no pierWidth' name='pierWidth' type='SFFloat' value='0.5'/>
        <field accessType='initializeOnly' appinfo='pierHeight: pierHeight=0 means no pierHeight' name='pierHeight' type='SFFloat' value='1'/>
        <!-- Parameters to create to create shapes related to arch: put true to apply -->
        <field accessType='initializeOnly' appinfo='archHalf: can modify also clearSpanWidth, riseHeight, depth, pierWidth, pierHeight, topAbutmentHeight, archHalfExtensionWidth at purpose, clearSpanWidth measure refers to a full arc, consider clearSpanWidth/2 for the archHalf width' name='archHalf' type='SFBool' value='false'/>
        <field accessType='initializeOnly' appinfo='archHalfExtensionWidth: measure in meters, use only if archHalf=true, it is the width of the etension of the abutment of the archHalf. See the reference file ArchModelingDiagrams.pdf to find further information.' name='archHalfExtensionWidth' type='SFFloat' value='0'/>
        <field accessType='initializeOnly' appinfo='onlyIntrados: note it is a flat curved surface, can modify also clearSpanWidth, riseHeight, depth at purpose, if needed apply archHalf=true.' name='onlyIntrados' type='SFBool' value='false'/>
        <field accessType='initializeOnly' appinfo='archFilled: note it is an half cylinder, can modify also clearSpanWidth, riseHeight, depth at purpose.' name='archFilled' type='SFBool' value='false'/>
        <field accessType='initializeOnly' appinfo='archHalfFilled: note it is a quarter cylinder, can modify also clearSpanWidth, riseHeight, depth at purpose, clearSpanWidth measure refers to a full arc, consider clearSpanWidth/2 for the archHalfFilled width.' name='archHalfFilled' type='SFBool' value='false'/>
        <field accessType='initializeOnly' appinfo='lintel: no arc is rendered, but a lintel: topAbutmentHeight on pierHeight, total height is pierHeight + topAbutmentHeight, if needed apply archHalf=true.' name='lintel' type='SFBool' value='false'/>
      </ProtoInterface>
      <ProtoBody>
        <!-- First node determines node type of this prototype -->
        <!-- IndexedFaceset creates arch -->
        <Transform DEF='ArchTransform'>
          <Shape DEF='Arch'>
            <IndexedFaceSet DEF='ArchIndex' convex='false' creaseAngle='0' solid='false'>
              <Coordinate DEF='ArchChoord'/>
            </IndexedFaceSet>
            <Appearance>
              <Material DEF='MaterialNode'>
                <IS>
                  <connect nodeField='emissiveColor' protoField='emissiveColor'/>
                  <connect nodeField='diffuseColor' protoField='diffuseColor'/>
                </IS>
              </Material>
            </Appearance>
          </Shape>
        </Transform>
        <!-- Subsequent nodes do not render, but still must be a valid X3D subgraph -->
        <!-- This embedded Script provides the X3D author with additional visibility and control over prototype inputs and outputs -->
            <Script DEF='ArchPrototypeScript' url='"ArchPrototypeScript.js" "http://X3dGraphics.com/examples/X3dForAdvancedModeling/Buildings/ArchPrototypeScript.js"'>
          <!-- INPUT PARAMETERS -->
          <!-- General parameters -->
          <!-- Parameters to create to create shapes related to arch: put true to apply -->
          <!-- OUTPUT PARAMETERS -->
          <field accessType='initializeOnly' appinfo='user or default input for clearSpanWidth parameter' name='clearSpanWidth' type='SFFloat'/>
          <field accessType='initializeOnly' appinfo='user or default input for riseHeight parameter' name='riseHeight' type='SFFloat'/>
          <field accessType='initializeOnly' appinfo='user or default input for depth parameter' name='depth' type='SFFloat'/>
          <field accessType='initializeOnly' appinfo='user or default input for topAbutmentHeight parameter' name='topAbutmentHeight' type='SFFloat'/>
          <field accessType='initializeOnly' appinfo='user or default input for pierWidth parameter' name='pierWidth' type='SFFloat'/>
          <field accessType='initializeOnly' appinfo='user or default input for pierHeight parameter' name='pierHeight' type='SFFloat'/>
          <field accessType='initializeOnly' appinfo='user or default input for archHalf parameter' name='archHalf' type='SFBool'/>
          <field accessType='initializeOnly' appinfo='user or default input for archHalfExtensionWidth parameter' name='archHalfExtensionWidth' type='SFFloat'/>
          <field accessType='initializeOnly' appinfo='user or default input for onlyIntrados parameter' name='onlyIntrados' type='SFBool'/>
          <field accessType='initializeOnly' appinfo='user or default input for archFilled parameter' name='archFilled' type='SFBool'/>
          <field accessType='initializeOnly' appinfo='user or default input for archHalfFilled parameter' name='archHalfFilled' type='SFBool'/>
          <field accessType='initializeOnly' appinfo='user or default input for lintel parameter' name='lintel' type='SFBool'/>
          <field accessType='outputOnly' appinfo='computedScale: modify scale field - NOTE it is not used to modify the whole arch, but to modify clearSpanWidth, riseHeight, depth. It does not affect topAbutmentHeight, pierWidth, pierHeight, archHalfExtensionWidth' name='computedScale' type='SFVec3f'/>
          <field accessType='outputOnly' appinfo='send computed points to the Coordinate node' name='pointOut' type='MFVec3f'/>
          <field accessType='outputOnly' appinfo='send computed indices to the IndexedFaceSet node' name='indexOut' type='MFInt32'/>
          <IS>
            <connect nodeField='clearSpanWidth' protoField='clearSpanWidth'/>
            <connect nodeField='riseHeight' protoField='riseHeight'/>
            <connect nodeField='depth' protoField='depth'/>
            <connect nodeField='pierWidth' protoField='pierWidth'/>
            <connect nodeField='topAbutmentHeight' protoField='topAbutmentHeight'/>
            <connect nodeField='pierHeight' protoField='pierHeight'/>
            <connect nodeField='archHalf' protoField='archHalf'/>
            <connect nodeField='archHalfExtensionWidth' protoField='archHalfExtensionWidth'/>
            <connect nodeField='onlyIntrados' protoField='onlyIntrados'/>
            <connect nodeField='archFilled' protoField='archFilled'/>
            <connect nodeField='archHalfFilled' protoField='archHalfFilled'/>
            <connect nodeField='lintel' protoField='lintel'/>
          </IS>
        </Script>
        <ROUTE fromField='computedScale' fromNode='ArchPrototypeScript' toField='scale' toNode='ArchTransform'/>
        <ROUTE fromField='pointOut' fromNode='ArchPrototypeScript' toField='point' toNode='ArchChoord'/>
        <ROUTE fromField='indexOut' fromNode='ArchPrototypeScript' toField='set_coordIndex' toNode='ArchIndex'/>
      </ProtoBody>
    </ProtoDeclare>
    <ProtoInstance DEF='ArchInstance' name='ArchPrototype'>
      <fieldValue name='diffuseColor' value='0.5 0.3 0.6'/>
      <fieldValue name='emissiveColor' value='0.5 0.3 0.6'/>
      <fieldValue name='clearSpanWidth' value='5'/>
      <fieldValue name='riseHeight' value='2.5'/>
      <fieldValue name='depth' value='2'/>
      <fieldValue name='topAbutmentHeight' value='0.6'/>
      <fieldValue name='pierWidth' value='1'/>
      <fieldValue name='pierHeight' value='2'/>
    </ProtoInstance>
    <!-- Add any ROUTEs here that connect ProtoInstance to/from prior nodes in Scene (and outside of ProtoDeclare) -->
    <Inline DEF='CoordinateAxes' url='"../../X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.wrl" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter03-Grouping/CoordinateAxes.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl"'/>
  </Scene>
</X3D>
  </body>
</html>