Units for feedrate

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Units for feedrate

Post by GeneFC »

Chris,

All of the provided post processors are in the installation directory:

\Mod\Path\PathScripts\post

for Windows installations. Probably something closely related for other OS installations.

The post processors are not too large, and they are pretty easy to read and edit like any other Python file.

"UNITS" and UNIT_FORMAT" are parameters inside linuxcnc_post.py.

The explanations are at the same place the parameters are set.

In the past it was almost essential that users edited the post processor(s) for their own machine needs, and I learned how some time ago. I believe it is supposed to be pretty automatic now.

I still find it very useful to know how to read and understand Python files. Almost everything in the Path workbench is written in Python, and I can often understand a problem or unexpected behavior by taking a look.

Gene
ChrisWesley
Posts: 46
Joined: Mon Nov 20, 2017 11:31 am

Re: Units for feedrate

Post by ChrisWesley »

Miampert, thanks. Gene, also thanks.

However, this is what those parameters look like in my file:

# These globals will be reflected in the Machine configuration of the project
UNITS = "G21" # G21 for metric, G20 for us standard
UNIT_SPEED_FORMAT = 'mm/min'
UNIT_FORMAT = 'mm'

- in other words, they are what they should be for me - yet it doesn't work. gcode specifies feedrates in mm/s.

Now I see this file, I can read the comment which explains that putting it in "the appropriate paths scripts folder" would allow me to modify these values from the GUI. But how could/should I have worked this out for myself? There is no clue in the GUI itself.
And where is the macro directory? How would I find that out?

When I post in a forum it's because I've already wasted a lot of time failing to find it for myself.
Perhaps, with FreeCAD, that is not the way to go as it's a bleeding edge ongoing development.

From my experience, right now, FreeCAD is good for you if:

1. You already know a lot about CAD
2. You are happy to spend many hours tinkering
3. You do not need to get anything specific done any time soon
3. You know Python
4. You want to live in the FreeCAD community

I fail on every single criteria, and it's been a nightmare.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Units for feedrate

Post by chrisb »

ChrisWesley wrote: Fri Nov 24, 2017 10:23 am 1. You already know a lot about CAD
2. You are happy to spend many hours tinkering
3. You do not need to get anything specific done any time soon
3. You know Python
4. You want to live in the FreeCAD community

I fail on every single criteria, and it's been a nightmare.
I can understand your points 1-3 and 3 again and actually you don't have to meet them.

Point 2 is to be discussed, as 3D modelling is inherently difficult. Much more difficult than 2D. You have to learn to think differently to see the right approach for a model. Often it is kind of "orthogonal" to a first intuitive approach.

Point 4 is something you cannot omit. FreeCAD is an open source project and there is much information which has never been documented, but which is readily available here, especially as far as the upcoming 0.17 version is concerned.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ChrisWesley
Posts: 46
Joined: Mon Nov 20, 2017 11:31 am

Re: Units for feedrate

Post by ChrisWesley »

Hi Chrisb,

I know a bit about 3D modelling from TinkerCAD. I've designed and 3D-printed maybe 30 things.

But here's the kicker. In desperation, I downloaded and ran Fusion 360 for the first time yesterday and within 15 minutes I had gcode. THAT'S HUIGE.
Now granted, that gcode crashes my CNC machine (it's not putting G0 in front of some move instructions for some reason), but still - it's a VAST difference.

I think I understand how the kind of person that would make the huge commitment to develop an open source package as ambitious as FreeCAD, would be far more interested in getting it to do clever things than in making it easy to use for idiots like me. Honestly, I'm probably that way myself. But if that is your stance, then I think you could make it clear to people considering using it. It would certainly have helped me to know that before I started. If I had, I would definitely not have started.

Needing to know that there's this file called unixcnc_post.py and that, if you pout it in your macros folder then it won't get washed away by a new install, and that THAT - and not the GUI - which will solve your problem - is - if you don't already know it and hate asking strangers for help 0 is miserable.

And byt he way, it STILL doesn't work! Please can you help on that? See above?

Anyway, it'll get there in the end, and it will be another massive benefit to those who can't afford the big stuff, or who support the open source freeware ethos, and a huge credit to those who created it from the ground up.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Units for feedrate

Post by sliptonic »

I don't know if this is @ChrisWeasley's problem but it might be confusing for others:

Regardless of what you have set in your unit preferences or which post processor you're using, if you use the 'inspect Gcode' tool on the toolbar, you see the gcode in native mm/s units.

If you set the units in preference to 'metric small parts & CNC' then the unit display is correct in the task panels. And if your post processor is working correctly, the final output will be in the right unit. But in every case, the Inspect tool is showing the commands in mm/min.

At a bare minimum, the Inspect tool tool-tip should change. Inspect isn't really showing gcode, it's showing the raw path command contents.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Units for feedrate

Post by chrisb »

sliptonic wrote: Fri Nov 24, 2017 4:33 pm At a bare minimum, the Inspect tool tool-tip should change. Inspect isn't really showing gcode, it's showing the raw path command contents.
At first glance I had read that you wanted to change tool, and not just the tooltip. The tool itself is great: to have the possibility to view the raw path commands before they are processed.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: Units for feedrate

Post by JoshM »

sliptonic wrote: Fri Nov 24, 2017 4:33 pm Regardless of what you have set in your unit preferences or which post processor you're using, if you use the 'inspect Gcode' tool on the toolbar, you see the gcode in native mm/s units.
................................
But in every case, the Inspect tool is showing the commands in mm/min.
A I misreading or did you reverse units in restating. It's always mm/second with inspect-tool, on raw-code. Also, order differs from linuxcnc post with Feed following G1 before Coordinate.

I like the ability to inspect raw Path code--before Post Processing, but it initially confused me. I think one confusing area is that end users may not understand the intended partitioning between CAD, CAM, and CNC-Controller. Initially I was unaware what the function of the Post-Processor was--then I dug in, asked advice, and modified the LinuxCNC to fit my setup, and learned a bunch. I'd never used Python, but after realizing the TAB/Space distinction, it's not so bad, especially just to tweak the code to personalize...

Regards,
Josh
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Units for feedrate

Post by sliptonic »

JoshM wrote: Fri Nov 24, 2017 5:27 pm
A I misreading or did you reverse units in restating.
Doh!
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Units for feedrate

Post by chrisb »

Is inspect GCode something to present to the end user as an icon or should it be moved to the menu? For developers it sure is very convenient to have quick access.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Units for feedrate

Post by sliptonic »

I agree that it's handy and I think it should be easily accessible for that reason. However, it has to be clear that you're not looking at finished gcode. The finished gcode depends on things that might not be known yet, like post-processor.

However, to be able to look at the commands and highlight sections of code is necessary to debug problems. I think we can do better just by labeling the tool appropriately.
Post Reply