public static KinematicBase load_kinematics(KinematicType type, ToolHead toolhead, ConfigWrapper config) { switch (type) { case KinematicType.none: break; case KinematicType.cartesian: return(new KinematicCartesian(toolhead, config)); case KinematicType.corexy: break; case KinematicType.delta: break; case KinematicType.extruder: break; case KinematicType.polar: break; case KinematicType.winch: break; } throw new NotImplementedException(); }
public void setup_itersolve(KinematicType type, params object[] parameters) { ItersolveBase sk; switch (type) { case KinematicType.cartesian: sk = ItersolveCartesian.cartesian_stepper_alloc((string)parameters[0]); break; case KinematicType.corexy: sk = ItersolveCoreXY.corexy_stepper_alloc((string)parameters[0]); break; case KinematicType.delta: sk = ItersolveDelta.delta_stepper_alloc((double)parameters[0], (double)parameters[1], (double)parameters[2]); break; case KinematicType.extruder: sk = ItersolveStepper.extruder_stepper_alloc(); break; case KinematicType.polar: sk = ItersolvePolar.polar_stepper_alloc((string)parameters[0]); break; case KinematicType.winch: sk = ItersolveWinch.winch_stepper_alloc((double)parameters[0], (double)parameters[1], (double)parameters[2]); break; default: throw new ArgumentOutOfRangeException(); } this.set_stepper_kinematics(sk); }