<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive'
version='3.3'
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'
xsd:noNamespaceSchemaLocation
='
https://www.web3d.org/specifications/x3d-3.3.xsd
'
>
<head>
<meta name='title' content='
ArchPrototype.x3d
'/>
<meta name='description' 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. Possibility to create shapes related to arch: ArchHalf; IntradosOnly; ArchFilled; ArchHalfFilled; Lintel. See the reference file ArchModelingDiagrams.pdf to find further information.'/>
<meta name='creator' content='Michele Foti, Don Brutzman'/>
<meta name='created' content='15 December 2014'/>
<meta name='modified' content='16 June 2020'/>
<meta name=' TODO ' content=' debug local ProtoInstance '/>
<meta name=' TODO ' content=' add test ArchPrototypeExample '/>
<meta name=' TODO ' content=' Xj3D Player Issue, bogus error on line 243 of script regarding assignment to MFInt32 value '/>
<meta name='reference' content='
ArchModelingDiagrams.pdf
'/>
<meta name='reference' content='
https://en.wikipedia.org/wiki/Arch
'/>
<meta name='identifier' content='
https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Buildings/ArchPrototype.x3d
'/>
<meta name='generator' content='X3D-Edit 3.3,
https://savage.nps.edu/X3D-Edit'/>
<meta name='license' content='
../license.html'/>
</head>
<!--
-->
<Scene>
<WorldInfo title='ArchPrototype.x3d'/>
<ProtoDeclare name='ArchPrototype' 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.'
>
<ProtoInterface>
<!-- COLOR OF ARCH -->
<field name='diffuseColor' type='SFColor' value='0.2 0.8 0.8' accessType='inputOutput'
appinfo='color of arch'
/>
<field name='emissiveColor' type='SFColor' value='0.2 0.8 0.8' accessType='inputOutput'
appinfo='color of arch'
/>
<!-- INPUT PARAMETERS -->
<!-- General parameters: measures in meters -->
<field name='clearSpanWidth' type='SFFloat' value='4' accessType='initializeOnly'
appinfo='clearSpanWidth: clearSpanWidth must be double of riseHeight to obtain an half circumference'
/>
<field name='riseHeight' type='SFFloat' value='2' accessType='initializeOnly'
appinfo='riseHeight: riseHeight must be half of clearSpanWidth to obtain an half circumference'
/>
<field name='depth' type='SFFloat' value='3' accessType='initializeOnly'
appinfo='depth'
/>
<field name='topAbutmentHeight' type='SFFloat' value='0.5' accessType='initializeOnly'
appinfo='topAbutmentHeight:topAbutmentHeight=0 means no topAbutment'
/>
<field name='pierWidth' type='SFFloat' value='0.5' accessType='initializeOnly'
appinfo='pierWidth:pierWidtht=0 means no pierWidth'
/>
<field name='pierHeight' type='SFFloat' value='1' accessType='initializeOnly'
appinfo='pierHeight: pierHeight=0 means no pierHeight'
/>
<!-- Parameters to create shapes related to arch: put true to apply -->
<field name='archHalf' type='SFBool' value='false' 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'
/>
<field name='archHalfExtensionWidth' type='SFFloat' value='0' 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.'
/>
<field name='onlyIntrados' type='SFBool' value='false' accessType='initializeOnly'
appinfo='onlyIntrados: note it is a flat curved surface, can modify also clearSpanWidth, riseHeight, depth at purpose, if needed apply archHalf=true.'
/>
<field name='archFilled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='archFilled: note it is an half cylinder, can modify also clearSpanWidth, riseHeight, depth at purpose.'
/>
<field name='archHalfFilled' type='SFBool' value='false' 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.'
/>
<field name='lintel' type='SFBool' value='false' accessType='initializeOnly'
appinfo='lintel: no arc is rendered, but a lintel: topAbutmentHeight on pierHeight, total height is pierHeight + topAbutmentHeight, if needed apply archHalf=true.'
/>
</ProtoInterface>
<ProtoBody>
<!-- First node determines node type of this prototype -->
<!-- IndexedFaceset creates arch -->
<Shape DEF='Arch'>
<!-- note that convex='false' (meaning concave geometry) is crucial for this IFS of a geometric chord to render properly -->
</IndexedFaceSet>
<Appearance>
</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 -->
<!-- INPUT PARAMETERS -->
<!-- General parameters -->
<!-- Parameters to create to create shapes related to arch: put true to apply -->
<!-- OUTPUT PARAMETERS -->
<field name='clearSpanWidth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for clearSpanWidth parameter'
/>
<field name='riseHeight' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for riseHeight parameter'
/>
<field name='depth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for depth parameter'
/>
<field name='topAbutmentHeight' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for topAbutmentHeight parameter'
/>
<field name='pierWidth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for pierWidth parameter'
/>
<field name='pierHeight' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for pierHeight parameter'
/>
<field name='archHalf' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for archHalf parameter'
/>
<field name='archHalfExtensionWidth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for archHalfExtensionWidth parameter'
/>
<field name='onlyIntrados' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for onlyIntrados parameter'
/>
<field name='archFilled' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for archFilled parameter'
/>
<field name='archHalfFilled' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for archHalfFilled parameter'
/>
<field name='lintel' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for lintel parameter'
/>
<field name='computedScale' type='SFVec3f' 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'
/>
<field name='pointOut' type='MFVec3f' accessType='outputOnly'
appinfo='send computed points to the Coordinate node'
/>
<field name='indexOut' type='MFInt32' accessType='outputOnly'
appinfo='send computed indices to the IndexedFaceSet node'
/>
<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
fromNode='
ArchPrototypeScript' fromField='computedScale' toNode='
ArchTransform' toField='scale'/>
<
ROUTE
fromNode='
ArchPrototypeScript' fromField='pointOut' toNode='
ArchChord' toField='point'/>
<
ROUTE
fromNode='
ArchPrototypeScript' fromField='indexOut' toNode='
ArchIndex' toField='set_coordIndex'/>
</ProtoBody>
</ProtoDeclare>
<ProtoInstance name='ArchPrototype' DEF='ArchInstance'>
<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>
<Shape>
<Text string='"TODO: internal and external" "prototype tests" "ArchPrototype.x3d"'>
<FontStyle family='"SANS"' justify='"MIDDLE" "MIDDLE"' style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='0.9 0.9 0.9'/>
</Appearance>
</Shape>
<!-- Add any ROUTEs here that connect ProtoInstance to/from prior nodes in Scene (and outside of ProtoDeclare) -->
<Inline DEF='CoordinateAxes'
url='
"../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d"
"../../../Savage/Tools/Authoring/CoordinateAxes.x3d"
"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl"
"../../../Savage/Tools/Authoring/CoordinateAxes.wrl"
"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl" '
/>
</Scene>
</X3D>
<!--
-->
-->
<!--
Online at
https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Buildings/ArchPrototypeIndex.html
-->
<!--
Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Buildings/ArchPrototype.x3d
-->
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->