@prefix :        <https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.ttl#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema:  <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix x3d:     <https://www.web3d.org/specifications/x3d-4.0.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.0#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.0' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.0.xsd' .
:head a owl:NamedIndividual, x3do:head ;
  x3do:hasParent :X3D ;
  x3do:hasMeta :meta_1_1, :meta_1_2, :meta_1_3, :meta_1_4, :meta_1_5, :meta_1_6, :meta_1_7, :meta_1_8 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'SimpleBuildingConstructionPrototypes.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Don Brutzman' ;
  x3do:name 'creator' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '17 October 2001' ;
  x3do:name 'created' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '20 October 2019' ;
  x3do:name 'modified' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Prototypes for simple building construction: Floor, Wall, Level and Building.' ;
  x3do:name 'description' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.x3d' ;
  x3do:name 'identifier' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "SimpleBuildingConstructionPrototypes.x3d" .
:meta dcterms:creator "Don Brutzman" .
:meta dcterms:created "17 October 2001" .
:meta dcterms:modified "20 October 2019" .
:meta dcterms:description "Prototypes for simple building construction: Floor, Wall, Level and Building." .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.x3d" .
:meta dcterms:generator "X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit" .
:meta dcterms:license "../../license.html" .
:Scene a owl:NamedIndividual, x3do:Scene ;
  x3do:hasParent :X3D ;
  x3do:hasChildren :WorldInfo_2_1, :Viewpoint_2_6, :Background_2_7, :Anchor_2_8 ;
  x3do:hasProtoDeclare :ProtoDeclare_2_2, :ProtoDeclare_2_3, :ProtoDeclare_2_4, :ProtoDeclare_2_5 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'SimpleBuildingConstructionPrototypes.x3d' .
:ProtoDeclare_2_2 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_2_1 ;
  x3do:hasProtoBody :ProtoBody_2_2_2 ;
  x3do:appinfo 'Each Floor cantains the current floor surface plus a ceiling surface for the floor immediately underneath. A Floor does not include exterior or interior wall polygons.' ;
  x3do:name 'Floor' .
:ProtoInterface_2_2_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_2 ;
  x3do:hasField :field_2_2_1_1, :field_2_2_1_2, :field_2_2_1_3, :field_2_2_1_4, :field_2_2_1_5, :field_2_2_1_6, :field_2_2_1_7, :field_2_2_1_8, :field_2_2_1_9, :field_2_2_1_10 .
:field_2_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Identifying name for this Floor.' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Description info for this construction.' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:hasCoord :Coordinate_2_2_1_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'single-value Coordinate node with dimension x=width y=height z=depth in meters' ;
  x3do:name 'size' ;
  x3do:type 'SFNode' .
:Coordinate_2_2_1_3_1 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :field_2_2_1_3 .
:field_2_2_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:hasAppearance :DefaultFloorAppearance ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Appearance node with Material colors ImageTexture etc. for this construction.' ;
  x3do:name 'floorAppearance' ;
  x3do:type 'SFNode' .
:DefaultFloorAppearance a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :field_2_2_1_4 ;
  x3do:hasMaterial :Material_2_2_1_4_1_1 ;
  x3do:DEF 'DefaultFloorAppearance' .
:Material_2_2_1_4_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :DefaultFloorAppearance ;
  x3do:diffuseColor ( 0.2 0.2 0.2 ) .
:field_2_2_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:hasAppearance :DefaultCeilingAppearance ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Appearance node with Material colors ImageTexture etc. for this construction.' ;
  x3do:name 'ceilingAppearance' ;
  x3do:type 'SFNode' .
:DefaultCeilingAppearance a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :field_2_2_1_5 ;
  x3do:hasMaterial :Material_2_2_1_5_1_1 ;
  x3do:DEF 'DefaultCeilingAppearance' .
:Material_2_2_1_5_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :DefaultCeilingAppearance .
:field_2_2_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Whether sides are visible.' ;
  x3do:name 'showSides' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_2_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'width of front side of floor aligned with local X axis.' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_2_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'height of vertical distance between floor and ceiling directly underneath aligned with local Y axis.' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_2_1_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'depth of horizontal side of floor aligned with local -Z axis.' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_2_1_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Indicate whether initialization complete.' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:ProtoBody_2_2_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_2 ;
  x3do:hasChildren :FloorRoot .
:FloorRoot a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_2_2 ;
  x3do:hasChildren :LowerLeftOutsideCornerLocation, :FloorConstructionScript ;
  x3do:hasROUTE :ROUTE_2_2_2_1_3, :ROUTE_2_2_2_1_4 ;
  x3do:DEF 'FloorRoot' .
:LowerLeftOutsideCornerLocation a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :FloorRoot ;
  x3do:hasChildren :Floor, :Ceiling, :FloorSidesSwitch ;
  x3do:DEF 'LowerLeftOutsideCornerLocation' .
:Floor a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :LowerLeftOutsideCornerLocation ;
  x3do:hasIS :IS_2_2_2_1_1_1_1 ;
  x3do:hasGeometry :IndexedFaceSet_2_2_2_1_1_1_2 ;
  x3do:DEF 'Floor' .
:IS_2_2_2_1_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Floor ;
  x3do:hasConnect :connect_2_2_2_1_1_1_1_1 .
:connect_2_2_2_1_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_1_1 ;
  x3do:nodeField 'appearance' ;
  x3do:protoField 'floorAppearance' .
:IndexedFaceSet_2_2_2_1_1_1_2 a owl:NamedIndividual, x3do:IndexedFaceSet ;
  x3do:hasParent :Floor ;
  x3do:hasCoord :FloorCoordinate ;
  x3do:coordIndex ( 0 1 2 3 0 -1 ) .
:FloorCoordinate a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedFaceSet_2_2_2_1_1_1_2 ;
  x3do:DEF 'FloorCoordinate' .
:Ceiling a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :LowerLeftOutsideCornerLocation ;
  x3do:hasIS :IS_2_2_2_1_1_2_1 ;
  x3do:hasGeometry :IndexedFaceSet_2_2_2_1_1_2_2 ;
  x3do:DEF 'Ceiling' .
:IS_2_2_2_1_1_2_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Ceiling ;
  x3do:hasConnect :connect_2_2_2_1_1_2_1_1 .
:connect_2_2_2_1_1_2_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_2_1 ;
  x3do:nodeField 'appearance' ;
  x3do:protoField 'ceilingAppearance' .
:IndexedFaceSet_2_2_2_1_1_2_2 a owl:NamedIndividual, x3do:IndexedFaceSet ;
  x3do:hasParent :Ceiling ;
  x3do:hasCoord :FloorCoordinate-USE-1 ;
  x3do:coordIndex ( 4 7 6 5 4 -1 ) .
:FloorCoordinate-USE-1 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedFaceSet_2_2_2_1_1_2_2 ;
  owl:sameAs :FloorCoordinate . # DEF matching this USE
:FloorSidesSwitch a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :LowerLeftOutsideCornerLocation ;
  x3do:hasChildren :FloorSides ;
  x3do:DEF 'FloorSidesSwitch' ;
  x3do:whichChoice -1 .
:FloorSides a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :FloorSidesSwitch ;
  x3do:hasIS :IS_2_2_2_1_1_3_1_1 ;
  x3do:hasGeometry :IndexedFaceSet_2_2_2_1_1_3_1_2 ;
  x3do:DEF 'FloorSides' .
:IS_2_2_2_1_1_3_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :FloorSides ;
  x3do:hasConnect :connect_2_2_2_1_1_3_1_1_1 .
:connect_2_2_2_1_1_3_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_1_3_1_1 ;
  x3do:nodeField 'appearance' ;
  x3do:protoField 'floorAppearance' .
:IndexedFaceSet_2_2_2_1_1_3_1_2 a owl:NamedIndividual, x3do:IndexedFaceSet ;
  x3do:hasParent :FloorSides ;
  x3do:hasCoord :FloorCoordinate-USE-2 ;
  x3do:coordIndex ( 0 3 7 4 -1 3 2 6 7 -1 1 5 6 2 -1 0 4 5 1 -1 ) ;
  x3do:solid false .
:FloorCoordinate-USE-2 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedFaceSet_2_2_2_1_1_3_1_2 ;
  owl:sameAs :FloorCoordinate . # DEF matching this USE
:FloorConstructionScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :FloorRoot ;
  x3do:hasField :field_2_2_2_1_2_1, :field_2_2_2_1_2_2, :field_2_2_2_1_2_3, :field_2_2_2_1_2_4, :field_2_2_2_1_2_5, :field_2_2_2_1_2_6, :field_2_2_2_1_2_7, :field_2_2_2_1_2_8, :field_2_2_2_1_2_9, :field_2_2_2_1_2_10, :field_2_2_2_1_2_11 ;
  x3do:hasIS :IS_2_2_2_1_2_12 ;
  x3do:DEF 'FloorConstructionScript' ;
  x3do:directOutput true ;
  x3do:sourceCode """
ecmascript:

function tracePrint (outputString)
{
	if (traceEnabled) Browser.println ('[Floor' + name + ']' + outputString);
}
function alwaysPrint (outputString)
{
	Browser.println ('[Floor' + name + ']' + outputString);
}
function initialize ()
{
	built = false;
	tracePrint ('description=' + description);
	tracePrint ('showSides=' + showSides);
	if (showSides == true) wallsVisible = 0; // goes to Switch whichChoice
	tracePrint ('wallsVisible=' + wallsVisible);
	if ((size.point.length == 0) || (size.point.length > 1))
		alwaysPrint ('** warning, size.point.length =' + size.point.length + ' rather than 1');
	width  = size.point[0].x;
	height = size.point[0].y;
	depth  = size.point[0].z;
	tracePrint ('(width, height, depth)=(' + width + ',' + height + ',' +  depth + ')');
	// floor is immediately above ceiling
	floorPoints = new MFVec3f (
		new SFVec3f (0, 0, 0),
		new SFVec3f (width, 0, 0),
		new SFVec3f (width, 0, -depth),
		new SFVec3f (0, 0, -depth),
		new SFVec3f (0, -height, 0),
		new SFVec3f (width, -height, 0),
		new SFVec3f (width, -height, -depth),
		new SFVec3f (0, -height, -depth));
	tracePrint ('floorPoints=' + floorPoints);
	built = true;
	tracePrint ('built=' + built);
}
""" .
:field_2_2_2_1_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_2_2_1_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_2_2_1_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'size' ;
  x3do:type 'SFNode' .
:field_2_2_2_1_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'showSides' ;
  x3do:type 'SFBool' .
:field_2_2_2_1_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'wallsVisible' ;
  x3do:type 'SFInt32' .
:field_2_2_2_1_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'floorPoints' ;
  x3do:type 'MFVec3f' .
:field_2_2_2_1_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_2_2_1_2_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_2_2_1_2_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_2_2_1_2_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_2_2_1_2_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:IS_2_2_2_1_2_12 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :FloorConstructionScript ;
  x3do:hasConnect :connect_2_2_2_1_2_12_1, :connect_2_2_2_1_2_12_2, :connect_2_2_2_1_2_12_3, :connect_2_2_2_1_2_12_4, :connect_2_2_2_1_2_12_5, :connect_2_2_2_1_2_12_6, :connect_2_2_2_1_2_12_7, :connect_2_2_2_1_2_12_8 .
:connect_2_2_2_1_2_12_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'name' ;
  x3do:protoField 'name' .
:connect_2_2_2_1_2_12_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'description' ;
  x3do:protoField 'description' .
:connect_2_2_2_1_2_12_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'size' ;
  x3do:protoField 'size' .
:connect_2_2_2_1_2_12_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'showSides' ;
  x3do:protoField 'showSides' .
:connect_2_2_2_1_2_12_5 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'width' ;
  x3do:protoField 'width' .
:connect_2_2_2_1_2_12_6 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'height' ;
  x3do:protoField 'height' .
:connect_2_2_2_1_2_12_7 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'depth' ;
  x3do:protoField 'depth' .
:connect_2_2_2_1_2_12_8 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_2_12 ;
  x3do:nodeField 'built' ;
  x3do:protoField 'built' .
:ROUTE_2_2_2_1_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :FloorRoot ;
  x3do:fromField 'floorPoints' ;
  x3do:fromNode 'FloorConstructionScript' ;
  x3do:toField 'point' ;
  x3do:toNode 'FloorCoordinate' .
:ROUTE_2_2_2_1_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :FloorRoot ;
  x3do:fromField 'wallsVisible' ;
  x3do:fromNode 'FloorConstructionScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'FloorSidesSwitch' .
:ProtoDeclare_2_3 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_3_1 ;
  x3do:hasProtoBody :ProtoBody_2_3_2 ;
  x3do:appinfo 'Each Wall contains exterior and interior walls.' ;
  x3do:name 'Wall' .
:ProtoInterface_2_3_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_3 ;
  x3do:hasField :field_2_3_1_1, :field_2_3_1_2, :field_2_3_1_3, :field_2_3_1_4, :field_2_3_1_5, :field_2_3_1_6, :field_2_3_1_7, :field_2_3_1_8, :field_2_3_1_9, :field_2_3_1_10 .
:field_2_3_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Identifying name for this Wall.' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_3_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Description info for this construction.' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_3_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:hasCoord :Coordinate_2_3_1_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'single-value Coordinate node with dimension x=width y=height z=depth in meters' ;
  x3do:name 'size' ;
  x3do:type 'SFNode' .
:Coordinate_2_3_1_3_1 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :field_2_3_1_3 ;
  x3do:point ( 0 0 0 ) .
:field_2_3_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:hasAppearance :DefaultInteriorAppearance ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Appearance node with Material colors ImageTexture etc. for this construction.' ;
  x3do:name 'interiorAppearance' ;
  x3do:type 'SFNode' .
:DefaultInteriorAppearance a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :field_2_3_1_4 ;
  x3do:hasMaterial :Material_2_3_1_4_1_1 ;
  x3do:DEF 'DefaultInteriorAppearance' .
:Material_2_3_1_4_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :DefaultInteriorAppearance ;
  x3do:diffuseColor ( 0.4 0.4 0.4 ) .
:field_2_3_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:hasAppearance :DefaultExteriorAppearance ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Appearance node with Material colors ImageTexture etc. for this construction.' ;
  x3do:name 'exteriorAppearance' ;
  x3do:type 'SFNode' .
:DefaultExteriorAppearance a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :field_2_3_1_5 ;
  x3do:hasMaterial :Material_2_3_1_5_1_1 ;
  x3do:DEF 'DefaultExteriorAppearance' .
:Material_2_3_1_5_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :DefaultExteriorAppearance ;
  x3do:diffuseColor ( 0.6 0.6 0.6 ) .
:field_2_3_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Whether sides are visible.' ;
  x3do:name 'showSides' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_3_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'width of horizontal side of wall aligned with local X axis.' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_3_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'height of Wall aligned with local Y axis.' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_3_1_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'depth of horizontal thickness of Wall aligned with local -Z axis.' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_3_1_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Indicate whether initialization complete.' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:ProtoBody_2_3_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_3 ;
  x3do:hasChildren :WallRoot .
:WallRoot a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:hasChildren :LowerLeftOutsideCornerLocationWall, :WallConstructionScript ;
  x3do:hasROUTE :ROUTE_2_3_2_1_3, :ROUTE_2_3_2_1_4 ;
  x3do:DEF 'WallRoot' .
:LowerLeftOutsideCornerLocationWall a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :WallRoot ;
  x3do:hasChildren :InteriorWall, :ExteriorWall, :WallSidesSwitch ;
  x3do:DEF 'LowerLeftOutsideCornerLocationWall' .
:InteriorWall a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :LowerLeftOutsideCornerLocationWall ;
  x3do:hasIS :IS_2_3_2_1_1_1_1 ;
  x3do:hasGeometry :IndexedFaceSet_2_3_2_1_1_1_2 ;
  x3do:DEF 'InteriorWall' .
:IS_2_3_2_1_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :InteriorWall ;
  x3do:hasConnect :connect_2_3_2_1_1_1_1_1 .
:connect_2_3_2_1_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_1_1_1 ;
  x3do:nodeField 'appearance' ;
  x3do:protoField 'interiorAppearance' .
:IndexedFaceSet_2_3_2_1_1_1_2 a owl:NamedIndividual, x3do:IndexedFaceSet ;
  x3do:hasParent :InteriorWall ;
  x3do:hasCoord :WallCoordinate ;
  x3do:coordIndex ( 4 7 6 5 4 -1 ) .
:WallCoordinate a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedFaceSet_2_3_2_1_1_1_2 ;
  x3do:DEF 'WallCoordinate' .
:ExteriorWall a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :LowerLeftOutsideCornerLocationWall ;
  x3do:hasIS :IS_2_3_2_1_1_2_1 ;
  x3do:hasGeometry :IndexedFaceSet_2_3_2_1_1_2_2 ;
  x3do:DEF 'ExteriorWall' .
:IS_2_3_2_1_1_2_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :ExteriorWall ;
  x3do:hasConnect :connect_2_3_2_1_1_2_1_1 .
:connect_2_3_2_1_1_2_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_1_2_1 ;
  x3do:nodeField 'appearance' ;
  x3do:protoField 'exteriorAppearance' .
:IndexedFaceSet_2_3_2_1_1_2_2 a owl:NamedIndividual, x3do:IndexedFaceSet ;
  x3do:hasParent :ExteriorWall ;
  x3do:hasCoord :WallCoordinate-USE-1 ;
  x3do:coordIndex ( 0 1 2 3 0 -1 ) .
:WallCoordinate-USE-1 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedFaceSet_2_3_2_1_1_2_2 ;
  owl:sameAs :WallCoordinate . # DEF matching this USE
:WallSidesSwitch a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :LowerLeftOutsideCornerLocationWall ;
  x3do:hasChildren :WallSides ;
  x3do:DEF 'WallSidesSwitch' ;
  x3do:whichChoice -1 .
:WallSides a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :WallSidesSwitch ;
  x3do:hasIS :IS_2_3_2_1_1_3_1_1 ;
  x3do:hasGeometry :IndexedFaceSet_2_3_2_1_1_3_1_2 ;
  x3do:DEF 'WallSides' .
:IS_2_3_2_1_1_3_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :WallSides ;
  x3do:hasConnect :connect_2_3_2_1_1_3_1_1_1 .
:connect_2_3_2_1_1_3_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_1_3_1_1 ;
  x3do:nodeField 'appearance' ;
  x3do:protoField 'exteriorAppearance' .
:IndexedFaceSet_2_3_2_1_1_3_1_2 a owl:NamedIndividual, x3do:IndexedFaceSet ;
  x3do:hasParent :WallSides ;
  x3do:hasCoord :WallCoordinate-USE-2 ;
  x3do:coordIndex ( 0 3 7 4 -1 3 2 6 7 -1 1 5 6 2 -1 0 4 5 1 -1 ) .
:WallCoordinate-USE-2 a owl:NamedIndividual, x3do:Coordinate ;
  x3do:hasParent :IndexedFaceSet_2_3_2_1_1_3_1_2 ;
  owl:sameAs :WallCoordinate . # DEF matching this USE
:WallConstructionScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :WallRoot ;
  x3do:hasField :field_2_3_2_1_2_1, :field_2_3_2_1_2_2, :field_2_3_2_1_2_3, :field_2_3_2_1_2_4, :field_2_3_2_1_2_5, :field_2_3_2_1_2_6, :field_2_3_2_1_2_7, :field_2_3_2_1_2_8, :field_2_3_2_1_2_9, :field_2_3_2_1_2_10, :field_2_3_2_1_2_11 ;
  x3do:hasIS :IS_2_3_2_1_2_12 ;
  x3do:DEF 'WallConstructionScript' ;
  x3do:directOutput true ;
  x3do:sourceCode """
ecmascript:

function tracePrint (outputString)
{
	if (traceEnabled) Browser.println ('[Wall' + name + ']' + outputString);
}
function alwaysPrint (outputString)
{
	Browser.println ('[Wall' + name + ']' + outputString);
}
function initialize ()
{
	built = false;
	tracePrint ('description=' + description);
	tracePrint ('showSides=' + showSides);
	if (showSides == true) wallsVisible = 0; // goes to Switch whichChoice
	tracePrint ('wallsVisible=' + wallsVisible);
	if ((size.point.length == 0) || (size.point.length > 1))
		alwaysPrint ('** warning, size.point.length =' + size.point.length + ' rather than 1');
	width  = size.point[0].x;
	height = size.point[0].y;
	depth  = size.point[0].z;
	tracePrint ('(width, height, depth)=(' + width + ',' + height + ',' +  depth + ')');
	coordinatePoints = new MFVec3f (
		new SFVec3f (0, 0, 0),
		new SFVec3f (width, 0, 0),
		new SFVec3f (width, height, 0),
		new SFVec3f (0, height, 0),
		new SFVec3f (0, 0, -depth),
		new SFVec3f (width, 0, -depth),
		new SFVec3f (width, height, -depth),
		new SFVec3f (0, height, -depth));
	tracePrint ('coordinatePoints=' + coordinatePoints);
	built = true;
	tracePrint ('built=' + built);
}
""" .
:field_2_3_2_1_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_3_2_1_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_3_2_1_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'size' ;
  x3do:type 'SFNode' .
:field_2_3_2_1_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'showSides' ;
  x3do:type 'SFBool' .
:field_2_3_2_1_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'wallsVisible' ;
  x3do:type 'SFInt32' .
:field_2_3_2_1_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'coordinatePoints' ;
  x3do:type 'MFVec3f' .
:field_2_3_2_1_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_3_2_1_2_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_3_2_1_2_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_3_2_1_2_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_3_2_1_2_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :WallConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:IS_2_3_2_1_2_12 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :WallConstructionScript ;
  x3do:hasConnect :connect_2_3_2_1_2_12_1, :connect_2_3_2_1_2_12_2, :connect_2_3_2_1_2_12_3, :connect_2_3_2_1_2_12_4, :connect_2_3_2_1_2_12_5, :connect_2_3_2_1_2_12_6, :connect_2_3_2_1_2_12_7, :connect_2_3_2_1_2_12_8 .
:connect_2_3_2_1_2_12_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'name' ;
  x3do:protoField 'name' .
:connect_2_3_2_1_2_12_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'description' ;
  x3do:protoField 'description' .
:connect_2_3_2_1_2_12_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'size' ;
  x3do:protoField 'size' .
:connect_2_3_2_1_2_12_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'showSides' ;
  x3do:protoField 'showSides' .
:connect_2_3_2_1_2_12_5 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'width' ;
  x3do:protoField 'width' .
:connect_2_3_2_1_2_12_6 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'height' ;
  x3do:protoField 'height' .
:connect_2_3_2_1_2_12_7 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'depth' ;
  x3do:protoField 'depth' .
:connect_2_3_2_1_2_12_8 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_2_12 ;
  x3do:nodeField 'built' ;
  x3do:protoField 'built' .
:ROUTE_2_3_2_1_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :WallRoot ;
  x3do:fromField 'coordinatePoints' ;
  x3do:fromNode 'WallConstructionScript' ;
  x3do:toField 'point' ;
  x3do:toNode 'WallCoordinate' .
:ROUTE_2_3_2_1_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :WallRoot ;
  x3do:fromField 'wallsVisible' ;
  x3do:fromNode 'WallConstructionScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'WallSidesSwitch' .
:ProtoDeclare_2_4 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_4_1 ;
  x3do:hasProtoBody :ProtoBody_2_4_2 ;
  x3do:appinfo 'collection of a Floor and four Walls working in order up from lowest level (i.e. story) of the Building' ;
  x3do:name 'Level' .
:ProtoInterface_2_4_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_4 ;
  x3do:hasField :field_2_4_1_1, :field_2_4_1_2, :field_2_4_1_3, :field_2_4_1_4, :field_2_4_1_5, :field_2_4_1_6, :field_2_4_1_7, :field_2_4_1_8, :field_2_4_1_9, :field_2_4_1_10, :field_2_4_1_11 .
:field_2_4_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Identifying name for this Level.' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_4_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Description info for this construction.' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_4_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasChildren :Group_2_4_1_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'contains single Floor node' ;
  x3do:name 'floor' ;
  x3do:type 'MFNode' .
:Group_2_4_1_3_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :field_2_4_1_3 .
:field_2_4_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasChildren :ProtoInstance_2_4_1_4_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'contains single front Wall node' ;
  x3do:name 'frontWall' ;
  x3do:type 'MFNode' .
:ProtoInstance_2_4_1_4_1 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :field_2_4_1_4 ;
  x3do:name 'Wall' .
:field_2_4_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasChildren :ProtoInstance_2_4_1_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'contains single right-side Wall node' ;
  x3do:name 'rightWall' ;
  x3do:type 'MFNode' .
:ProtoInstance_2_4_1_5_1 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :field_2_4_1_5 ;
  x3do:name 'Wall' .
:field_2_4_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasChildren :ProtoInstance_2_4_1_6_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'contains single rear Wall node' ;
  x3do:name 'rearWall' ;
  x3do:type 'MFNode' .
:ProtoInstance_2_4_1_6_1 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :field_2_4_1_6 ;
  x3do:name 'Wall' .
:field_2_4_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:hasChildren :ProtoInstance_2_4_1_7_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'contains single left-side Wall node' ;
  x3do:name 'leftWall' ;
  x3do:type 'MFNode' .
:ProtoInstance_2_4_1_7_1 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :field_2_4_1_7 ;
  x3do:name 'Wall' .
:field_2_4_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Calculated width of horizontal side of Level aligned with local X axis.' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_4_1_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Calculated height of Level aligned with local Y axis.' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_4_1_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Calculated depth of horizontal thickness of Level aligned with local -Z axis.' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_4_1_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Indicate whether initialization complete.' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:ProtoBody_2_4_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_4 ;
  x3do:hasChildren :LevelRoot .
:LevelRoot a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_4_2 ;
  x3do:hasChildren :FloorTransform, :FrontWallTransform, :RightWallTransform, :RearWallTransform, :LeftWallTransform, :LevelConstructionScript, :LevelInitializeAfterChildrenReady ;
  x3do:hasROUTE :ROUTE_2_4_2_1_7, :ROUTE_2_4_2_1_8, :ROUTE_2_4_2_1_9 ;
  x3do:DEF 'LevelRoot' .
:FloorTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LevelRoot ;
  x3do:hasIS :IS_2_4_2_1_1_1 ;
  x3do:DEF 'FloorTransform' .
:IS_2_4_2_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :FloorTransform ;
  x3do:hasConnect :connect_2_4_2_1_1_1_1 .
:connect_2_4_2_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_1_1 ;
  x3do:nodeField 'children' ;
  x3do:protoField 'floor' .
:FrontWallTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LevelRoot ;
  x3do:hasIS :IS_2_4_2_1_2_1 ;
  x3do:DEF 'FrontWallTransform' .
:IS_2_4_2_1_2_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :FrontWallTransform ;
  x3do:hasConnect :connect_2_4_2_1_2_1_1 .
:connect_2_4_2_1_2_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_2_1 ;
  x3do:nodeField 'children' ;
  x3do:protoField 'frontWall' .
:RightWallTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LevelRoot ;
  x3do:hasIS :IS_2_4_2_1_3_1 ;
  x3do:DEF 'RightWallTransform' ;
  x3do:rotation ( 0 1 0 1.57079 ) .
:IS_2_4_2_1_3_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :RightWallTransform ;
  x3do:hasConnect :connect_2_4_2_1_3_1_1 .
:connect_2_4_2_1_3_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_3_1 ;
  x3do:nodeField 'children' ;
  x3do:protoField 'rightWall' .
:RearWallTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LevelRoot ;
  x3do:hasIS :IS_2_4_2_1_4_1 ;
  x3do:DEF 'RearWallTransform' ;
  x3do:rotation ( 0 1 0 3.1416 ) .
:IS_2_4_2_1_4_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :RearWallTransform ;
  x3do:hasConnect :connect_2_4_2_1_4_1_1 .
:connect_2_4_2_1_4_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_4_1 ;
  x3do:nodeField 'children' ;
  x3do:protoField 'rearWall' .
:LeftWallTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LevelRoot ;
  x3do:hasIS :IS_2_4_2_1_5_1 ;
  x3do:DEF 'LeftWallTransform' ;
  x3do:rotation ( 0 1 0 4.7124 ) .
:IS_2_4_2_1_5_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :LeftWallTransform ;
  x3do:hasConnect :connect_2_4_2_1_5_1_1 .
:connect_2_4_2_1_5_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_5_1 ;
  x3do:nodeField 'children' ;
  x3do:protoField 'leftWall' .
:LevelConstructionScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :LevelRoot ;
  x3do:hasField :field_2_4_2_1_6_1, :field_2_4_2_1_6_2, :field_2_4_2_1_6_3, :field_2_4_2_1_6_4, :field_2_4_2_1_6_5, :field_2_4_2_1_6_6, :field_2_4_2_1_6_7, :field_2_4_2_1_6_8, :field_2_4_2_1_6_9, :field_2_4_2_1_6_10, :field_2_4_2_1_6_11, :field_2_4_2_1_6_12, :field_2_4_2_1_6_13, :field_2_4_2_1_6_14, :field_2_4_2_1_6_15, :field_2_4_2_1_6_16 ;
  x3do:hasIS :IS_2_4_2_1_6_17 ;
  x3do:DEF 'LevelConstructionScript' ;
  x3do:directOutput true ;
  x3do:sourceCode """
ecmascript:

var firstLoopWhileTrueCompleted;

function tracePrint (outputString)
{
	if (traceEnabled) Browser.println ('[Level' + name + ']' + outputString);
}
function alwaysPrint (outputString)
{
	Browser.println ('[Level' + name + ']' + outputString);
}
function initialize ()
{
	built = false;
	firstLoopWhileTrueCompleted = false;
	alwaysPrint ('initialize, built=' + built);
}
function recheckUntilBuilt (value)
{
	if      (built == true)
	{
		built = true; // resend to trigger cancellation event for TimeSensor
		if (firstLoopWhileTrueCompleted)
			alwaysPrint ('recheckUntilBuilt() continuous built=true indicates internal error');
		else firstLoopWhileTrueCompleted = true;
		return;  // done
	}
	alwaysPrint ('recheckUntilBuilt testing...');
	// following are single nodes, cast as MFNode type for IS/connect matchups
	if      (floor[0].built == false)	return;  // not yet ready
	else if (frontWall[0].built == false)	return;
	else if (rightWall[0].built == false)	return;
	else if (rearWall[0].built == false)	return;
	else if (leftWall[0].built == false)	return;
	alwaysPrint ('recheckUntilBuilt ready, initializing Level...');

	alwaysPrint ('description=' + description);
	if (floor)
	{
	//	tracePrint ('floor found');
		if (floor.length > 1)
			alwaysPrint ('** warning, more than one floor found (' +
				floor.length + ' nodes total)');
		tracePrint ('floor (width, height, depth)=(' +
			floor[0].width + ',' + floor[0].height + ',' +  floor[0].depth + ')');
	}
	else	tracePrint ('floor not found');

	if (frontWall)
	{
	//	tracePrint ('frontWall found');
		if (frontWall > 1)
			alwaysPrint ('** warning, more than one frontWall found (' +
				frontWall.length + ' nodes total)');
		tracePrint ('frontWall (width, height, depth)=(' +
			frontWall[0].width + ',' + frontWall[0].height + ',' +  frontWall[0].depth + ')');
	}
	else	tracePrint ('frontWall not found');

	if (rightWall)
	{
	//	tracePrint ('rightWall found');
		if (rightWall > 1)
			alwaysPrint ('** warning, more than one rightWall found (' +
				frontWall.length + ' nodes total)');
		tracePrint ('rightWall (width, height, depth)=(' +
			rightWall[0].width + ',' + rightWall[0].height + ',' +  rightWall[0].depth + ')');
	}

	else	tracePrint ('rightWall not found');

	if (rearWall)
	{
	//	tracePrint ('rearWall found');
		if (frontWall > 1)
			alwaysPrint ('** warning, more than one rearWall found (' +
				rearWall + ' nodes total)');
		tracePrint ('rearWall (width, height, depth)=(' +
			rearWall[0].width + ',' + rearWall[0].height + ',' +  rearWall[0].depth + ')');
	}
	else	tracePrint ('rearWall not found');

	if (leftWall)
	{
	//	tracePrint ('leftWall found');
		if (frontWall > 1)
			alwaysPrint ('** warning, more than one leftWall found (' +
				leftWall.length + ' nodes total)');
		tracePrint ('leftWall (width, height, depth)=(' +
			leftWall[0].width + ',' + leftWall[0].height + ',' +  leftWall[0].depth + ')');
	}
	else	tracePrint ('leftWall not found');

	if (floor && frontWall)
	{
		if ((floor[0].width != frontWall[0].width) && (floor[0].width != 0) && (frontWall[0].width != 0))
			alwaysPrint ('** warning, floor/frontWall width mismatch');
	}
	if (floor && rearWall)
	{
		if ((floor[0].width != rearWall[0].width) && (floor[0].width != 0) && (rearWall[0].width != 0))
			alwaysPrint ('** warning, floor/rearWall width mismatch');
	}
	if (floor && rightWall)
	{
		if ((floor[0].depth != rightWall[0].width) && (floor[0].depth != 0) && (rightWall[0].width != 0))
			alwaysPrint ('** warning, floor.depth/rightWall.width mismatch');
	}
	if (floor && leftWall)
	{
		if ((floor[0].depth != leftWall[0].width) && (floor[0].depth != 0) && (leftWall[0].width != 0))
			alwaysPrint ('** warning, floor.depth/leftWall.width mismatch');
	}
	if (frontWall && rearWall)
	{
		if ((frontWall[0].width != rearWall[0].width) && (frontWall[0].width != 0) && (rearWall[0].width != 0))
			alwaysPrint ('** warning, frontWall/rearWall width mismatch');
	}
	if (leftWall && rightWall)
	{
		if ((leftWall[0].width != rightWall[0].width) && (leftWall[0].width != 0) && (rightWall[0].width != 0))
			alwaysPrint ('** warning, leftWall/rightWall width mismatch');
	}

	// find first nonzero values
	width = 0;
	if (floor)                     width = floor[0].width;
	if (frontWall && (width == 0)) width = frontWall[0].width;
	if (rearWall  && (width == 0)) width = rearWall[0].width;

	height = 0;
	if      (frontWall)                  height = frontWall[0].height;
	if      (rightWall && (height == 0)) height = rightWall[0].height;
	else if (rearWall  && (height == 0)) height = rearWall[0].height;
	else if (leftWall  && (height == 0)) height = leftWall[0].height;

	depth = 0;
	if (floor)                     depth = floor[0].depth;
	if (rightWall && (depth == 0)) depth = rightWall[0].depth;
	if (leftWall  && (depth == 0)) depth = leftWall[0].depth;

	tracePrint ('(width, height, depth)=(' + width + ',' + height + ',' +  depth + ')');

	// translate wall centers (not corners)
	rightTranslation = new SFVec3f (width, 0, 0);
	tracePrint ('rightTranslation=' + rightTranslation);
	rearTranslation = new SFVec3f  (width, 0, -depth);
	tracePrint ('rearTranslation=' + rearTranslation);
	leftTranslation = new SFVec3f  (0, 0, -width/2);
	tracePrint ('leftTranslation=' + leftTranslation);
	built = true;
	tracePrint ('built=' + built);
}
""" .
:field_2_4_2_1_6_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_4_2_1_6_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_4_2_1_6_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'floor' ;
  x3do:type 'MFNode' .
:field_2_4_2_1_6_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'frontWall' ;
  x3do:type 'MFNode' .
:field_2_4_2_1_6_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'rightWall' ;
  x3do:type 'MFNode' .
:field_2_4_2_1_6_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'rearWall' ;
  x3do:type 'MFNode' .
:field_2_4_2_1_6_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'leftWall' ;
  x3do:type 'MFNode' .
:field_2_4_2_1_6_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_4_2_1_6_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_4_2_1_6_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_4_2_1_6_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'rightTranslation' ;
  x3do:type 'SFVec3f' .
:field_2_4_2_1_6_12 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'rearTranslation' ;
  x3do:type 'SFVec3f' .
:field_2_4_2_1_6_13 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'leftTranslation' ;
  x3do:type 'SFVec3f' .
:field_2_4_2_1_6_14 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_4_2_1_6_15 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'New floor or wall initialization may be complete check and recalculate until built' ;
  x3do:name 'recheckUntilBuilt' ;
  x3do:type 'SFTime' .
:field_2_4_2_1_6_16 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:IS_2_4_2_1_6_17 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :LevelConstructionScript ;
  x3do:hasConnect :connect_2_4_2_1_6_17_1, :connect_2_4_2_1_6_17_2, :connect_2_4_2_1_6_17_3, :connect_2_4_2_1_6_17_4, :connect_2_4_2_1_6_17_5, :connect_2_4_2_1_6_17_6, :connect_2_4_2_1_6_17_7, :connect_2_4_2_1_6_17_8, :connect_2_4_2_1_6_17_9, :connect_2_4_2_1_6_17_10, :connect_2_4_2_1_6_17_11 .
:connect_2_4_2_1_6_17_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'name' ;
  x3do:protoField 'name' .
:connect_2_4_2_1_6_17_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'description' ;
  x3do:protoField 'description' .
:connect_2_4_2_1_6_17_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'floor' ;
  x3do:protoField 'floor' .
:connect_2_4_2_1_6_17_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'frontWall' ;
  x3do:protoField 'frontWall' .
:connect_2_4_2_1_6_17_5 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'rightWall' ;
  x3do:protoField 'rightWall' .
:connect_2_4_2_1_6_17_6 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'rearWall' ;
  x3do:protoField 'rearWall' .
:connect_2_4_2_1_6_17_7 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'leftWall' ;
  x3do:protoField 'leftWall' .
:connect_2_4_2_1_6_17_8 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'width' ;
  x3do:protoField 'width' .
:connect_2_4_2_1_6_17_9 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'height' ;
  x3do:protoField 'height' .
:connect_2_4_2_1_6_17_10 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'depth' ;
  x3do:protoField 'depth' .
:connect_2_4_2_1_6_17_11 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_6_17 ;
  x3do:nodeField 'built' ;
  x3do:protoField 'built' .
:ROUTE_2_4_2_1_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LevelRoot ;
  x3do:fromField 'rightTranslation' ;
  x3do:fromNode 'LevelConstructionScript' ;
  x3do:toField 'translation' ;
  x3do:toNode 'RightWallTransform' .
:ROUTE_2_4_2_1_8 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LevelRoot ;
  x3do:fromField 'rearTranslation' ;
  x3do:fromNode 'LevelConstructionScript' ;
  x3do:toField 'translation' ;
  x3do:toNode 'RearWallTransform' .
:ROUTE_2_4_2_1_9 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LevelRoot ;
  x3do:fromField 'leftTranslation' ;
  x3do:fromNode 'LevelConstructionScript' ;
  x3do:toField 'translation' ;
  x3do:toNode 'LeftWallTransform' .
:LevelInitializeAfterChildrenReady a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :LevelRoot ;
  x3do:hasChildren :LevelBuiltFilter, :LevelBuiltNegation, :LevelRecalculateUntilBuilt ;
  x3do:hasROUTE :ROUTE_2_4_2_1_10_4, :ROUTE_2_4_2_1_10_5, :ROUTE_2_4_2_1_10_6, :ROUTE_2_4_2_1_10_7 ;
  x3do:DEF 'LevelInitializeAfterChildrenReady' .
:LevelBuiltFilter a owl:NamedIndividual, x3do:BooleanFilter ;
  x3do:hasParent :LevelInitializeAfterChildrenReady ;
  x3do:DEF 'LevelBuiltFilter' .
:LevelBuiltNegation a owl:NamedIndividual, x3do:BooleanFilter ;
  x3do:hasParent :LevelInitializeAfterChildrenReady ;
  x3do:DEF 'LevelBuiltNegation' .
:LevelRecalculateUntilBuilt a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :LevelInitializeAfterChildrenReady ;
  x3do:DEF 'LevelRecalculateUntilBuilt' ;
  x3do:cycleInterval '0.1' ;
  x3do:loop true .
:ROUTE_2_4_2_1_10_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LevelInitializeAfterChildrenReady ;
  x3do:fromField 'built' ;
  x3do:fromNode 'LevelConstructionScript' ;
  x3do:toField 'set_boolean' ;
  x3do:toNode 'LevelBuiltFilter' .
:ROUTE_2_4_2_1_10_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LevelInitializeAfterChildrenReady ;
  x3do:fromField 'inputTrue' ;
  x3do:fromNode 'LevelBuiltFilter' ;
  x3do:toField 'set_boolean' ;
  x3do:toNode 'LevelBuiltNegation' .
:ROUTE_2_4_2_1_10_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LevelInitializeAfterChildrenReady ;
  x3do:fromField 'inputNegate' ;
  x3do:fromNode 'LevelBuiltNegation' ;
  x3do:toField 'enabled' ;
  x3do:toNode 'LevelRecalculateUntilBuilt' .
:ROUTE_2_4_2_1_10_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :LevelInitializeAfterChildrenReady ;
  x3do:fromField 'cycleTime' ;
  x3do:fromNode 'LevelRecalculateUntilBuilt' ;
  x3do:toField 'recheckUntilBuilt' ;
  x3do:toNode 'LevelConstructionScript' .
:ProtoDeclare_2_5 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_5_1 ;
  x3do:hasProtoBody :ProtoBody_2_5_2 ;
  x3do:appinfo 'Collect prototypes for levels floors and walls to create a simple Building.' ;
  x3do:name 'Building' .
:ProtoInterface_2_5_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_5 ;
  x3do:hasField :field_2_5_1_1, :field_2_5_1_2, :field_2_5_1_3, :field_2_5_1_4, :field_2_5_1_5, :field_2_5_1_6, :field_2_5_1_7, :field_2_5_1_8, :field_2_5_1_9, :field_2_5_1_10, :field_2_5_1_11, :field_2_5_1_12, :field_2_5_1_13, :field_2_5_1_14 .
:field_2_5_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Identifying name of this Building.' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_5_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Description info for this construction.' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_5_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether or not to display author assist tools such as coordinate axes measuring grids etc.' ;
  x3do:name 'authorAssist' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_5_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'compass direction in degrees of building X axis as seen when regarding front face of building pointing from left side to right side.' ;
  x3do:name 'xHeading' ;
  x3do:type 'SFFloat' ;
  x3do:value 0.0 .
:field_2_5_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'output rotation value calculated from xHeading as (0 1 0 xHeading * 2pi / 360)' ;
  x3do:name 'orientation' ;
  x3do:type 'SFRotation' .
:field_2_5_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'example value: 120.30 E' ;
  x3do:name 'latitude' ;
  x3do:type 'SFString' .
:field_2_5_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'example value: 20.45 N' ;
  x3do:name 'longitude' ;
  x3do:type 'SFString' .
:field_2_5_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:hasChildren :ProtoInstance_2_5_1_8_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'contains array of Level nodes' ;
  x3do:name 'levels' ;
  x3do:type 'MFNode' .
:ProtoInstance_2_5_1_8_1 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :field_2_5_1_8 ;
  x3do:name 'Level' .
:field_2_5_1_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:hasChildren :Group_2_5_1_9_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Geometry for Roof positioned above topmost Level' ;
  x3do:name 'roof' ;
  x3do:type 'SFNode' .
:Group_2_5_1_9_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :field_2_5_1_9 .
:field_2_5_1_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'height value for provided Roof geometry.' ;
  x3do:name 'roofHeight' ;
  x3do:type 'SFFloat' ;
  x3do:value 0 .
:field_2_5_1_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Calculated width of horizontal side of Building aligned with local X axis.' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_5_1_12 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Calculated height of Building aligned with local Y axis.' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_5_1_13 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Calculated depth of horizontal thickness of Building aligned with local -Z axis.' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_5_1_14 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Indicate whether initialization complete.' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:ProtoBody_2_5_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_5 ;
  x3do:hasChildren :Group_2_5_2_1 .
:Group_2_5_2_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_5_2 ;
  x3do:hasChildren :AuthorAssist1, :BuildingRoot .
:AuthorAssist1 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :Group_2_5_2_1 ;
  x3do:hasChildren :CoordinateAxesTransform ;
  x3do:DEF 'AuthorAssist1' ;
  x3do:whichChoice -1 .
:CoordinateAxesTransform a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :AuthorAssist1 ;
  x3do:hasChildren :CoordinateAxes ;
  x3do:DEF 'CoordinateAxesTransform' .
:CoordinateAxes a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :CoordinateAxesTransform ;
  x3do:DEF 'CoordinateAxes' ;
  x3do:url '"../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl"' .
:BuildingRoot a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Group_2_5_2_1 ;
  x3do:hasChildren :LevelsRoot, :BuildingConstructionScript, :BuildingInitializeAfterChildrenReady ;
  x3do:hasROUTE :ROUTE_2_5_2_1_2_3, :ROUTE_2_5_2_1_2_4, :ROUTE_2_5_2_1_2_5 ;
  x3do:DEF 'BuildingRoot' .
:LevelsRoot a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :BuildingRoot ;
  x3do:hasChildren :AuthorAssist2 ;
  x3do:DEF 'LevelsRoot' .
:AuthorAssist2 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :LevelsRoot ;
  x3do:hasChildren :AuthorAssistTransform2 ;
  x3do:DEF 'AuthorAssist2' ;
  x3do:whichChoice -1 .
:AuthorAssistTransform2 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :AuthorAssist2 ;
  x3do:hasChildren :Inline_2_5_2_1_2_1_1_1_1, :Inline_2_5_2_1_2_1_1_1_2, :Inline_2_5_2_1_2_1_1_1_3 ;
  x3do:DEF 'AuthorAssistTransform2' .
:Inline_2_5_2_1_2_1_1_1_1 a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :AuthorAssistTransform2 ;
  x3do:url '"GridXY_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXY_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXY_20x20Movable.wrl" "GridXY_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXY_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXY_20x20Movable.x3d"' .
:Inline_2_5_2_1_2_1_1_1_2 a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :AuthorAssistTransform2 ;
  x3do:url '"GridXZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Movable.wrl" "GridXZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Movable.x3d"' .
:Inline_2_5_2_1_2_1_1_1_3 a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :AuthorAssistTransform2 ;
  x3do:url '"GridYZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/GridYZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridYZ_20x20Movable.wrl" "GridYZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/GridYZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridYZ_20x20Movable.x3d"' .
:BuildingConstructionScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :BuildingRoot ;
  x3do:hasField :field_2_5_2_1_2_2_1, :field_2_5_2_1_2_2_2, :field_2_5_2_1_2_2_3, :field_2_5_2_1_2_2_4, :field_2_5_2_1_2_2_5, :field_2_5_2_1_2_2_6, :field_2_5_2_1_2_2_7, :field_2_5_2_1_2_2_8, :field_2_5_2_1_2_2_9, :field_2_5_2_1_2_2_10, :field_2_5_2_1_2_2_11, :field_2_5_2_1_2_2_12, :field_2_5_2_1_2_2_13, :field_2_5_2_1_2_2_14, :field_2_5_2_1_2_2_15, :field_2_5_2_1_2_2_16, :field_2_5_2_1_2_2_17, :field_2_5_2_1_2_2_18, :field_2_5_2_1_2_2_19 ;
  x3do:hasIS :IS_2_5_2_1_2_2_20 ;
  x3do:DEF 'BuildingConstructionScript' ;
  x3do:directOutput true ;
  x3do:sourceCode """
ecmascript:

var firstLoopWhileTrueCompleted;

function tracePrint (outputString)
{
	if (traceEnabled) Browser.println ('[Building' + name + ']' + outputString);
}
function alwaysPrint (outputString)
{
	Browser.println ('[Building' + name + ']' + outputString);
}
function initialize ()
{
	built = false;
	firstLoopWhileTrueCompleted = false;
	alwaysPrint ('initialize, built=' + built);
}
function recheckUntilBuilt (value)
{
	if      (built == true)
	{
		built = true; // resend to trigger cancellation event for TimeSensor
		if (firstLoopWhileTrueCompleted)
			alwaysPrint ('recheckUntilBuilt() continuous built=true indicates internal error');
		else firstLoopWhileTrueCompleted = true;
		return;  // done
	}
	tracePrint ('recheckUntilBuilt testing...');
	if      (built == true)			return;  // done
	for (i=0; i < levels.length; i++)
	{
		if (levels[i].built == false)	return;  // not yet ready
	}
	tracePrint ('recheckUntilBuilt ready!');

	alwaysPrint ('description=' + description);
	if (levels.length == 0)
	{
		alwaysPrint ('** warning, no levels found');
		return;
	}
	orientation = new SFRotation (0, 1, 0, -xHeading * 3.14159 / 180.0);
	LevelsRoot.rotation = orientation;
	tracePrint ('xHeading=' + xHeading + ' degrees,' + 'orientation=' + orientation);

	width  = 0;
	depth  = 0;
	incrementalHeight = 0;
	// first child of LevelsRoot is oriented AuthorAssist2 Switch
	for (i=0; i < levels.length; i++)
	{
		tracePrint ('level[' + i + ']');
		// compute max values for width, height, depth
		if (width  < levels[i].width)  width   = levels[i].width;
		if (depth  < levels[i].depth)  depth   = levels[i].depth;

		newTransform ='Transform {' +
		'translation 0' + incrementalHeight + ' 0' +
		'}';
		tracePrint ('newTransform=' + newTransform);
		newTransformNode = Browser.createVrmlFromString (newTransform); // returns MFNode
		// append newTransformNode to LevelsRoot.children
		LevelsRoot.children[i+1] = newTransformNode[0];
		// append current Level to current newTransformNode
		newTransformNode[0].children[0] = levels[i];

		incrementalHeight += levels[i].height;
		tracePrint ('incrementalHeight=' + incrementalHeight);
	}
	childCount = levels.length + 1;
	if (roof)
	{
		tracePrint ('roof');
		newTransform ='Transform {' +
		'translation 0' + incrementalHeight + ' 0' +
		'}';
		tracePrint ('newTransform=' + newTransform);
		newTransformNode = Browser.createVrmlFromString (newTransform); // returns MFNode
		// append newTransformNode to LevelsRoot.children
		LevelsRoot.children[childCount] = newTransformNode[0];
		childCount++;
		// append roof to current newTransformNode
		newTransformNode[0].children[0] = roof;
		incrementalHeight += roofHeight;
	}
	else alwaysPrint ('** warning, no roof found');

	height = incrementalHeight;
	tracePrint ('(width, height, depth)=(' + width + ',' + height + ',' +  depth + ')');
	maxDimension = width;
	if (maxDimension < height) maxDimension = height;
	if (maxDimension < depth)  maxDimension = depth;
	scale = new SFVec3f (maxDimension * 1.1, maxDimension * 1.1, maxDimension * 1.1);

	newView ='Viewpoint {' +
	'description \"' + name + ' (' + latitude + ',' + longitude + ')\"' +
	'position' + (width/2) + ' ' + (height*2.0/3.0) + ' ' + (depth*3) + ' ' +
	'}';
	tracePrint ('newView=' + newView);
	newViewNode = Browser.createVrmlFromString (newView); // returns MFNode
	// append newViewNode to LevelsRoot.children
	LevelsRoot.children[childCount] = newViewNode[0];
	childCount++;

	newView ='Viewpoint {' +
	'description \"' + name + ' (above)\"' +
	'position' + (width/2) + ' ' + (height*3.0) + ' ' + (-depth/2) + ' ' +
	'orientation 1 0 0 -1.57' +
	'}';
	tracePrint ('newView=' + newView);
	newViewNode = Browser.createVrmlFromString (newView); // returns MFNode
	// append newViewNode to LevelsRoot.children
	LevelsRoot.children[childCount] = newViewNode[0];
	childCount++;

	if (authorAssist)
	{
		tracePrint ('authorAssist');
		authorAssistChoice = 0;
	}
	else	authorAssistChoice = -1;

	tracePrint ('LevelsRoot childCount=' + childCount + ' (Switch + # levels + [roof] + Viewpoint*2)');
	built = true;
	tracePrint ('built=' + built);
}
""" .
:field_2_5_2_1_2_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_5_2_1_2_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'description' ;
  x3do:type 'MFString' .
:field_2_5_2_1_2_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'xHeading' ;
  x3do:type 'SFFloat' .
:field_2_5_2_1_2_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'orientation' ;
  x3do:type 'SFRotation' .
:field_2_5_2_1_2_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'latitude' ;
  x3do:type 'SFString' .
:field_2_5_2_1_2_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'longitude' ;
  x3do:type 'SFString' .
:field_2_5_2_1_2_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'authorAssist' ;
  x3do:type 'SFBool' .
:field_2_5_2_1_2_2_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'levels' ;
  x3do:type 'MFNode' .
:field_2_5_2_1_2_2_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'roof' ;
  x3do:type 'SFNode' .
:field_2_5_2_1_2_2_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'roofHeight' ;
  x3do:type 'SFFloat' .
:field_2_5_2_1_2_2_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:hasChildren :LevelsRoot-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'LevelsRoot' ;
  x3do:type 'SFNode' .
:LevelsRoot-USE-1 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :field_2_5_2_1_2_2_11 ;
  owl:sameAs :LevelsRoot . # DEF matching this USE
:field_2_5_2_1_2_2_12 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'width' ;
  x3do:type 'SFFloat' .
:field_2_5_2_1_2_2_13 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'height' ;
  x3do:type 'SFFloat' .
:field_2_5_2_1_2_2_14 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'depth' ;
  x3do:type 'SFFloat' .
:field_2_5_2_1_2_2_15 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'scale' ;
  x3do:type 'SFVec3f' .
:field_2_5_2_1_2_2_16 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'authorAssistChoice' ;
  x3do:type 'SFInt32' .
:field_2_5_2_1_2_2_17 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_5_2_1_2_2_18 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'New floor or wall initialization may be complete check and recalculate until built' ;
  x3do:name 'recheckUntilBuilt' ;
  x3do:type 'SFTime' .
:field_2_5_2_1_2_2_19 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'built' ;
  x3do:type 'SFBool' .
:IS_2_5_2_1_2_2_20 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :BuildingConstructionScript ;
  x3do:hasConnect :connect_2_5_2_1_2_2_20_1, :connect_2_5_2_1_2_2_20_2, :connect_2_5_2_1_2_2_20_3, :connect_2_5_2_1_2_2_20_4, :connect_2_5_2_1_2_2_20_5, :connect_2_5_2_1_2_2_20_6, :connect_2_5_2_1_2_2_20_7, :connect_2_5_2_1_2_2_20_8, :connect_2_5_2_1_2_2_20_9, :connect_2_5_2_1_2_2_20_10, :connect_2_5_2_1_2_2_20_11, :connect_2_5_2_1_2_2_20_12, :connect_2_5_2_1_2_2_20_13, :connect_2_5_2_1_2_2_20_14 .
:connect_2_5_2_1_2_2_20_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'name' ;
  x3do:protoField 'name' .
:connect_2_5_2_1_2_2_20_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'description' ;
  x3do:protoField 'description' .
:connect_2_5_2_1_2_2_20_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'authorAssist' ;
  x3do:protoField 'authorAssist' .
:connect_2_5_2_1_2_2_20_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'xHeading' ;
  x3do:protoField 'xHeading' .
:connect_2_5_2_1_2_2_20_5 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'orientation' ;
  x3do:protoField 'orientation' .
:connect_2_5_2_1_2_2_20_6 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'latitude' ;
  x3do:protoField 'latitude' .
:connect_2_5_2_1_2_2_20_7 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'longitude' ;
  x3do:protoField 'longitude' .
:connect_2_5_2_1_2_2_20_8 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'levels' ;
  x3do:protoField 'levels' .
:connect_2_5_2_1_2_2_20_9 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'roof' ;
  x3do:protoField 'roof' .
:connect_2_5_2_1_2_2_20_10 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'roofHeight' ;
  x3do:protoField 'roofHeight' .
:connect_2_5_2_1_2_2_20_11 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'width' ;
  x3do:protoField 'width' .
:connect_2_5_2_1_2_2_20_12 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'height' ;
  x3do:protoField 'height' .
:connect_2_5_2_1_2_2_20_13 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'depth' ;
  x3do:protoField 'depth' .
:connect_2_5_2_1_2_2_20_14 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_2_20 ;
  x3do:nodeField 'built' ;
  x3do:protoField 'built' .
:ROUTE_2_5_2_1_2_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :BuildingRoot ;
  x3do:fromField 'authorAssistChoice' ;
  x3do:fromNode 'BuildingConstructionScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'AuthorAssist1' .
:ROUTE_2_5_2_1_2_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :BuildingRoot ;
  x3do:fromField 'authorAssistChoice' ;
  x3do:fromNode 'BuildingConstructionScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'AuthorAssist2' .
:ROUTE_2_5_2_1_2_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :BuildingRoot ;
  x3do:fromField 'scale' ;
  x3do:fromNode 'BuildingConstructionScript' ;
  x3do:toField 'scale' ;
  x3do:toNode 'CoordinateAxesTransform' .
:BuildingInitializeAfterChildrenReady a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :BuildingRoot ;
  x3do:hasChildren :BuildingBuiltFilter, :BuildingBuiltNegation, :BuildingRecalculateUntilBuilt ;
  x3do:hasROUTE :ROUTE_2_5_2_1_2_6_4, :ROUTE_2_5_2_1_2_6_5, :ROUTE_2_5_2_1_2_6_6, :ROUTE_2_5_2_1_2_6_7 ;
  x3do:DEF 'BuildingInitializeAfterChildrenReady' .
:BuildingBuiltFilter a owl:NamedIndividual, x3do:BooleanFilter ;
  x3do:hasParent :BuildingInitializeAfterChildrenReady ;
  x3do:DEF 'BuildingBuiltFilter' .
:BuildingBuiltNegation a owl:NamedIndividual, x3do:BooleanFilter ;
  x3do:hasParent :BuildingInitializeAfterChildrenReady ;
  x3do:DEF 'BuildingBuiltNegation' .
:BuildingRecalculateUntilBuilt a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :BuildingInitializeAfterChildrenReady ;
  x3do:DEF 'BuildingRecalculateUntilBuilt' ;
  x3do:cycleInterval '0.1' ;
  x3do:loop true .
:ROUTE_2_5_2_1_2_6_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :BuildingInitializeAfterChildrenReady ;
  x3do:fromField 'built' ;
  x3do:fromNode 'BuildingConstructionScript' ;
  x3do:toField 'set_boolean' ;
  x3do:toNode 'BuildingBuiltFilter' .
:ROUTE_2_5_2_1_2_6_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :BuildingInitializeAfterChildrenReady ;
  x3do:fromField 'inputTrue' ;
  x3do:fromNode 'BuildingBuiltFilter' ;
  x3do:toField 'set_boolean' ;
  x3do:toNode 'BuildingBuiltNegation' .
:ROUTE_2_5_2_1_2_6_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :BuildingInitializeAfterChildrenReady ;
  x3do:fromField 'inputNegate' ;
  x3do:fromNode 'BuildingBuiltNegation' ;
  x3do:toField 'enabled' ;
  x3do:toNode 'BuildingRecalculateUntilBuilt' .
:ROUTE_2_5_2_1_2_6_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :BuildingInitializeAfterChildrenReady ;
  x3do:fromField 'cycleTime' ;
  x3do:fromNode 'BuildingRecalculateUntilBuilt' ;
  x3do:toField 'recheckUntilBuilt' ;
  x3do:toNode 'BuildingConstructionScript' .
:Viewpoint_2_6 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:description 'SimpleBuildingConstructionPrototypes' ;
  x3do:position ( 0 0 12 ) .
:Background_2_7 a owl:NamedIndividual, x3do:Background ;
  x3do:hasParent :Scene ;
  x3do:groundAngle ( 1.57 ) ;
  x3do:groundColor ( 0.6 0.9 0.6 0.6 0.9 0.6 ) ;
  x3do:skyColor ( 0.6 0.6 0.9 ) .
:Anchor_2_8 a owl:NamedIndividual, x3do:Anchor ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_8_1 ;
  x3do:description 'SimpleBuildingConstructionExample' ;
  x3do:parameter '"target=_blank"' ;
  x3do:url '"SimpleBuildingConstructionExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionExample.wrl" "SimpleBuildingConstructionExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionExample.x3d"' .
:Shape_2_8_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Anchor_2_8 ;
  x3do:hasGeometry :Text_2_8_1_1 ;
  x3do:hasAppearance :Appearance_2_8_1_2 .
:Text_2_8_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_8_1 ;
  x3do:hasFontStyle :FontStyle_2_8_1_1_1 ;
  x3do:string '"SimpleBuildingConstructionPrototypes" "is a prototype definition file" "" "Click this text to see" "SimpleBuildingConstructionExample"' .
:FontStyle_2_8_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_8_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' .
:Appearance_2_8_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_8_1 ;
  x3do:hasMaterial :Material_2_8_1_2_1 .
:Material_2_8_1_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_8_1_2 ;
  x3do:diffuseColor ( 0.2 0.2 0.8 ) .
