Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

818 B
Raw Blame
Record ArchSpec { span: Length; rise: Length }
Static Design: ArchSpec { span: 80mm; rise: 20mm }
Static Flat: ArchSpec { span: 80mm; rise: 0mm }
Function Arch(t: Float, p: ArchSpec) -> Point2 =
    Point2(p.span * t, 4 * p.rise * t * (1 - t));
Model ArchPlate {
    Units: mm
    Concept Struct Layout {
        Curve2 Crown {
            parameter: t;
            domain: [0, 1];
            from: Arch(t, Design);
            on: XY;
            representation: Exact;
        }
        Curve2 Baseline {
            parameter: t;
            domain: [0, 1];
            from: Arch(1 - t, Flat);
            on: XY;
            representation: Exact;
        }
    }
    Profile Outline { Loop Outer { Reverse Layout.Crown |> Layout.Baseline |> Close } }
    Extrude Body { profile: Outline; from: 0mm; to: 5mm }
}