Documentation ¶
Index ¶
- Constants
- func DefaultAnchorA() []float64
- func DefaultAnchorB() []float64
- func DefaultAnchorC() []float64
- func DefaultForwardMatrix() [][]float64
- func DefaultInverseMatrix() [][]float64
- type Axis
- type BaseKinematics
- type CoreKinematics
- type CurrentMove
- type DAA
- type DeltaKinematics
- type DeltaTower
- type Extruder
- type ExtruderNonLinear
- type HangprinterKinematics
- type Kinematics
- func (k Kinematics) AsBaseKinematics() (*BaseKinematics, error)
- func (k Kinematics) AsCoreKinematics() (*CoreKinematics, error)
- func (k Kinematics) AsDeltaKinematics() (*DeltaKinematics, error)
- func (k Kinematics) AsHangprinterKinematics() (*HangprinterKinematics, error)
- func (k Kinematics) GetName() KinematicsName
- type KinematicsName
- type Microstepping
- type MotorsIdleControl
- type Move
- type MoveCalibration
- type MoveCompensation
- type MoveCompensationType
- type MoveDeviations
- type ProbeGrid
- type Skew
Constants ¶
const ( // DefaultAnchorDz for HangprinterKinematics DefaultAnchorDz = 3000.0 // DefaultHangprinterPrintRadius is the default radius for hangprinter DefaultHangprinterPrintRadius = 1500.0 )
const ( // Cartesian kinematics Cartesian KinematicsName = "cartesian" // CoreXY kinematics CoreXY = "coreXY" // CoreXYU is a CoreXY kinematics with extra U axis CoreXYU = "coreXYU" // CoreXYUV is a CoreXY kinematics with extra UV axes CoreXYUV = "coreXYUV" // CoreXZ kinmatics CoreXZ = "coreXZ" // MarkForged kinematics MarkForged = "markForged" // FiveBarScara kinematics FiveBarScara = "FiveBarScara" // Hangprinter kinematics Hangprinter = "Hangprinter" // Delta kinematics Delta = "delta" // Polar kinematics Polar = "Polar" // RotaryDelta kinematics RotaryDelta = "Rotary delta" // Scara kinematics Scara = "Scara" // Unknown kinematics Unknown = "unknown" )
const ( DefaultJerk = 15.0 DefaultMaxTravel = 200.0 DefaultStepsPerMmAxis = 80.0 )
Default values for Axis
const ( DefaultMaxExtruderSpeed = 100.0 DefaultStepsPerMmExtruder = 420.0 )
Default values for Extruder
const (
DefaultMinimumAcceleration = 10.0
)
Default values for DAA
Variables ¶
This section is empty.
Functions ¶
func DefaultForwardMatrix ¶
func DefaultForwardMatrix() [][]float64
DefaultForwardMatrix for CoreKinematics
func DefaultInverseMatrix ¶
func DefaultInverseMatrix() [][]float64
DefaultInverseMatrix for CoreKinematics
Types ¶
type Axis ¶
type Axis struct { // Acceleration of this axis (in mm/s^2) Acceleration float64 `json:"acceleration"` // Babystep amount (in mm) Babystep float64 `json:"babystep"` // Current of the motor (in mA) Current int64 `json:"current"` // Homed indicates homing status Homed bool `json:"homed"` // Jerk of the motor (in mm/s) Jerk float64 `json:"jerk"` // Letter assigned to this axis (always upper-case) Letter string `json:"letter"` // MachinePosition is the current machine position (in mm or nil if unknown) MachinePosition *float64 `json:"machinePosition"` // Max travel of this axis (in mm) Max float64 `json:"max"` // MaxProbed is ture if the maximum was probed MaxProbed bool `json:"maxProbed"` // Microstepping of this axis Microstepping Microstepping `json:"microstepping"` // Min travel of this axis (in mm) Min float64 `json:"min"` // MinProbed is true if the minimum was probed MinProbed bool `json:"minProbed"` // Speed is the maximum speed (in mm/s) Speed float64 `json:"speed"` // StepsPerMm for this axis StepsPerMm float64 `json:"stepsPerMm"` // UserPosition (in mm or nil if unknown) UserPosition *float64 `json:"userPosition"` // Visible is true if the axis is not explicitely hidden Visible bool `json:"visible"` // WorkplaceOffsets for this axis (in mm) WorkplaceOffsets []float64 `json:"workplaceOffsets"` }
Axis holds information about a configured axis
type BaseKinematics ¶
type BaseKinematics struct { // Name of currently configured kinematics Name KinematicsName `json:"name"` }
BaseKinematics holds information about the configured kinematics
func (*BaseKinematics) AsKinematics ¶
func (bk *BaseKinematics) AsKinematics() Kinematics
AsKinematics converts this instance to Kinematics type
type CoreKinematics ¶
type CoreKinematics struct { BaseKinematics `mapstructure:",squash"` // ForwardMatrix is the regular movement matrix ForwardMatrix [][]float64 `json:"forwardMatrix"` // InverseMatrix is the inverted movement matrix InverseMatrix [][]float64 `json:"inverseMatrix"` }
CoreKinematics holds information about core kinematics
func (*CoreKinematics) AsKinematics ¶
func (ck *CoreKinematics) AsKinematics() (Kinematics, error)
AsKinematics converts this instance to Kinematics type
type CurrentMove ¶
type CurrentMove struct { // Acceleration of the current move (in mm/s^2) Acceleration float64 `json:"acceleration"` // Deceleration of the current move (in mm/s^2) Deceleration float64 `json:"deceleration"` // LaserPwm of the current move as 0..1 or nil if not applicable LaserPwm *float64 `json:"laserPwm"` // RequestedSpeed of the current move (in mm/s) RequestedSpeed float64 `json:"requestedSpeed"` // TopSpeed actually reached for the current move (in mm/s) TopSpeed float64 `json:"topSpeed"` }
CurrentMove holds information about the current move
type DAA ¶
type DAA struct { // Enabled indicates if DAA is enabled Enabled bool `json:"enabled"` // MinimumAcceleration allowed (in mm/s^2) MinimumAcceleration float64 `json:"minimumAcceleration"` // Period of the ringing that is supposed to be cancelled (in s) Period float64 `json:"period"` }
DAA holds information about Dynamic Acceleration Adjustment
type DeltaKinematics ¶
type DeltaKinematics struct { BaseKinematics `mapstructure:",squash"` // DeltaRadius in mm DeltaRadius float64 `json:"deltaRadius"` // HomedHeight in mm HomedHeight float64 `json:"homedHeight"` // PrintRadius in mm PrintRadius float64 `json:"printRadius"` // Towers holds information about the delta Towers Towers []DeltaTower `json:"towers"` // XTilt is how much Z needs to be raised for each unit of movement // in the +X direction XTilt float64 `json:"xTilt"` // YTilt is how much Z needs to be raised for each unit of movement // in the +Y direction YTilt float64 `json:"yTilt"` }
DeltaKinematics holds information about delta kinematics
func (*DeltaKinematics) AsKinematics ¶
func (dk *DeltaKinematics) AsKinematics() (Kinematics, error)
AsKinematics converts this instance to Kinematics type
type DeltaTower ¶
type DeltaTower struct { // AngleCorrection represents tower position correction (in degrees) AngleCorrection float64 `json:"angleCorrection"` // Diagonal rod length (in mm) Diagonal float64 `json:"diagonal"` // EndstopAdjustment is the deviation of the ideal endstop position (in mm) EndstopAdjustment float64 `json:"endstopAdjustment"` // XPos is the X coordinate of this tower (in mm) XPos float64 `json:"xPos"` // YPos is the Y coordinate of this tower (in mm) YPos float64 `json:"yPos"` }
DeltaTower properties
type Extruder ¶
type Extruder struct { // Acceleration of this extruder (in mm/s^2) Acceleration float64 `json:"acceleration"` // Current of the motor (in mA) Current int64 `json:"current"` // Driver is the assigned driver Driver string `json:"driver"` // Filament is the name fo the currently loaded filament Filament string `json:"filament"` // Factor is the extrusion factor (1.0 equals 100%) Factor float64 `json:"factor"` // Jerk of the motor (in mm/s) Jerk float64 `json:"jerk"` // Microstepping of this extruder Microstepping Microstepping `json:"microstepping"` // NonLinear extrusion parameters (see M592) NonLinear ExtruderNonLinear `json:"nonLinear"` // Position of the extruder (in mm) Position float64 `json:"position"` // PressureAdvance (in s) PressureAdvance float64 `json:"pressureAdvance"` // RawPosition is the extruder position without factor applied (in mm) RawPosition float64 `json:"rawPosition"` // Speed is the maximum speed (in mm/s) Speed float64 `json:"speed"` // StepsPerMm for this extruder StepsPerMm float64 `json:"stepsPerMm"` }
Extruder holds information about an extruder drive
type ExtruderNonLinear ¶
type ExtruderNonLinear struct { // A coefficient in the extrusion formula A float64 `json:"a"` // B coefficient in the extrusion formula B float64 `json:"b"` // UpperLimit of the nonlinear extrusion compensation UpperLimit float64 `json:"upperLimit"` }
ExtruderNonLinear contains non-linear extrusion parameters (see M592)
type HangprinterKinematics ¶
type HangprinterKinematics struct { BaseKinematics `mapstructure:",squash"` // AnchorA of the hangprinter AnchorA []float64 `json:"anchorA"` // AnchorB of the hangprinter AnchorB []float64 `json:"anchorB"` // AnchorC of the hangprinter AnchorC []float64 `json:"anchorC"` // AnchorDz of the hangprinter AnchorDz float64 `json:"anchorDz"` // PrintRadius in mm PrintRadius float64 `json:"printRadius"` }
HangprinterKinematics properties
func (*HangprinterKinematics) AsKinematics ¶
func (hk *HangprinterKinematics) AsKinematics() (Kinematics, error)
AsKinematics converts this instance to Kinematics type
type Kinematics ¶
type Kinematics map[string]interface{}
Kinematics is a placeholder type for SerDe
func (Kinematics) AsBaseKinematics ¶
func (k Kinematics) AsBaseKinematics() (*BaseKinematics, error)
AsBaseKinematics returns this instance as BaseKinematics
func (Kinematics) AsCoreKinematics ¶
func (k Kinematics) AsCoreKinematics() (*CoreKinematics, error)
AsCoreKinematics returns this instance as CoreKinematics
func (Kinematics) AsDeltaKinematics ¶
func (k Kinematics) AsDeltaKinematics() (*DeltaKinematics, error)
AsDeltaKinematics returns this instance as DeltaKinematics
func (Kinematics) AsHangprinterKinematics ¶
func (k Kinematics) AsHangprinterKinematics() (*HangprinterKinematics, error)
AsHangprinterKinematics returns this instance as HangprinterKinematics
func (Kinematics) GetName ¶
func (k Kinematics) GetName() KinematicsName
GetName returns the KinematicsName of this Kinematics instance
type KinematicsName ¶
type KinematicsName string
KinematicsName represents the supported kinmatics types
type Microstepping ¶
type Microstepping struct { // Interpolated indicates if microstep interpolation is in use Interpolated bool `json:"interpolated"` // Value is the microstepping factor Value uint16 `json:"value"` }
Microstepping holds information about configured microstepping
type MotorsIdleControl ¶
type MotorsIdleControl struct { // Timeout after which the motor currents are reduced (in s) Timeout float64 `json:"timeout"` // Factor of the reduction on a scale between 0 and 1 Factor float64 `json:"factor"` }
MotorsIdleControl holds idle factor parameters for automatic MotorsIdleControl current reduction
type Move ¶
type Move struct { // Axes is a list of configured axes Axes []Axis `json:"axes"` // Calibration holds information about automatic calibration Calibration MoveCalibration `json:"calibration"` // Compensation holds information about the currently configured compensation options Compensation MoveCompensation `json:"compensation"` // CurrentMove holds information about the current move CurrentMove CurrentMove `json:"currentMove"` // DAA holds information about the configured Dynamic Acceleration Adjustment DAA DAA `json:"daa"` // Extruders is a list of configured extrudersr Extruders []Extruder `json:"extruders"` // Idle current reduction parameters Idle MotorsIdleControl `json:"idle"` // Kinematics holds information about the currently configured kinematics // Use one of the NewXXKinematics methods to convert it Kinematics Kinematics `json:"kinematics"` // PrintingAcceleration is maximum accelertion allowed while printing (in mm/s^2) PrintingAcceleration float64 `json:"printingAcceleration"` // SpeedFactor applied to every move (0.01..1 or greater) SpeedFactor float64 `json:"speedFactor"` // TravelAcceleration is maximum acceleration allowed while travelling (in mm/s^2) TravelAcceleration float64 `json:"travelAcceleration"` // VirtualPos is the virtual total extruder position VirtualPos float64 `json:"virtualPos"` // WorkspaceNumber is the index of the currently selected workspace WorkspaceNumber int `json:"workspaceNumber"` }
Move holds information about the move subsystem
type MoveCalibration ¶
type MoveCalibration struct { // Final calibration results (for Delta calibration) Final MoveDeviations `json:"final"` // Initial calibration resuls (for Delta calibration) Initial MoveDeviations `json:"initial"` // NumFactors is the number of factors used (for Delta calibration) NumFactors int64 `json:"numFactors"` }
MoveCalibration holds information about configured calibration options
type MoveCompensation ¶
type MoveCompensation struct { // FadeHeight effective height before the bed compensation is turned off (in mm or nil if not configurea) FadeHeight *float64 `json:"fadeHeight"` // File is the full path to the currently used height map file or empty if none is used File string `json:"file"` // MeshDeviation are the deviations of the mesh grid of nil if not applicable MeshDeviation *MoveDeviations `json:"meshDeviation"` // ProbeGrid holds the settings of the current probe grid ProbeGrid ProbeGrid `json:"probeGrid"` // Skew holds information about the configured orthogonal axis parameters Skew Skew // Type is the type of compensation in use Type MoveCompensationType `json:"type"` }
MoveCompensation holds informatin about the configured compensation options
type MoveCompensationType ¶
type MoveCompensationType string
MoveCompensationType are the supported compensation types
const ( // None for no compensations None MoveCompensationType = "none" // Mesh for mesh compensation Mesh = "mesh" )
type MoveDeviations ¶
type MoveDeviations struct { // Deviation RMS (in mm) Deviation float64 `json:"deviation"` // Mean deviation (in mm) Mean float64 `json:"mean"` }
MoveDeviations holds calibration or mesh grid results
type ProbeGrid ¶
type ProbeGrid struct { // XMin is the X start coordinate of the heightmap XMin float64 `json:"xMin"` // XMax is the X end coordinate of the heightmap XMax float64 `json:"xMax"` // XSpacing is the spacing between probe points in X direction XSpacing float64 `json:"xSpacing"` // YMin is the Y start coordinate of the heightmap YMin float64 `json:"yMin"` // YMax is the Y end coordinate of the heightmap YMax float64 `json:"yMax"` // YSpacing is the spacing between probe points in Y direction YSpacing float64 `json:"ySpacing"` // Radius is the probing radius on delta kinematics Radius float64 `json:"radius"` }
ProbeGrid holds information about the configured probe grid (see M557)
type Skew ¶
type Skew struct { // TanXY is the tangent of the skew angle for XY axes TanXY float64 // TaxXZ is the tangent of the skew angle for XZ axes TanXZ float64 // TaxYZ is the tangent of the skew angle for YZ axes TanYZ float64 }
Skew holds details about orthogonal axis compensation parameters