Parametric steel plate with bolt holes.
<O N="Bolted Plate" T="Project">
<!--
a group containing all customizable parameters of this component.
the existance of EndUserInputFields parameter makes the parameters
inside this group visible in the Params explorer of STARK.
-->
<O N="Parameters" T="Group">
<P N="EndUserInputFields" V="1" />
<P N="w" V="48" D="width of the plate" />
<P N="h" V="48" D="height of the plate" />
<P N="t" V="1" D="thickness of the plate" />
<P N="nr" V="5" D="number of rows" />
<P N="nb" V="5" D="number of equally spaced bolts per row" />
<P N="r" V="1" D="radius of bolt hole" />
<P N="c" V="6" D="clearance from edge" />
</O>
<!--
The plate will be a a surface with thickness. It will contain the holes
as sub surfaces.
Notice the nested Repeat objects - that is because we
would like to create holes in both X and Y direction of the plate. The
outer repeat is for along Y axis (uses j control parameter) and the inner
repeat is along X axis (uses i control parameter).
spX and spY are the spacing along X and Y axis, respectively.
(locX, locY) is the location of the hole.
-->
<O N="Plate" T="Surface">
<P N="Thickness" V="t" />
<P N="spX" V="(w-c*2)/(nb-1)" D="spacing between bolt holes along X direction" />
<P N="spY" V="(h-c*2)/(nr-1)" D="spacing between bolt holes along Y direction" />
<O T="Point" X="-w/2" Y="-h/2" Z="0" />
<O T="Point" X="w/2" Y="-h/2" Z="0" />
<O T="Point" X="w/2" Y="h/2" Z="0" />
<O T="Point" X="-w/2" Y="h/2" Z="0" />
<O T="Repeat">
<P N="S" V="0" />
<P N="I" V="1" />
<P N="E" V="nr-1" />
<P N="CTRL" V="j" T="Text" />
<P N="j" V="0" />
<O T="Repeat">
<P N="S" V="0" />
<P N="I" V="1" />
<P N="E" V="nb-1" />
<P N="CTRL" V="i" T="Text" />
<P N="i" V="0" />
<P N="locX" V="-w/2 + c + spX * i" D="X location of the bolt hole" />
<P N="locY" V="-h/2 + c + spY * j" D="Y location of the bolt hole" />
<O T="Circle" X="locX" Y="locY">
<P N="IsCutout" V="1" />
<P N="Radius" V="r" />
</O>
</O>
</O>
</O>
</O>