The Hell Ya Beller Fun with hot, pointy, sharp, and caustic stuff.

17Sep/170

First steps toward simulation in Path

User Shaise has been doing some very cool stuff simulating Path operations. Check out the video to see an example

9Jul/170

A little bit about Path Start Points.

Tagged as: , No Comments
22Mar/170

Adding support for Arch Panels in FreeCAD Path.

A lot of projects include multiple parts made from a single sheet of uniform material - like a sheet of plywood. This causes some trouble in a CAD/CAM application

  • You want to keep your overall model/assembly intact, but the build assembly isn't the same as the cutting layout.
  • You need to translate and rotate parts to maximize material usage
  • You want to group operations to minimize tool changes on the machine.

For a while, I've been promising that we would include a solution to this in FreeCAD Path and now we're finally getting to it thanks to facilities in the Arch workbench - Panels!

Arch Panels are designed for exactly this purpose - designing parts from uniform sheet stock. In Arch, you can define a panel object and then create a 'Panel Cut' to represent the 2D cut pattern for that part. These 2D cuts can then be aggregated into a 'Panel Sheet' for cutting.

Is that confusing? Then just watch the video. It'll make sense, trust me. And for good measure, we now have a post-processor for smoothieboard, an exporter for linuxcnc tooltables, and improved tool handling. So there ya go.

Tagged as: , , , No Comments
14Feb/170

Introduction to Creating FreeCAD Paths with Python

This is a multi-part series that demonstrates how custom paths can be created using a python macro in FreeCAD

Part 1

Part 2

Part 3

Part 4

Part 5

final macro: https://gist.github.com/sliptonic/c3b35a5a9f1afdf2d3f2b4886375dc33

Filed under: FreeCAD, Path No Comments
11Jan/170

Introduction to the DogBone Dressup

Dogbone dressup modifies inside-corner cuts to remove material missed by a cylindrical cutter.

4Jan/170

Introduction to Path Mill-Face Operation

Mill Facing adds additional functionality to the FreeCAD Path Workbench.

4Jan/170

Introduction to Path Contour Operation

For users of Path Workbench in FreeCAD, here's an introduction to the Contour Operation

Tagged as: No Comments
19Jul/150

Dogfooding with FreeCAD Path

"Eating your own dog food, also called dogfooding, is a slang term used to reference a scenario in which a company uses its own product to validate the quality and capabilities of the product"

I have a whole pile of old Altoid tins that I use to store small screws and such.  The tins had migrated into a physical pile on top of another storage container and were occasionally knocked over while I was looking for something.  I thought it would be nice to have them in a rack mounted on the slat-wall.

Laser cut acrylic seemed the natural choice.  The glued finger joints are plenty strong but need to be accurately cut.  Since the project was pretty simple, I decided to try to do the whole thing in FreeCAD including the gcode generation with the new Path module.  I know Path is still incomplete but I've been watching the improvements for months and thought I might be possible.  Here's how it went.

The parts were simple sketches padded to the thickness of the acrylic - 3mm.  The important thing is to make the depth dimension of the tabs match the acrylic thickness and the position match the corresponding slots.

Selection_014

I used the assembly2 workbench and built the assembly.  Assembly2 is very slick and I caught several boneheaded mistakes that would have cost time and plastic otherwise.

Selection_013

I used Assembly2 again to make a second assembly.  I didn't set any constraints, I just laid out the pieces to fit on the raw stock in the laser cutter.  This way, if I need to change any of the parts, I can just refresh the assembly and regenerate the gcode.

Next I built the profile operations.  This was the hardest part because Path is very new and only the simplest operations are working.  I ended up with separate operations for each outside profile and each hole.

Selection_017

I hid the solids and just focused on the gcode backplot. It's very easy to see any problems with operations and make whatever changes are necessary.

Selection_015

When things started looking good, I tried exporting the gcode and loading it in LinuxCNC. There were a few problems that I could easily have fixed by hand but decided to try automating the process as much as possible.

My laser needs a couple commands in the preamble to set the power output. I copied the linuxcnc_post.py file to my FreeCAD macro directory and renamed it laser_post.py. For FreeCAD to see it as a post processor, it needs that name format. The first part can be anything you want but it must end with _post.py. Editing was just a matter of pasting the lines into the preamble section.

At this point, I could select the project node in the tree and use the export menu.  Select 'GCode' for filetype and give it a name.  FreeCAD will prompt with a list of post processors.  I select my new customized post, and click 'ok'  The code is written and ready to be loaded in to LinuxCNC.

That last part is a lot of clicks and I tend to repeat it many times as I'm working out the last little bugs.  FreeCAD has a couple conveniences to simplify things.  The project node has a property for the output file and the Machine node (see picture above) has a property to pre-select the post processor.  With these set, you can click the 'Post process' icon on the toolbar and it's done!

The pieces cut out beautifully.  I glued them together like so:

IMG_1547

 

This was a quick one-day project while I was cleaning up the workshop.  The toughest part of a project like this with my other tools would be the fine tuning to get the slots and tabs to align right.  With FreeCAD, that was really easy.  The Path workbench still has a long way to go and it's not usable for anything but the simplest operations right now, but it's improving fast.

Tagged as: , No Comments
16Apr/153

FreeCAD Path Workbench – Big Vision and Baby Steps.

MyNameIs_Bobimage

Smooth sailing? Not quite yet.

For the last few months I've been helping out with a side project to write a CAM workbench for FreeCAD.  Being a not-very-good programmer, I've focused on cheer-leading, testing, and trying to stay out of the way.  The project has come a long way, but it will still be a long time before the average user sees it.  Still, it's a good time to start talking about the workbench, setting expectations, and encouraging folks to take a look.

Big Vision:

Don't we already have open-source CAM tools? Why do we need another one?

A quick Google search or browsing through the LinuxCNC wiki would make you think the field is already crowded with alternatives.  If you've actually tried to find a functional solution though, you probably already know the answer.  Most of the projects out there are stale, offer limited utility, or are very specialized.  A lot of them are completely dead. To be fair, some of the projects like BlenderCAM, HeeksCNC, and the Inkscape plugin gcodetools offer decent hobby-level functionality but there's nothing that competes with the commercial alternatives.

To be competitive, an open-source alternative really only needs two things (and time):

First, the application has to be user friendly:

  • Cross Platform
  • Integrated with CAD
  • Reasonably Intuitive
  • Fast

Cross Platform means the application meets the user half way.  Learning the application means the user will have to understand new concepts, watch tutorials, read manuals, and suffer through bugs.  Asking them to change operating systems or compile from source is unreasonable.  Integration with CAD doesn't mean the user should change his primary design tool but the line between CAD and CAM gets kinda fuzzy in practice.  Visualizing your tool path as it relates to your base geometry and making minor tweaks to the design to get a usable path are common.  Switching tools for minor adjustments is annoying and leads to errors.

The application doesn't have to be a marvel of form and function but it needs to have a reasonable UI.  By this I mean that it should work for a hobbyist who needs to set up a simple CNC router job but provide capabilities for an experienced machinist to set up more complex jobs as well.  (multiple fixtures, tool tables, and selection planes).  It should let users customize their configuration so the output is predictable and works with their machines.

And, of course, it's got to be fast.  'nuff said.

Second, the project has to appeal to the developers:

  • Reasonably easy to learn
  • Great community
  • Clear license policy

Plenty of digital ink has been spilled discussing what it takes to make a great open source project so I'm only talking about those things that I've personally seen kill open-source CAM projects.

The number of people in the world that have both programming skills and machine tools is pretty limited.  For open source CAM to succeed, the developers who show up need to be able to get into the project easily and become productive.  A great open source CAM project would have a great architecture, robust community, thorough documentation and large user base.  It should be easy for a new developer to understand the landscape and figure out how to improve application -even a little bit- and then get their improvements adopted by the project.

I'm not sure anybody including lawyers actually like dealing with licenses but they're a reality we have to live with.  If the license landscape isn't unambiguous, packaging and distribution of the application is a non-starter.  If the license doesn't protect the developer contributions and make it easy to distribute, why bother?

Time

The things I've listed aren't rocket science and they don't, by themselves, make a great application.  But together they create an environment in which a great application can mature.  Obviously I'm writing this because I think the FreeCAD Path project has this particular mix.

So where is the project now?

babystepsRather than trying to provide all the functionality of a mature CAM application, Path will initially provide only the basics.  In fact, the real focus will be on the underlying infrastructure.

Like other workbenches in FreeCAD, the low level stuff is programmed in C++ and the high level, user-facing, functionality is written in Python.   The low-level stuff includes the data structures to represent a single move (command), a group of moves (path) and other structures for organizing projects.  It handles representing those things on the screen and provides the interfaces to Python so they can be manipulated by the GUI and macros.

An import framework is provided so path information created externally can be loaded and rendered within FreeCAD.  Likewise and export framework exists to get path data out in a usable form.

If importing and exporting were only provided through the compiled C++ application code, it would mean that FreeCAD's ability to read and write gcode would be fixed and difficult to adapt.  So the import/export framework is exposed through a set of  pre_ and post_ scripts written in Python.  This means FreeCAD can play nice with all kinds of other applications.  If you already have a program that generates gcode, you can import the code into FreeCAD.  If your machine needs gcode in a unique dialect or modified some other way, you can tweak the export post_ script to get exactly the what you need.

This is pretty handy but most users will want to create gcode directly from the things they design in FreeCAD and this is where things get interesting.  Experienced CAM users opening the workbench for the first time will be asking questions like, "How do I create a profile or pocket a feature?"   CAM operations like this will be implemented as a Path-Python-Feature (PPF).  A PPF is a python script that uses the FreeCAD API to generate the path data.  Almost everything you will see in the workbench GUI represents a PPF.  PPFs can have have icons and dialogs and integrate seamlessly into the workbench GUI and power users can study and extend their functionality.

Now is the time to set expectations.  The initial set of PPFs will be limited.  Users just looking for a functional CAM system might be disappointed.  There will be pocketing, profiling, and drilling operations, but they will have plenty of bugs and missing features.  Other kinds of operations, like 3D surfacing, will be missing altogether.

CAM users will also be looking for tools to organize operations into a complete project -- Sequencing, tool management,  part nesting, etc.  Early users of Path will see some of this but it too will be buggy and incomplete.  Users should expect things to change a lot in the near future.

Because all of the PPFs,  project structure, and pre/post processing is written in Python its pretty easy to experiment with and improve.  No doubt, an active community will mature the operations quickly and add new ones as well.

Once Path is merged into the Master branch of the FreeCAD development repository, it will still be quite a while before end-users see it.  Users running the development version will see it, of course, but it might be a year or more before Path makes its way into a stable version.  By then, the functionality should be more mature and usable for real CNC projects.