How do I load G-code such that it's displayed directly in 3D

Post anything you want to discuss with others about the software.

How do I load G-code such that it's displayed directly in 3D

Postby AutomaticInvest_4 » Thu Feb 06, 2025 10:31 am

Hello

I have a g-code with X,Y,Z coordinates

However UCCNC by default seems to display g-code from above the XY plane, and I have to use right-click and then moving mouse cursor while keeping the right button of mouse pressed so that I bring the G-code to a 3D view

Do you know how one can do this automatically in a macro or plugin ?

I want to see it directly in 3D from an angle when it is loaded

regards
AutomaticInvest_4
 
Posts: 8
Joined: Fri Dec 23, 2022 8:43 pm
Location: Romania

Re: How do I load G-code such that it's displayed directly i

Postby cncdrive » Thu Feb 06, 2025 10:56 am

There are buttons next to the g-code viwer to switch the camera viewing angle and view type.
cncdrive
Site Admin
 
Posts: 5054
Joined: Tue Aug 12, 2014 11:17 pm

Re: How do I load G-code such that it's displayed directly i

Postby AutomaticInvest_4 » Thu Feb 06, 2025 10:58 am

for example I attach the same g-code shown from above (by default when it is loaded in UCCNC) and then from an angle after moving it with right mouse button pressed

from above.png

from an angle.png
AutomaticInvest_4
 
Posts: 8
Joined: Fri Dec 23, 2022 8:43 pm
Location: Romania

Re: How do I load G-code such that it's displayed directly i

Postby AutomaticInvest_4 » Thu Feb 06, 2025 11:16 am

Yes indeed the ISO button (code 143)

So I think I can replace the Load button with a call to callbutton(Load button's code) and then a call to callbutton(143)
AutomaticInvest_4
 
Posts: 8
Joined: Fri Dec 23, 2022 8:43 pm
Location: Romania

Re: How do I load G-code such that it's displayed directly i

Postby elenagilbert » Sat Feb 08, 2025 8:59 am

In UCCNC, the default toolpath view is set to display from above the XY plane. To automatically set a 3D view angle upon loading your G-code, you can utilize macros to adjust the toolpath view. To implement a custom view angle, you can create a macro that calls specific toolpath view functions.
elenagilbert
 
Posts: 5
Joined: Sat Feb 08, 2025 8:56 am

Re: How do I load G-code such that it's displayed directly i

Postby sabrina23 » Mon Feb 10, 2025 1:09 am

UCCNC allows macro scripting using C#-like syntax, so you can try writing a macro to adjust the view automatically when a G-code file is loaded. Chill Guy Clicker
Code: Select all
exec.Setfield(92, "35, 45, 5");
exec.Code("G90");  // Ensures absolute positioning
sabrina23
 
Posts: 4
Joined: Sat Feb 08, 2025 8:48 am


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 14 guests