Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Template<W: Length,H: Length> Profile ControlRectangle {
Point2 A { position: [-W / 2,-H / 2] }
Point2 B { position: [W / 2,-H / 2] }
Point2 C { position: [W / 2,H / 2] }
Point2 D { position: [-W / 2,H / 2] }
Point2 HandleA { position: [-W / 6,-H / 2] }
Point2 HandleB { position: [W / 6,-H / 2] }
CubicBezier2 Bottom { from: A; control1: HandleA; control2: HandleB; to: B }
Line2 Right { from: B; to: C }
Line2 Top { from: C; to: D }
Line2 Left { from: D; to: A }
Loop Outer {
Segment Bottom { trace: Bottom; from: A; to: B }
Segment Right { trace: Right; from: B; to: C }
Segment Top { trace: Top; from: C; to: D }
Segment Left { trace: Left; from: D; to: A }
}
}
Model ControlArithmetic {
units: mm
Profile P = ControlRectangle<W:40mm,H:20mm>
Struct Body { Extrude Plate { profile: P; from: 0mm; to: 2mm } }
}