Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

1.1 KB
Raw Blame
Concept MountingPlateContract {
    Bounds: Box3
    TopPlane: Plane
    MountPoints: Point3[]
}

Template<Width: Length, Height: Length, Thickness: Length, HoleDiameter: Length>
Struct MountingPlate: MountingPlateContract {
    Require Positive => Width > 0mm && Height > 0mm && Thickness > 0mm && HoleDiameter > 0mm
    Concept Struct Design: MountingPlateContract {
        Bounds: Box3 { size: [Width, Height, Thickness] }
        TopPlane: Bounds.Face(+Z)
        MountPoints: Grid {
            within: Bounds.Face(+Z).Inset(10mm)
            columns: 1
            rows: 1
        }
    }
    Box Plate { bounds: Design.Bounds }
    Modify Plate {
        Hole<Shaft> CenterMount {
            on: Plate.Top
            center: Design.MountPoints[0]
            diameter: HoleDiameter
            end: ThroughAll
        }
    }
    expose {
        Bounds: Design.Bounds
        TopPlane: Plate.Top
        MountPoints: Design.MountPoints
    }
}

Struct StandardMountingPlate = MountingPlate<
    Width: 80mm,
    Height: 50mm,
    Thickness: 8mm,
    HoleDiameter: 8.5mm
>