Hello
First thank you all for FreeCAD !
I'm implementing a CAM library and will include it in the CAM workbench.
It's a work in progress (I'm learning C++, algos needed ... along the way).
It's under MIT license (double license with LGPL if allowed and needed).
As soon as I'm familiar enough with Git, it will be posted online.
Right now it's very basic, it takes a bunch of triangles and generates a path for a "drop down" cutter (-> see ugly test screenshots)...
Under the hood:
- "Drop down" cutter algo
- Cylindrical and spherical cutter (bullnose cutter to come)
- Use of triangles (no elevation map) for collision detection
- KDTree to speed collision detection
To come:
- adaptive stepsize
- simulator (marching cubes for visualization, dual contouring if needed)
- "Waterline" cutter algo
If moderators are OK with it, I'd like to post my progress here.
Comments and suggestions are welcome !
Vincent
new CAM library and workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: new CAM library and workbench
Hi Vincent
Sounds good to me.
Since you are using a compatible licence, your code will have the possibility to be accepted as part of FreeCAD.
Jim
Sounds good to me.
Since you are using a compatible licence, your code will have the possibility to be accepted as part of FreeCAD.
Jim
Re: new CAM library and workbench
Very interesting! Yes, please keep us updated!
Re: new CAM library and workbench
Yes, very interesting indeed. I know your just getting started on this but a couple of questions if you don't mind.
I see your using a mesh approach at present. Do you have any plans to advance this to use BRep data?
With your current code, what kind of performance impact are you seeing with increasing poly count of your mesh objects? That is to say, for a more accurate part, one would use a finer mesh. Is the performance impact more linear than exponential, or the other way around?
Is your work being based on the frame work that DavidNicholls and others have been doing, or are you starting from scratch?
At any rate, having anything that would be a functioning CAM workbench, i.e., a CAM workbench that produced Gcode from a part, would be far better than no CAM workbench. Please keep it coming.
Mark
I see your using a mesh approach at present. Do you have any plans to advance this to use BRep data?
With your current code, what kind of performance impact are you seeing with increasing poly count of your mesh objects? That is to say, for a more accurate part, one would use a finer mesh. Is the performance impact more linear than exponential, or the other way around?
Is your work being based on the frame work that DavidNicholls and others have been doing, or are you starting from scratch?
At any rate, having anything that would be a functioning CAM workbench, i.e., a CAM workbench that produced Gcode from a part, would be far better than no CAM workbench. Please keep it coming.
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Re: new CAM library and workbench
Tanks for the comments !
quick61:
BRep:
If I understand correctly, BRep is a high level representation of a geometry. I don't know of an algorithm using BRep for toolpath generation. That said, if you have pointers, I'm interested!
Performance:
No tests were performed yet. Performance for toolpath generation should be O(n) (with n # of triangles) with lots of "ifs". The best evaluation should be an actual test.
FreeCAD workbench:
Yes I intend to use what they have done as a basis. I was able to compile and execute their work but haven't done anything in FreeCAD itself yet.
Don't hesitate if you have more questions.
Vincent
quick61:
BRep:
If I understand correctly, BRep is a high level representation of a geometry. I don't know of an algorithm using BRep for toolpath generation. That said, if you have pointers, I'm interested!
Performance:
No tests were performed yet. Performance for toolpath generation should be O(n) (with n # of triangles) with lots of "ifs". The best evaluation should be an actual test.
FreeCAD workbench:
Yes I intend to use what they have done as a basis. I was able to compile and execute their work but haven't done anything in FreeCAD itself yet.
Don't hesitate if you have more questions.
Vincent
Re: new CAM library and workbench
brep geometry is the "native" geometry type of OpenCasCade, the geometry kernel beneath FreeCAD. Almost all of the interesting stuff in FreeCAD (Part, PartDesign, Arch, etc) uses it. The mesh workbench exists more to handle input and output geometry, before it is converted to/from brep, but is not much used for modeling. brep has many advantages, one of the major ones is curved surfaces.
Note that you can easily get a mesh from a brep shape by using its tessellate method. So I think in this case it shouldn't be hard to support both formats.
Note that you can easily get a mesh from a brep shape by using its tessellate method. So I think in this case it shouldn't be hard to support both formats.