View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000101||FreeCAD||Feature||public||2010-06-01 05:56||2015-08-28 20:58|
|Target Version||Fixed in Version||0.16|
|Summary||0000101: Feature to generate NC code|
|Description||I would like to propose the following feature, to have the ability to generate NC code such as gcode for use in programs such as EMC|
|Additional Information||HeeksCNC uses the libraries kurve, libarea, libactp and opencamlib|
kurve appears to be under the BSD license and the remaining three are under GPLv3
|Tags||No tags attached.|
||OK thanks for the detailed info. However, the GPLv3 is a big problem because we also have the Coin3d library which is under GPLv2 only _without_ the option of any later version. Thus, we're definitely incompatible to GPLv3. This means as long as we don't have a replacement for these libs we cannot upload any binaries. I think we can only write the code binding but it's up to you to build the binaries on your own.|
I've played with HeeksCAD but havnt worked out how to generate 3D NC code, I can only get the simple 2D profile and pocketing to work which isnt very useful to me.
So the libraries must be installed by the user, that's easy enough
Freecad just needs to generate code to use these libraries in a similar fashion to the way its done in HeeksCAD...
HeeksCAD generates a python script which is then run to generate the NC code so once I have some example python scripts it shouldn't be too difficult to work out what information is required from freecad in order to create the python script
||Can you change the reporter to myself?|
The two 3D NC code generation libraries are located here:
libactp is actually GPLv2
PyCAM: http://sourceforge.net/apps/mediawiki/pycam/ generates gcode for 3-Axis CNC machining. , GPLv3+, python. (More like me than the HeeksCNC).
GcodeTools: http://www.cnc-club.ru/forum/viewtopic.php?f=33&t=35 Inkscape plug-in for 2..2.5d engraving, GPLV2+, python.
>Freecad just needs to generate code to use these libraries in a similar fashion to the way its done in HeeksCAD...
Simple macro like "Export as /temp/blahblah.stl -> "PycamGUI /temp/blahblah.stl" may be more powerful.
I am interested in helping with this. I have worked on HeeksCNC quite a lot and have a good understanding of how things are done there.
On the issue of the GPL3 license and the opencamlib- we might be able to convince Anders to change his license to make it compatible with FreeCAD.
||Progress has stalled on this issue|
||It would be fine to work together on this topic since I have actually no experience on this field|
That would be great. There are actually several of us, from the HeeksCNC group, who are interested in doing this.
I am working on getting familiar with FreeCAD and what can be done with it, using the python console.
The first thing I want to work on is dealing with selecting and sorting edges, with python. We can do quite a bit with the HeeksCNC libraries, if we can get primitive 'sketch' (as Dan calls them- lines and arcs in order) elements out to be processed.
In the Part module you'll find the method __sortEdges__ which accepts a list of edge objects and returns the sorted list provided that the edges build a closed wire.
To work with the selection:
E.g. you have selected edges from several objects.
for i in s:
for e in i.SubElementNames:
# proceed with edges ...
Normally I export the finished model as an stl. Load it up in visualcam and process to get the required g-code I use to put into emc2 to control my cnc mill
Ive used a few cam programs and I prefer this one
check out my blog and see what we have been able to do with HeeksCNC (at least what I've been doing with it):
using opencamlib, we are able to do surfacing and waterline machining
using libarea, we do simpler 2.5D machining
The above 'unauthenticated' post was me
What material were you machining? What did it do for entry especially on the 2nd lower part
||On that top post, I was machining 6061 aluminum, using my old Bridgeport mill with a Centroid control. I did a bunch of different operations to get that part to the stage of surface machining. I started with a larger block of aluminum and milled out the outside profile and roughed out around the shape that eventually got 3D surfacing done to it. I used had to do some mods to the then current waterline machining operation to get it to enter the way I wanted. HeeksCNC and opencamlib are diamonds in the rough. I'm very impressed with what is under the hood. The reason to move over to and adapt to FreeCAD is that there is much more momentum going on over here. HeeksCAD doesn't have near the size of the community that FreeCAD does.|
It was a finishing pass, can it do roughing?
I too make parts on a cnc machine
||I did a lot of the roughing using 2.5D machining. The surfacing on the back of that part was a 20 degree draft angle in aluminum, so I didn't have to worry too much about the finishing pass taking too much of a cut.|
||roughing is also a reqired feature especially for complex parts and guys with small mills that cant do big passes|
||I have made some tiny progress on this- I can backplot g-code into FreeCAD and I can extract profile info out of it for processing with HeeksCNC libs.|
I see this is nearly a year old but was looking to work on this if it hasn't been completed already.
The brief idea I have is for an interface in FreeCAD to create a python script that does the interaction with libactp (GPLv3 as of source code today).
||Go for it, I can help by testing on a CNC mill|
I've been looking into the libactp and it looks to be worthless for ideal cnc g-code generation.
The library is extremely limited to the variables that can be adjusted.
With the GPLv2/v3 issue I think it would be best off to build this as a module of FreeCAD. This will eliminate the issue and use what is already available.
I have found the reason for slice not working (does not work with 'compounds').
As soon as the tree finishes building the latest updates I'll start working on the interface and update this with the view. Get your feed back before I work too far into the coding.
Ideas I currently have:
- Two modes
- mill (cut down a blank to desired part
- extrude (create a part from nothing, ie: plastic prototyping)
- tool table reference
- tool change script file reference
- spindle speed
- feed rate
- traverse rate
- plunge rate
- direction of cut (conventional/climbing)
- final part selection
- blank part selection
- rough in proximity
- rough in tool
- enable setup comments
- text tags used as mill points to rapidly place/clamp blank in correct location
- no entry part selection (clamp locations)
- 1,2,4 stage mill
- 1: mill only what is possible around no entry
- 2: mill all that can be done, pause for no entry's to be moved, mill remaining
- 4: rough in, move no entry's, rough in, move no entry's, finish cut, move no entry's, finish cut
- feed rate
- traverse rate
- final part selection
Let me know what you think about these.
wmayer- I set up the 'New BSD' licensed version of libarea for profile and pocket milling here:
feel free to use it.
I started a half baked cnc workbench here:
I would suggest using PySide for gui code because of licensing issues. It does work too, although I think I have used PyQt4 in that repo.
There is now a CAM sub section in the forum (thanks Werner!).
Luke Parry is helping us out now and will be adding some infrastructure to allow us to add machining operations. He is working on things related to the Document Object and Project Tree right now.
Anders Wallin (OpenCAMLib writer) is interested in helping. Things are starting to move along.
||Coming along... https://github.com/yorikvanhavre/FreeCAD/tree/path-module|
||This will be merged after 0.15 release.|
||This is now done since the Path module merge.|
|2010-06-01 05:56||unauthenticated||New Issue|
|2010-06-01 18:13||wmayer||Note Added: 0000232|
|2010-06-01 18:13||wmayer||Assigned To||=> wmayer|
|2010-06-01 18:13||wmayer||Status||new => assigned|
|2010-06-02 05:45||unauthenticated||Note Added: 0000233|
|2010-06-02 05:47||chrisb123||Note Added: 0000234|
|2010-06-02 09:35||wmayer||Reporter||unauthenticated => chrisb123|
|2010-06-02 09:40||unauthenticated||Note Added: 0000236|
|2010-06-05 08:44||unauthenticated||Note Added: 0000239|
|2010-09-03 11:47||wmayer||Note Added: 0000316|
|2011-10-14 14:01||danielfalck||Note Added: 0001151|
|2011-10-14 18:09||unauthenticated||Note Added: 0001155|
|2011-10-15 07:51||wmayer||Note Added: 0001157|
|2011-10-15 13:14||danielfalck||Note Added: 0001160|
|2011-10-15 13:45||wmayer||Note Added: 0001161|
|2011-10-15 19:20||unauthenticated||Note Added: 0001163|
|2011-10-15 19:22||danielfalck||Note Added: 0001164|
|2011-10-15 19:42||chrisb123||Note Added: 0001165|
|2011-10-15 19:49||danielfalck||Note Added: 0001166|
|2011-10-15 20:12||chrisb123||Note Added: 0001167|
|2011-10-15 20:19||danielfalck||Note Added: 0001168|
|2011-10-15 20:50||chrisb123||Note Added: 0001169|
|2011-10-30 14:27||danielfalck||Note Added: 0001193|
|2012-05-26 23:39||itzdrone||Note Added: 0002084|
|2012-05-27 21:15||chrisb123||Note Added: 0002093|
|2012-05-28 02:05||itzdrone||Note Added: 0002094|
|2012-06-02 13:48||wmayer||Assigned To||wmayer =>|
|2012-06-02 14:18||danielfalck||Note Added: 0002109|
|2012-06-02 14:56||wmayer||Status||assigned => new|
|2012-10-13 18:12||danielfalck||Note Added: 0002451|
|2015-01-01 21:40||yorik||Assigned To||=> yorik|
|2015-01-01 21:40||yorik||Status||new => assigned|
|2015-01-01 21:41||yorik||Note Added: 0005480|
|2015-01-24 18:09||yorik||Note Added: 0005713|
|2015-08-28 20:58||yorik||Note Added: 0006302|
|2015-08-28 20:58||yorik||Status||assigned => closed|
|2015-08-28 20:58||yorik||Resolution||open => fixed|
|2015-08-28 20:58||yorik||Fixed in Version||=> 0.16|