Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

1.1 KB
Raw Blame
Model GeneratedSlots {
    units: mm

    Record SlotSpec { Center: Point2 Direction: Vector2 Length: Length Width: Length }
    Static Vents: SlotSpec[] = [
        SlotSpec {
            Center: Point2(0mm, 0mm)
            Direction: Vector2(1, 0)
            Length: 80mm
            Width: 40mm
        }
    ]

    Template<spec: SlotSpec> Vent {
        Slot<Capsule> Vent {
            Center: spec.Center
            Direction: spec.Direction
            Length: spec.Length
            Width: spec.Width
            Extent: ThroughAll
            Role: ThroughSlot
        }
    }

    Concept Struct Layout on XY {
        Rect2 Stock { center: Point2(0mm, 0mm); size: [200mm, 100mm] }
    }
    Profile Plate using Layout {
        Loop Outer {
            Stock.Bottom as South
            |> Stock.Right as East
            |> Stock.Top as North
            |> Stock.Left as West
            |> Close
        }
    }
    Struct Plate {
        Compose Body {
            Base Stock { profile: Plate; from: -10mm; to: 10mm; role: Stock }
            Pattern SlotPattern over Vents { Vent<Current> }
        }
    }
}