Working on a new open source 3D CAM program

Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Working on a new open source 3D CAM program

  1. #1
    Registered
    Join Date
    Nov 2004
    Location
    US
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default Working on a new open source 3D CAM program

    Hi all, I mentioned something about this in the "ideas for an open source cam" thread, but I've started my fourth attempt at an open source CAM program. So far, I've got about 80 hours of work put into it. See the attached screen shots for an idea of the current state. Yes, I fixed the speed issue mentioned in the other post and got some form of G-code output working by the weekend .

    I'm going to try to keep working on this until either it or another open source program becomes a usable 3D CAM tool.

    MeshMill is the working name for it at the moment since that's what it does, although I may change it to something more creative avoid confusion with MeshCam.

    Anyway, the planned features of version 1 will be:
    -Load/save STL files
    -Load/save G-code files
    -Load/save cycle configuration
    -Hierarchical cycle tree with "supercycles" for patterning, mirroring, etc... groups of cycles
    -Milling simulation/3D backplot
    -Toolpath optimization
    -Large set of highly configurable machining cycles
    -5 axis support through patterning of 3 axis cycles

    It is written in Java, so it should work on Linux/Mac/Win/etc...

    I am currently working on implementing tool size/shape compensation. I am not sure what algorithm would be best to use for this.

    Another thing I'm not sure about is how to implement simulation/backplotting. I plan to have the stock material represented by a mesh and "virtually mill" the mesh away in an accurate way. To maintain a relatively high performance level, I know that I will probably have to dynamically subdivide and optimize the mesh.

    Any thoughts on either of these problems?

    Also, is there anyone here who would be interested in working on this? As I said, it is all Java.

    Similar Threads:
    Attached Images Attached Images


  2. #2
    Member WayneHill's Avatar
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    761
    Downloads
    0
    Uploads
    0

    Default

    galacticroot,

    Looks good.

    Wayne Hill


  3. #3
    Member
    Join Date
    Aug 2006
    Location
    Australia
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default

    galacticroot,

    Always good to see someone who is willing to do something for everyone else. i second waynes comment. Looking great. We definately need a good free cam program to use as it is always the hardest to find to suit the needs. Keep up the good work and hopefully look forward to a proto version of MeshMill.

    Daniel



  4. #4
    Registered
    Join Date
    Nov 2004
    Location
    US
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default

    Well, I've applied for a Sourceforge project. The program will now be called "ThreeCAM". Assuming Sourceforge approves the project, I will make the source available there.

    Development wise, I a lot of the day thinking about a way to handle the size/shape of the tool and haven't come up a good solution yet. In the meantime I added a really crappy way (inaccurate) of doing it. I made a variety of small improvements including support for tool tables.

    Again, I will probably need some help with this. I am neither a professional programmer or mathematician and without help it would likely take years for me to develop this into a high end CAM package.



  5. #5
    Registered
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by galacticroot View Post
    Well, I've applied for a Sourceforge project. The program will now be called "ThreeCAM". Assuming Sourceforge approves the project, I will make the source available there.

    Development wise, I a lot of the day thinking about a way to handle the size/shape of the tool and haven't come up a good solution yet. In the meantime I added a really crappy way (inaccurate) of doing it. I made a variety of small improvements including support for tool tables.

    Again, I will probably need some help with this. I am neither a professional programmer or mathematician and without help it would likely take years for me to develop this into a high end CAM package.
    Hello,

    I might be interested in helping out. I say might as I am not sure how much time I will be able to spend on it (due to family, work etc). That said I program in Java for a living and am a solftware architech for a software company in the telecommunications area.

    The Java 'gotcha' is that I do 99.8% of my Java codeing in the 'backend' side of things, EJBs, integrations, webservices etc and therefore little experience with the graphical side of things.

    The CAM 'gotcha' is that I have no experience with CNC at the moment. I know no G code etc. I have a mill I am thinking of converting and a lathe as well so I am researching. I have come to the conclusion though that a free CAM program would make things easier as I model eveything in Alibre before manually machining so if I CNC a machine I would like to 'automate' the process as much as possible.

    Have any 'design' written out or a plan? If you get others to help there will need to be some design and architecture by the brains of the project or it might get out of hand quickly. Then again that might just be my software architecture brain talking

    PM me if you want to discuss more how I might be able to help or let us known once the project is publicly available.

    TTYL, Jeff



  6. #6
    Registered
    Join Date
    Nov 2004
    Location
    US
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default

    OK. I've got a basic web page up at http://www.threecam.com/. The SourceForge project page is at http://sourceforge.net/projects/threecam/.

    The current code is available through subversion at threecam.svn.sourceforge.net/svnroot/threecam/ThreeCAM. I would recommend importing it in Eclipse using subclipse (http://subclipse.tigris.org/). It requires the Java3D library.

    Normally, I would start a project like this by creating a detailed design specification, flowchart, etc..., but when I first started this I was mostly interested in seeing if it would work or not, so I just started coding with only a very general design in mind. I now need to retrofit a formal design to it and I haven't really decided on some of the specifics yet. I am very much open to suggestions.

    The code is messy in some places, since I was trying out a variety of methods to do various things. I am working on cleaning it up.



  7. #7
    Member
    Join Date
    Apr 2007
    Location
    USA
    Posts
    1955
    Downloads
    0
    Uploads
    0

    Default

    Hi, I wish I had the skills to help. Just curious, have you considered working with some existing open source CAM projects ? I have no idea which ones are "good" vs "ok", etc, but here is a link to one I have been watching.

    http://gcam.js.cx/index.php/Main_Page

    I know he is looking for help on his project. It would be really neat if you could help him get it into 4 axis capability.

    Take care

    Harry

    Last edited by harryn; 08-24-2007 at 03:11 PM.


  8. #8
    Registered
    Join Date
    Mar 2004
    Location
    Iowa, USA
    Posts
    261
    Downloads
    0
    Uploads
    0

    Default

    GalaticRoot:

    I took your source and moved it into Enterprise Architect and ArgoUML. I am attaching a ZIP of both files.

    If you go get ArgoUML version 0.24 and install and then open the project ThreeCam.zargo you can make you documentation. ArgoUML is Java based.

    You can export to XMI and then import to Eclipse if you want. Or use Argo to do the UML.

    Enterprise Architect offers a 30 day trial.

    RipperSoftware

    Attached Files Attached Files


  9. #9
    Registered
    Join Date
    Nov 2004
    Location
    US
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default

    rippersoft:
    Hmm. I haven't ever done anything with UML before, only simple flowcharting, but it looks handy. I'll have to learn some more about it. I downloaded ArgoUML and am currently reading about UML.

    I'm currently documenting the classes and methods in eclipse.

    harryn:
    I was actually thinking about GCAM earlier. I downloaded a copy and tried it out. I thought it would make a good compliment to a mesh based cam. I could see it becoming sort of a graphical parametric program generator. As for adding features to it, I'll have to look at the code sometime and see what I can do.



  10. #10
    Member WayneHill's Avatar
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    761
    Downloads
    0
    Uploads
    0

    Default

    Java Netbeans IDE interface is free.

    http://www.netbeans.org/

    It would be nice if everyone involved use the same development software for the project. If everyone starts going in their own preferred IDE, then it will be like herding cats.

    Am I missing anything here? Does it matter what complier is used?

    Wayne Hill


  11. #11
    Registered
    Join Date
    Nov 2004
    Location
    US
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default

    I have currently have both JavaBeans and Eclipse, but I switched to using Eclipse a couple years ago.

    It probably doesn't matter much which IDE is used. For Eclipse, there are a couple metadata files with Eclipse project information (which are only used when the project is initially imported), but Eclipse will work with any Java code. If the code is edited with another IDE, it will still work with Eclipse. The only problem I could see is variation in the comment syntax. For example, comments starting with "TODO" are treated specially in Eclipse, although this can be configured on a per-project basis to work with any tags. In the end, all you are doing is editing text files.

    I could see the NetBeans GUI editor being problematic, but that is only a problem if it is actually used. I don't remember how it worked exactly, but I remember that it generated code blocks which could only be changed with the GUI editor.

    The compiler is completely separate from the IDE. I have been using the Sun JDK 1.5. Other compilers can be used for development, but it might be best to create releases with the official Sun JDK.

    Eclipse is open source and can be downloaded at:
    http://www.eclipse.org/



  12. #12
    Member WayneHill's Avatar
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    761
    Downloads
    0
    Uploads
    0

    Default

    Which version of Ellipse are you using?

    Wayne Hill


  13. #13
    Registered
    Join Date
    Nov 2004
    Location
    US
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default

    Version 3.3.0.



  14. #14
    Member WayneHill's Avatar
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    761
    Downloads
    0
    Uploads
    0

    Default

    galacticroot,

    I have Java Eclipse configured and running ThreeCam on WinXP !!
    Woo Hooo

    Wayne Hill


  15. #15
    Registered
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by WayneHill View Post
    Java Netbeans IDE interface is free.

    http://www.netbeans.org/

    It would be nice if everyone involved use the same development software for the project. If everyone starts going in their own preferred IDE, then it will be like herding cats.

    Am I missing anything here? Does it matter what complier is used?
    Hello,

    I use NetBean for work at the moment and I have Eclipse now as well for this project. Both are free. I might try to create a project in NetBeans for ThreeCAM if I get a few extra cycles today.

    That said I work at a dev shop and until recently I think the core team used NetBean, ViM, jEdit, Eclipse, ThinkPad and one guy was using an editor he wrote himself. So the IDE doesn't really matter as long as the strucutre is followed and the developer likes his setup.

    BTW I have successfully run ThreeCAM with JDK 1.5 and 1.6 and with some ant files I think we can compile it etc without an IDE.

    TTYL, Jeff



  16. #16
    Registered
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default ToolPaths & Dev Questions

    Hello,

    1. so to manage discussion on this project do you plan to continue to discuss it in this formum or will there be an e-mail based list or such? Thoughts?

    1a. As I stated above I am used to doing backend non-graphical work and quite honestly I think if I get involved I would want to keep it that way as my GUIs are usually painful and ugly That gets to me to tookpaths etc...

    2. Do you have an idea on the type of toolpath algorithm we want to have? I was wondering if it might be a nice thing to have a plugable system where you implement an interface and can write your own toolpath generators. I am guessing that any cam SW is only as good as it's toolpath determination.

    2a. Related to that. I am still learning about CAM etc and I was wondering if someone could explain something. Is it normal for the CAM SW to take the object and your tool catalog and determine the best tool and path for the job? Or does the user usually specify the tools (endmills etc) to use the the toolpath is generated based on that?

    The FreeSteel (http://www.freesteel.co.uk/html/faq.html) guys have some interesting comments on toolpath generation. I'm going to try to ping them and see what they say for pointers. You can also find some algorithm stuff at
    http://wiki.linuxcnc.org/cgi-bin/emc...CAM_References

    3. galacticroot: is there a way in the current code to define the 'block' that the object will be eventually cut from? I can run the program and I can even load some complex STL files exported from Alibre. I was playing around with toolpath ideas on the weekend on my whiteboard trying to figure out how the algorithms work and no matter what we need to start with the source material block.

    BTW I like the Tool Library edit capability of VisualMill. I have been playing in their demo version.

    TTYL, Jeff



  17. #17
    Member WayneHill's Avatar
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    761
    Downloads
    0
    Uploads
    0

    Default

    The programmer selects the tool according to the application.

    Wayne Hill


  18. #18
    Registered
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by WayneHill View Post
    The programmer selects the tool according to the application.
    Hello,

    Oh good, as I was trying my damnest to figure out how the toolpath algorithms figure it out from the tool catalog of the system I could only come up with a repetitive trial and error approach.

    Jeff



  19. #19
    Registered
    Join Date
    Nov 2004
    Location
    US
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default

    -Forums/mailing lists: There is a forum for developers as part of the SourceForge project page. I can also set up mailing lists through SourceForge.

    -Toolpath generation: Toolpaths are generated through the cycle classes. This is set up to allow for easy addition of new cycles, and plugins would certainly be a possibility.

    Currently, there is only one toolpath algorithm and it is incomplete. It simply moves the tool to all X and Y points in a grid and sets the Z position at each point to the minimum height for which the tool will not intersect the object.

    Calculating the minimum height is tricky. At the moment, it simply solves for the intersections between a series of five vertical lines (front, left, right, back, and center of the tool) and the mesh. This will ignore small triangles which lie inside the lines and is not sufficient.

    I am working on a few other methods which would improve this. Currently, the most promising one uses a different algorithm for each tool shape, but should be fast. Here is a quick summary:

    Square tool: There are four possibilities for the intersection between a square tool and a triangle:
    1. It may not intersect if the triangle lies completely outside the tool's vertical profile. In this case, the triangle is ignored.
    2. It may intersect at one point, along the corner of the tool.
    3. It may intersect at an infinite number of points in a plane if, and only if, the triangle is perpendicular to the Z-axis.
    4. It may intersect at an infinite number of points along a line if, and only if, the triangle is parallel to the Z axis.

    Ball tool: There are three possibilities:
    1. It may not intersect (same as above)
    2. It may intersect at a single point on the ball surface, tangentially. The point of intersection can be found using the slope of the triangle as calculated from the dot product of the triangle's normal and the z axis.
    3. It may intersect at an infinite number of points along a line (as above).

    Cone tool: Five possibilities:
    1. May not intersect.
    2. May intersect at the tip of the tool if, any only if, the triangle's slope is less than the slope of the cone.
    3. May intersect at along a line if the triangle's slope is equal to the slope of the cone.
    4. May intersect at a point along the base of the cone if, and only if, the triangle's slope is greater than that of the cone.
    5. May intersect along a line (as above)

    The applicable case can be determined quickly and easily ahead of time. Each case is handled separately. The process is repeated for each triangle in the vicinity and the highest compensated Z value is taken (as in the current code).

    The advantage of this algorithm is that it would be about as fast at the current one and work fairly well. The disadvantage is that the only way to work with odd tool shapes would be to combine primitive tool shapes and do multiple passes.

    -Stock material: Yes, this will be a major part of the program. While it would be possible to simply specify the bounds of a rectangular prism, I think using a mesh for the stock material would integrate very well with the planned simulation and optimization features. It would be possible to add something temporary though.

    -Tool selection: It would be possible to select tools automatically, but I'm not sure what, if any, benefit it would have over manual tool specification. One special case would be later on if feature recognition was implemented and the program could do things like select a correctly sized drill bit to make a hole. I do have some ideas for implementing automatic feature recognition, although it isn't a high priority.

    BTW, Jeff, I sent you an E-Mail. Did you get it?



  20. #20
    Registered
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default Netbean Project

    Hello,

    For those of you interested in using NetBean with this project I have attached a ZIP file with a nbproject directory and build.xml. UnZIP this in your ThreeCAM directory after getting it from SVN and it should work in NetBeans.

    TTYL, Jeff

    Attached Files Attached Files


Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Working on a new open source 3D CAM program

Working on a new open source 3D CAM program