Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

3.3 KB
Raw Blame
Template<L: Length, W: Length, H: Length, R: Length> Struct Panel {
 expose { Semantic BottomSeat { DatumFrame Frame = [0mm,0mm,0mm] x [1,0,0] y [0,1,0] z [0,0,1]; } Semantic TopSeat { DatumFrame Frame = [0mm,0mm,H] x [1,0,0] y [0,1,0] z [0,0,1]; } }
 RoundedRect2 Outline { center: [0mm,0mm] size: [L,W] radius: R }
 Profile P { Loop Outer { Outline |> TraceLoop } }
 Extrude Body { profile: P from: 0mm to: H }
}
Template<R: Length,H: Length,EntryHeight: Length = 0mm> Struct Drum {
 expose { Semantic BottomSeat { DatumFrame Frame = [0mm,0mm,0mm] x [1,0,0] y [0,1,0] z [0,0,1]; }
  Semantic StringEntry { DatumFrame Frame = [0mm,0mm,EntryHeight] x [1,0,0] y [0,1,0] z [0,0,1]; }
  Semantic SpindleSeat { Axis Axis = [0mm,0mm,0mm] -> [0,0,1];
   DatumFrame Frame = [0mm,0mm,0mm] x [1,0,0] y [0,1,0] z [0,0,1]; } }
 Circle2 Outline { center: [0mm,0mm] radius: R }
 Profile P { Loop Outer { Outline |> TraceLoop } }
 Extrude Body { profile: P from: 0mm to: H }
}
Template<L: Length,W: Length,H: Length> Struct Surround {
 RoundedRect2 Outer { center: [0mm,0mm] size: [L,W] radius: 4mm }
 // Solid decorative seat; the black bobbins sit on it. No routed opening claim.
 Profile P { Loop Outer { Outer |> TraceLoop } }
 Extrude Body { profile: P from: 0mm to: H }
}
Template<H: Length> Struct Board {
 expose { Semantic MarkerOrigin { DatumFrame Frame = [0mm,658mm,H] x [1,0,0] y [0,1,0] z [0,0,1]; } }
 Point2 RightNut { position: [21.5mm,660mm] }
 Point2 LeftNut { position: [-21.5mm,660mm] }
 Path Outline { start: Point2(-28mm,120mm) heading: 0deg
  Line End { length: 56mm }
  Line Right { to: RightNut }
  Line Nut { to: LeftNut }
  Close Left
 }
 Profile P from Outline
 Extrude Body { profile: P from: 0mm to: H }
}
// Short solid scarf under the veneer, behind the nut. The rounded back is
// supplied by Neck's section chain; this closes the front of the angled join.
Template<L: Length> Struct HeadstockScarf {
 Path Side {
  start: Point2(-1.5mm,6.8mm); heading: 0deg
  Line Back { to: BackEnd }
  Line Shoulder { to: FrontEnd }
  Line Front { to: NutCorner }
  Close NutBack
 }
 Point2 NutCorner { position: [-3.1mm,14mm] }
 Point2 FrontEnd { position: [8mm,14mm] }
 Point2 BackEnd { position: [8mm,7mm] }
 Profile P from Side
 Extrude Body { profile: P; from: -L / 2; to: L / 2 }
 expose { Semantic Mount { DatumFrame Frame = [0mm,0mm,0mm] x [0,0,1] y [1,0,0] z [0,1,0]; } }
}

Template<H: Length, RootStart: Length = 0mm, RootHalfWidth: Length = 21.5mm, RootWidth: Length = 43mm> Struct Head {
 expose { Semantic Base { DatumFrame Frame = [0,0,0] x [1,0,0] y [0,1,0] z [0,0,1]; }
  Semantic Front { DatumFrame Frame = [0mm,0mm,H] x [1,0,0] y [0,1,0] z [0,0,1]; } }
 Point2 RFlare { position: [34mm,40mm] }
 Point2 RSide { position: [39mm,154mm] }
 Point2 RCrown { position: [12mm,160mm] }
 Point2 LCrown { position: [-12mm,160mm] }
 Point2 LSide { position: [-39mm,154mm] }
 Point2 LFlare { position: [-34mm,40mm] }
 Path Outline { start: Point2(-RootHalfWidth,RootStart) heading: 0deg
  Line Base { length: RootWidth }
  Line FlareR { to: RFlare }
  Line SideR { to: RSide }
  Line CrownR { to: RCrown }
  Line Crown { to: LCrown }
  Line CrownL { to: LSide }
  Line SideL { to: LFlare }
  Close FlareL
 }
 Profile P from Outline
 Extrude Body { profile: P from: 0mm to: H }
}

Record HardwareSite { X: Length; Y: Length; Z: Length }