Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Model TableTemplateConceptPathCompose {
units: mm
Enum PlateKind { Small Large }
Record PlateStandard {
Kind: PlateKind
Width: Length
Height: Length
}
Record PlateSpec {
Standard: PlateStandard
Thickness: Length
}
Static Table PlateStandards: PlateStandard Key: Kind {
Kind: [Small, Large]
Width: [40mm, 80mm]
Height: [20mm, 30mm]
}
Static SmallStandard = PlateStandards[Small]
Static BaseSpec: PlateSpec = PlateSpec {
Standard: SmallStandard
Thickness: 8mm
}
Static ThickSmall = BaseSpec with {
Thickness: 10mm
}
Template<Spec: PlateSpec>
Struct PlateTemplate {
Require Positive => Spec.Standard.Width > 0mm && Spec.Standard.Height > 0mm && Spec.Thickness > 0mm
Path Outline {
start: Point2(0mm, 0mm)
heading: 0deg
Line South { length: Spec.Standard.Width }
Line East { Turn: 90deg; length: Spec.Standard.Height }
Line North { Turn: 90deg; length: Spec.Standard.Width }
Close West
}
Profile PlateProfile from Outline
Compose Body {
Base Stock { profile: PlateProfile; from: 0mm; to: Spec.Thickness; role: Stock }
}
Selection TopBoundary {
Target: TopBoundary
Source: PlateProfile.ProfileSegments([South, East, North, West])
Require: ClosedLoop
}
}
Struct Plate = PlateTemplate<Spec: ThickSmall>
}