Build a Glass House - Max

 This use case shows how to build a parametric glass house, based on the 3 design pattern (Variabilized Process, Chained Process and Cascading Process Execution).

Glass House I

  This use case shows how to build a glass house with 8 main beams.
The build steps are:
These steps are defined into a unique pipeline process. See The pipeline process execution
result
 house-all
 beam-all
 beam-clear
 beam-path-var
 beam-single
 beam-var
 transverse-all
 transverse-clear
 transverse-var
 exterior-beam-var
 window-all
 window-clear
 window-var
 vertical-window-var
 clear-all
 beam-render
house-hall process
<Process id="house-all" type="pipeline">
     <Exec processId="beam-all"/>
     <Exec processId="transverse-all"/>
     <Exec processId="window-all"/>
</Process>
clear-all process
<Process id="clear-all" type="pipeline">
     <Exec processId="beam-clear"/>
     <Exec processId="transverse-clear"/>
     <Exec processId="window-clear"/>
</Process>
main beams and columns build
beam-all process
<Process id="beam-all" type="pipeline">
     <Exec processId="beam-clear"/>
     <Exec processId="beam-path-var">
          <Var name="u" type="sequence">1-7</Var>
          <Var name="v" type="sequence" main="false">0.035;0.18;0.3225;0.465;0.616;0.75;0.90</Var>
     </Exec>
     <Exec processId="beam-single" active="true">
          <Var name="u" type="sequence">0-7</Var>
          <Var name="path">concat(beam, $u)</Var>
     </Exec>
</Process>
beam-clear process
<Process id="beam-clear" type="3d">
     <Layer name="beam" action="clear"/>
</Process>
beam-path-var process
<Process id="beam-path-var" type="3d">
     <Layer name="beam" action="current"/>
     <Object copy="beamCircle2" name="beam$u">
          <Param name="pos-rot">getPathPosRot(beam0, $v)</Param>
     </Object>
     <Object copy="small_foot" name="small_foot$u">
          <Param name="pos-rot">getPathPivot(beam0, $v).translate(0,0,-157).pos-rot</Param>
     </Object>
     <Object copy="exterior_foot" name="exterior_foot$u">
          <Param name="pos-rot">getPathPivot(beam0, $v).translate(0,-64,-153).pos-rot</Param>
     </Object>
     <Merge>
          <Param name="prefix">col$v_</Param>
          <Param name="creationId">column</Param>
          <Param name="pos">getPathPos(beam0, $v)+vector(0,0,-84)</Param>
     </Merge>
</Process>
beam-single process
<Process id="beam-single" type="pipeline">
     <Exec processId="beam-var" active="true">
          <Var name="path">$path</Var>
          <Var name="point" type="path">
               <Param name="scale">true</Param>
               <Param name="length">10</Param>
               <Param name="path">$path</Param>
          </Var>
          <Var name="gizmo" type="random">
               <Param name="min">0</Param>
               <Param name="max">360</Param>
          </Var>
     </Exec>
</Process>
beam-var process
<Process id="beam-var" type="3d">
     <Layer name="beam" action="current"/>
     <Object copy="diagonalMerge" name="$pathDiagonal$index">
          <Param name="pos">$point.pos</Param>
          <Param name="rot">$point.rot</Param>
          <Param name="scale">$point.scale</Param>
          <Param name="Uvwmap.gizmo.rotation.z_rotation">$gizmo</Param>
     </Object>
     <Object name="$pathTopSweep" varIndex="1">
          <Param name="sweep">beamTop</Param>
          <Param name="material">meditmaterials[1]</Param>
     </Object>
     <Object name="$pathBottomSweep" varIndex="1">
          <Param name="sweep">beamBottom</Param>
          <Param name="material">meditmaterials[1]</Param>
     </Object>
     <Path name="$pathTopSweep" ref="$path" type="bezier" create="true" varIndex="1">
          <Transform name="local.translate.z">5.5$point.scale</Transform>
     </Path>
     <Path name="$pathBottomSweep" ref="$path" type="bezier" create="true" varIndex="1">
          <Transform name="local.translate.z">-8.0$point.scale</Transform>
     </Path>
</Process>
exterior-beam-var process
<Process id="exterior-beam-var" type="3d">
     <Layer name="transverse" action="current"/>
     <Object name="exteriorBeam$u">
          <Param name="sweep">bottomProfil</Param>
          <Param name="material">meditmaterials[1]</Param>
     </Object>
     <Path name="exteriorBeam$u" type="bezier" create="true">
          <Point type="corner">getPathPos(concat(beam, $u, TopSweep), 1)+vector(0,0,-3)</Point>
          <Point type="corner">getPathPos(concat(beam, closeIndex($u+1, 7, 1), TopSweep), 1)+vector(0,0,-3)</Point>
     </Path>
</Process>
transverse beams build
transverse-all process
<Process id="transverse-all" type="pipeline">
     <Exec processId="transverse-clear" active="true"/>
     <Exec processId="transverse-var" active="true">
          <Var name="u" type="sequence">1-7</Var>
          <Var name="v" type="sequence">0-8</Var>
          <Var name="count">8</Var>
     </Exec>
     <Exec processId="exterior-beam-var">
          <Var name="u" type="sequence">1-7</Var>
     </Exec>
</Process>
transverse-clear process
<Process id="transverse-clear" type="3d">
     <Layer name="transverse" action="clear"/>
</Process>
transverse-var process
<Process id="transverse-var" type="3d">
     <Layer name="transverse" action="current"/>
     <Object name="transverse$u_$v">
          <Param name="sweep">transverseProfil</Param>
          <Param name="material">meditmaterials[1]</Param>
     </Object>
     <Path name="transverse$u_$v" type="bezier" create="true">
          <Point type="corner">getPathPos(concat(beam, $u, BottomSweep), $v/$count)</Point>
          <Point type="corner">getPathPos(concat(beam, closeIndex($u+1, 7, 1), BottomSweep), $v/$count))</Point>
     </Path>
</Process>
glass build
window-all process
<Process id="window-all" type="pipeline">
     <Exec processId="window-clear"/>
     <Exec processId="window-var">
          <Var name="side" type="sequence">1-7</Var>
          <Var name="u" type="sequence">0-7</Var>
          <Var name="p" type="sequence" main="false">pair;impair</Var>
     </Exec>
</Process>
window-clear process
<Process id="window-clear" type="3d">
     <Layer name="window" action="clear"/>
</Process>
window-var process
<Process id="window-var" type="pipeline">
     <Exec processId="vertical-window-var">
          <Var name="side">$side</Var>
          <Var name="u">$u</Var>
          <Var name="p">$p</Var>
          <Var name="count">trunc(getPathLength(transverse$side_4)/12)</Var>
          <Var name="v" type="sequence">
               <Param name="begin">0</Param>
               <Param name="end">trunc(getPathLength(transverse$side_4)/12)+1</Param>
          </Var>
          <Var name="mat" type="random">
               <Param name="trunc">1</Param>
               <Param name="min">2</Param>
               <Param name="max">4</Param>
          </Var>
     </Exec>
</Process>
vertical-window-var process
<Process id="vertical-window-var" type="3d">
     <Layer name="window" action="current"/>
     <Object name="vertical$side_$u_$v" varIndex="$p">
          <Param name="sweep">verticalProfil</Param>
          <Param name="material">meditmaterials[1]</Param>
     </Object>
     <Object name="window$side_$u_$v" varIndex="$p">
          <Param name="extrude">modifier</Param>
          <Param name="extrude.amount">1</Param>
          <Param name="material">meditmaterials[$mat]</Param>
     </Object>
     <Path name="vertical$side_$u_$v" type="bezier" create="true" varIndex="$p">
          <Point type="corner">getPathPos(concat(transverse, $side, _, $u), $v/$count)</Point>
          <Point type="corner">getPathPos(concat(transverse, $side, _, $u+1), $v/$count)</Point>
     </Path>
     <Path name="window$side_$u_$v" type="bezier" create="true" closed="true" varIndex="$p">
          <Point type="corner">getPathPos(concat(transverse, $side, _, $u), $v/$count)</Point>
          <Point type="corner">getPathPos(concat(transverse, $side, _, $u+1), $v/$count)</Point>
          <Point type="corner">getPathPos(concat(transverse, $side, _, $u+1), ($v-2)/$count)</Point>
          <Point type="corner">getPathPos(concat(transverse, $side, _, $u), ($v-2)/$count)</Point>
     </Path>
</Process>
beam-render process
<Process id="beam-render" type="3d">
     <Object name="camera">
          <Param name="target.pos">0;30;80</Param>
          <Motion coord="pos" frames="0-100/11">
               <Path type="circle">
                    <Param name="center">0;0;-35</Param>
                    <Param name="axe">0;0;1</Param>
                    <Param name="radius">450</Param>
                    <Param name="begin">0</Param>
                    <Param name="end">180</Param>
               </Path>
               <Motion frames="0-100/11">
                    <Path type="segment">
                         <Param name="begin">0;0;0</Param>
                         <Param name="end">0;0;540</Param>
                    </Path>
               </Motion>
          </Motion>
     </Object>
     <Render active="true">
          <Param name="creationId">glass-house-render</Param>
          <Param name="resolution">1920;1080</Param>
          <Param name="frames">0-100</Param>
          <Param name="camera">camera</Param>
     </Render>
</Process>

Glass House II

  Based on the same
process than Glass House I, This use case shows how to build a glass house with 20 main beams.
 Specifications: Max Process