Gcode Viewer Orientation


#1

Octoprint has been working well for quite some time, but there is one small item that I hope can be addressed.

Any item that is sliced in Simplify3D to gcode and then uploaded to Octoprint and finally printed on my Folgertech FT-5 R2 prints correctly and in the orientation displayed by Simplify3D. But the Gcode Viewer in Octoprint displays both the X and Y axis as mirrored.

Could it be due to the fact that the printer origin is at the Right Rear and the printer profile only allows selecting Front Left or Center for the origin?


#2

I think you've solved the mystery.


#3

But is there a solution ?

Can I somehow edit the printer profile to change options in the the Origin drop down menu ?


#4

Have you tried negative values?


#5

In the Printer Profile there is only a drop down menu with 2 choices for the Origin. There is no where to enter any values negative or positive.

These options must be buried somewhere in the source code, but I haven't been able to find them.


#6

In the Settings -> Printer Profile -> Edit section, look for other tabs in their screen. One of them has checkboxes to "Invert".

If everything is set correctly, using the Control tab and pressing one of the up/down/left/right buttons should behave.


#7

In the Control Tab everything is perfect. X,Y and Z directions and homing are all correct. It is only in the Gcode Viewer that the X and Y are mirrored.

Simplify3D and the printer agree on the orientation and Octoprint provides a great interface between the two. I have been putting up with the mirrored orientation in the Gcode Viewer for several versions now so it is definitely not a show stopper. Just one of those little things that would be nice to see squashed ...


#8

In the code itself on lines 160-167, this appears to be where it's reading in the settings for your printer's profile and it's where it would be doing inversions on a per-axis basis.

Line 251 includes the function which pulls the profile information. Are you 100% sure that your Settings -> Printer Profile -> Axis setup information has the wrong checkmark status for both x/y axes?

        self._retrieveAxesConfiguration = function(currentProfileData) {
            if (currentProfileData == undefined) {
                currentProfileData = self.settings.printerProfiles.currentProfileData();
            }

            if (currentProfileData && currentProfileData.axes) {
                var invertX = false, invertY = false;
                if (currentProfileData.axes.x) {
                    invertX = currentProfileData.axes.x.inverted();
                }
                if (currentProfileData.axes.y) {
                    invertY = currentProfileData.axes.y.inverted();
                }

                return {
                    x: invertX,
                    y: invertY
                }
            } else {
                return undefined;
            }
        };

#9

The Control Tab functions for manual motion are working perfectly. In the profile X,Y and Z are all inverted to give the correct direction between the Control Tab and the printer. This part works fine.

The only problem area is in the Gcode Viewer where both X and Y are mirrored compared to what Simlify3D and the actual printer produce.

I also tried removing the check marks for inverting X and Y. Of course controls were now backwards but the Gcode Viewer was now correct. There seems to be be a problem between axis directions for control and axis directions for display. It may even be something in the HTML generation for the Gcode Viewer ...

Keep in mind that this is not a high priority issue as it has been around for at least several versions and does not really limit the application at all.


#10

@foosel can weigh in here since she would know what's what. It looks like the underlying code takes the printer profile's axis polarity into mind for displaying the Gcode Viewer...