Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Static scale: Length = 100mm;
Function Distance(n: Int, scale: Length) -> Length = scale * (1.0 - Pow(2.0, -n / 12.0));
Function PadHeight(h: Length) -> Length = h + 1mm;
Concept Struct Nut {
Points<Point2> Crossings {
keys: [Bass, Middle, Treble];
Linear { start: Point2(-18mm,0mm); step: [18mm,0mm]; }
}
Points<Point3> Supports {
Left: Point3(-18mm,0mm,2mm);
Right: Point3(18mm,0mm,2mm);
}
}
Concept Struct Board {
Points<Point2> Frets {
Series { index: n; first: 1; count: 12; keyPrefix: Fret;
position: Point2(0mm, -Distance(n,628mm)); }
}
}
Template<H: Length> Struct Pad {
Rect2 Outline { center: [0mm,0mm]; size: [4mm,2mm] }
Profile P { Loop Outer { Outline |> TraceLoop } }
Extrude Body { profile: P; from: 0mm; to: H }
expose { Semantic Bottom { DatumFrame Frame = [0mm,0mm,0mm] x [1,0,0] y [0,1,0] z [0,0,1]; } }
}
Assembly PointWitness {
<Assembly PointWitness>
Pattern Frets over Board.Frets {
point => <Part Fret = Pad<H:PadHeight(1mm)>>
Placement { from: Bottom.Frame; to: BoardSeat.Frame;
translateLocal: [point.Position.X,point.Position.Y,0mm]; }
</Part>
}
<Part Bass = Pad<H:1mm>>
Placement { from: Bottom.Frame; to: World;
translateLocal: [Nut.Crossings.Bass.X,Nut.Crossings.Bass.Y,Nut.Supports.Left.Z]; }
</Part>
</Assembly>
FrameTransform BoardSeat { from: World; translateLocal: [0mm,658mm,62mm]; }
anchor: PointWitness;
}