Closed justinclift closed 4 years ago
@giseburt For the extruder use case, we could add a new AXIS_TYPE_EXTRUDER
enum to cmAxisType
.
Alternatively, we could add AXIS_EXTRUDER
to the cmAxisMode
enum.
Either way should let us check if the axis is supposed to be a 3D printer extruder head, then adjust the model target calculation as appropriate.
I don't have a 3D printer to test g2core stuff with in the near term though, so am kind of flying blind right atm. :wink:
This turned out to be due to my misunderstanding the meaning of AXIS_RADIUS
, thinking that was the correct setting for a 4th-axis rotary. It's not. It's really a setting used when A, B, or C is used for non-rotary-axis purposes.
I'll need to update my CNC machine settings file to use AXIS_STANDARD
instead, which should (in theory) not exhibit the problem mentioned in this issue. :smile:
Found an interesting bug today after calibrating the 4th axis (rotary B) of a machine.
Although the machine was moving the correct distance (eg 360 degrees) for a given command (eg
G0 B360
), the value being returned inposb
was skewed. eg385.xxx
etcThe problem is caused by this section of code:
https://github.com/synthetos/g2/blob/e1b5af7e45fe86f8e5558847520bc44ca53e3e72/g2core/canonical_machine.cpp#L708-L712
From discussion with @giseburt, it's used for treating rotary axis as linear. eg to overload ABC axis functionality in use with 3d printers
An initial workaround is to add a test for the axes being rotary, to skip the conversion to linear mm. eg:
Not sure if this will break things for the overloaded ABC axes use case though.
Maybe we should add a new AXIS enum specifically to allow for the rotary-as-linear use case?