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


Understanding Tool Path Generation in HeeksCNC

When I first started using HeeksCNC I was totally confused.  It seemed overly complex.  When I finally understood it, I realized what a great model it is.  I still won't claim to be an expert but from my perspective it meets three really big objectives.  One of these is compromised in every other solution I've seen:

1) It keeps the computationally intensive algorithms in C++ where they run fast.   Other systems that are flexible and customizable are written in interpreted languages and that means they're slow for computationally intensive tasks.  Generating a complex path can tax a processor and really needs to be fast.

2) It provides a scriptable interface in a friendly language (Python).  No matter how good the developer was, there's no way he can anticipate every need.  That's why we like applications like blender, inkscape, gimp, and FreeCAD.  These apps assume that the user may want to extend the application.  Making the tool path generation accessible through a scripting language unleashes a lot of power.

3) It allows customization for the machine specific output without recompiling.  This is the Post-processor.  Not all machines are created equal.  Different capabilities and different controllers mean the final output must be tailored.

Dan Falck did a great write-up of how Python is used in HeeksCNC to generate tool paths using the C++ libraries.  I hope a future CAM workbench for FreeCAD has a structure like this.

Tagged as: , 1 Comment

FreeCAD Book Published!


 Dan Falck and I spent the last couple months working the Packt Publishing to write this book.  The book is written as a series of recipes to guide new users through some of the basic concepts in FreeCAD.  The later chapters get into how Python can be used to automate and extend the application.

I hope the book will be a benefit to the community and make it easier for new users to get productive with this great application.

BTW, Packt Publishing is very supportive of Open Source software.  According to their website, a portion of the royalties will go directly to the project.

Tagged as: No Comments

FreeCAD hidden gems – setting colors for individual faces.

This is one I'm documenting here because it's come up twice on the #freecad channel and because I keep forgetting it myself.

FreeCAD has a bunch of different ways to change the appearance of solids.

You could change the properties on the objects view tab:


You could use the appearance... tool from the object context menu


You could use the random color button from the object context menu


You could use the appearance... tool from the view menu (this is the same as the context menu.  Why it's in 'view' and not 'edit' I'll never understand.


You could use the random color item from the view menu (see above)


There's at least one more that's different than all the rest.  If you select the object and right click over the tree (not the 3D window, but the object tree) you get a menu item called set colors...



This one opens a task panel.  With the task panel open, you can Ctrl-click individual faces in the object and then set different colors for them.






Tagged as: 4 Comments

Simple Assemblies in FreeCAD

FreeCAD's assembly module is still in development.  By all reports, this is going to be an amazing feature just dripping with awesome sauce.  Alas, it's not here yet.

In the meantime, if you want to design anything with multiple parts, your options are pretty limited.  Here's a technique I've been using on the OpenROV project:


1) Design each of the parts in a separate FreeCAD project file.

2) Export the part as a STEP 214 file (.stp)

3) Import all the step files into a new FreeCAD file just for the assembly.

4) Duplicate any parts you need multiple instance of.

5) Use the placement dialog to rotate and position the parts together.



Step 1 - Design each of the parts in a separate FreeCAD project file.

You can certainly design multiple parts in the same file but this causes problems if you need two instance of a part for the assembly.  You can select a pad object and duplicate it, but the duplicated part will not be linked to the sketch so any downstream changes will not be incorporated into the duplicates.  I use my FreeCAD designs in other software like HeeksCNC for generating gcode and I find that the .step files are more portable.

In the image below, I have three FreeCAD files open.  bulkhead, ductingbracemount, and a new empty assembly file.



Step 2 - Export the part as a STEP 214 file (.stp)

Step files  are widely supported by different CAD/CAM applications.  FreeCAD is no exception.  Both import and export have worked flawlessly for me.  Simply select the solid in the project tree and click the menu item File->Export...  Then, when the dialog appears, select STEP 214 from the file type and give it a name.  Repeat for the other parts too.

Note: I use the same name as the file and the extension .stp.  If you don't include the extension, FreeCAD won't write the file.  I think that's a bug.



Now in my project directory I have bulkhead.fcstd bulkhead.stp ductingbracemount.fcstd, and ductingbracemount.stp.  If I make changes to the part, I have to export again.

Step 3 - Import all the step files into a new FreeCAD file just for the assembly.

Switch to the empty assembly file and import the .stp files.  This is just the reverse of the previous step.  File->import.  The import dialog will let you select multiple files at once and import them all.  This is nice.

One thing to note about the import export:  STEP files preserve the position and orientation of the parts in the global coordinate system.  Once the parts are imported, you can adjust these properties.  It's really helpful, though if you at least get your parts drawn in the right plane before exporting them.  I find adjusting position to be relatively painless but getting the rotation correct is more frustrating.  Once imported, the step files will behave like other objects.  You can run boolean operations on them, adjust colors, make them invisible, etc.



4) Duplicate any parts you need multiple instance of.

In my example, I need two ductingbracemounts.  Select the part in the tree and use Edit -> Duplicate selection.  The duplicate will be in the same position as the original so it will be invisible until moved.


5) Use the placement dialog to rotate and position the parts together.

Select each part in the tree and use the placement dialog Edit->Placement... 

to fine tune to rotation and location of the part.  Most users will fine the Euler angles (Yaw, Pitch, and Roll) more comfortable than the default "Rotation axis with angle" for setting the rotation of the part.


Bonus step - Make pretty output.

Actually this is more of a teaser since it isn't in master branch yet but mrlukeparry has been doing some really cool stuff with the raytracing workbench and soon we'll be able to generate nice pictures like this:


*Feature Ideas:

Here's some things that would make this a lot easier

  • FreeCAD should be able to import from other FreeCAD files.  It would be nice to import a solid, sketch, or part from one file into another without having to export to step.  Step is useful for going to other applications, but it would be nice to stay native whenever possible.
  • When exporting, FreeCAD should give some help with the filename.  Default the extension based on the type selected and default the filename to the current part name.
  • Can anyone calculate the rotaton with angle in their head?  I know it's superior to avoid gimble lock, but it's not very human friendly.  Maybe I'm wrong.
Tagged as: 9 Comments

Pinewood Lowrider

I've built some fast pinewood derby cars in the past but this year was just about looking good.  I've always loved the way those lowriders bounce and thought it would be cool to make a derby car do that.  Here's my version.  A few more pictures and build details after the jump.


FreeCAD is becoming my favorite modeling tool

It's taken a while to get used to the interface and there's still plenty of bugs to work around but the FreeCAD project is really moving along nicely.  The sketcher makes designing parts like the ones below really simple.   I learn things better with an actual project rather than just trying to copy tutorials so I launched into this silly thing: