obj3

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bolt

func Bolt(k BoltParms) (s sdf.SDF3, err error)

Bolt returns a simple bolt suitable for 3d printing.

func EuroRackPanel

func EuroRackPanel(k obj2.EuroRackParams) (sdf.SDF3, error)

EuroRackPanel returns a 3d eurorack synthesizer module panel (in mm).

func HexHead

func HexHead(radius float64, height float64, round string) (s sdf.SDF3, err error)

HexHead3D returns the rounded hex head for a nut or bolt. - round rounding control (t)top, (b)bottom, (tb)top/bottom

func Knurl

func Knurl(k KnurlParams) (s sdf.SDF3, err error)

Knurl returns a knurled cylinder.

func KnurledHead

func KnurledHead(radius float64, height float64, pitch float64) (s sdf.SDF3, err error)

KnurledHead returns a generic cylindrical knurled head.

func Nut

func Nut(k NutParms) (s sdf.SDF3, err error)

Nut returns a simple nut suitable for 3d printing.

func Panel

func Panel(k obj2.PanelParams) (s3 sdf.SDF3, err error)

Panel3D returns a 3d panel with holes on the edges.

func PanelHole

func PanelHole(k *PanelHoleParams) (sdf.SDF3, error)

PanelHole returns a panel hole and an indent for a retention pin.

func Standoff

func Standoff(k StandoffParams) (s sdf.SDF3, err error)

Standoff returns a single board standoff.

Types

type BoltParms

type BoltParms struct {
	Thread      string        // name of thread
	Style       CylinderStyle // head style "hex" or "knurl"
	Tolerance   float64       // subtract from external thread radius
	TotalLength float64       // threaded length + shank length
	ShankLength float64       // non threaded length
}

BoltParms defines the parameters for a bolt.

type CylinderStyle

type CylinderStyle int
const (
	CylinderCircular CylinderStyle
	CylinderHex
	CylinderKnurl
)

func (CylinderStyle) String

func (c CylinderStyle) String() (str string)

type KnurlParams

type KnurlParams struct {
	Length float64 // length of cylinder
	Radius float64 // radius of cylinder
	Pitch  float64 // knurl pitch
	Height float64 // knurl height
	Theta  float64 // knurl helix angle
}

KnurlParams specifies the knurl parameters.

type NutParms

type NutParms struct {
	Thread    string // name of thread
	Style     CylinderStyle
	Tolerance float64 // add to internal thread radius
}

NutParms defines the parameters for a nut.

type PanelHoleParams

type PanelHoleParams struct {
	Diameter    float64 // hole diameter
	Thickness   float64 // panel thickness
	Indent      r3.Vec  // indent size
	Offset      float64 // indent offset from main axis
	Orientation float64 // orientation of indent, 0 == x-axis
}

PanelHoleParms defines the parameters for a panel hole.

type StandoffParams

type StandoffParams struct {
	PillarHeight   float64
	PillarDiameter float64
	HoleDepth      float64 // > 0 is a hole, < 0 is a support stub
	HoleDiameter   float64
	NumberWebs     int // number of triangular gussets around the standoff base
	WebHeight      float64
	WebDiameter    float64
	WebWidth       float64
}

StandoffParams defines the parameters for a board standoff pillar.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL