Documentation
¶
Index ¶
Constants ¶
View Source
const (
// InchesPerMillimetre is inches per millimetre
InchesPerMillimetre = 1.0 / millimetresPerInch
)
2D Panel with rounded corners and edge holes.
Note: The hole pattern is used to layout multiple holes along an edge.
Examples:
"x" - single hole on edge "xx" - two holes on edge "x.x" = two holes on edge with spacing "xx.x.xx" = five holes on edge with spacing etc.
Variables ¶
This section is empty.
Functions ¶
func EuroRackPanel ¶
func EuroRackPanel(k EuroRackParams) (s sdf.SDF2, err error)
EuroRackPanel returns a 2d eurorack synthesizer module panel (in mm).
Types ¶
type EuroRackParams ¶
type EuroRackParams struct { U float64 // U-size (vertical) HP float64 // HP-size (horizontal) CornerRadius float64 // radius of panel corners HoleDiameter float64 // panel holes (0 for default) Thickness float64 // panel thickness (3d only) Ridge bool // add side ridges for reinforcing (3d only) }
EuroRackParams defines the parameters for a eurorack panel.
func (EuroRackParams) HPSize ¶
func (k EuroRackParams) HPSize() float64
func (EuroRackParams) USize ¶
func (k EuroRackParams) USize() float64
type PanelParams ¶
type PanelParams struct { Size r2.Vec // size of the panel CornerRadius float64 // radius of rounded corners HoleDiameter float64 // diameter of panel holes HoleMargin [4]float64 // hole margins for top, right, bottom, left HolePattern [4]string // hole pattern for top, right, bottom, left Thickness float64 // panel thickness (3d only) }
PanelParams defines the parameters for a 2D panel.
Click to show internal directories.
Click to hide internal directories.