Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Function siteX(n: Int, pitch: Length) -> Length = -30mm + pitch * n * n;
Record LayoutSpec { pitch: Length; amount: Int; }
Static chosen: LayoutSpec = LayoutSpec { pitch: 5mm; amount: 4; }
Template<spec: LayoutSpec> Model Plate {
units: mm
Concept Struct Layout {
Points<Point2> Sites {
Series { index: n; first: 0; count: spec.amount; keyPrefix: Site;
position: Point2(siteX(n,spec.pitch),0mm); }
}
}
Feature Drill(center: Point2) -> Hole<Shaft> {
return Hole<Shaft> { on: +Z; center: center; diameter: 3mm; end: ThroughAll; }
}
Box Stock { size: [100mm,50mm,8mm] }
Modify Stock { Pattern Drills over Layout.Sites { point => Drill(center: point) } }
}
Model EquationPlate = Plate<spec: chosen>