Sunday 4 May 2014

FreeCAD: Work Features Release 1

UPDATED: Thanks to the community contributions, this work features project has been extended with more options and a nice gui. Find it here: http://www.freecadweb.org/wiki/index.php?title=Macro_WorkFeatures

This is the first release of the Work Features macro. It can do what is shown in the video plus few things more.



Is not finished and I have to update some functions, but to know how it works, the code is here.

How to use it: 

(I don't know exactly why, but the last part of this section has the fonts messed up, sorry for that)
At the moment, you need to copy and paste the code at the FreeCAD python terminal every time you open a new document. 
Yes, I know I need to improve this. Any help is appreciated.  ;)

Once you do that, you need to move by command line (need to improve here too) and these are the options:

-OriginObjects This is executed automatically at copy-paste, generates Origin and folders
-WorkPoint:
-MiddPoint # Select one or more edges and will place the middpoint
-Center # Select one or more circular edges and will place centerpoint
-FaceCenter # Select one or more faces and will place a point at geometrical center
-WorkAxis:
-TwoPoints # Select two points and will place an axis across
-CylinderAxis # Select a cylindrical face and will place its axis
-WorkPlane:
-AxisandPoint # Select one axis and point and will place a plane containing both
-ThreePoints # Select three points and will place a plane with the points inside
-PlaneandPoint # Select one plane and point and will place a parallel plane at point
The workflow is:
Select the needed objects for reference and then type the command.
For example, one command could be:
WorkPoint.FaceCenter()
to create a point at the center of the selected face.
or
WorkPlane.ThreePoints()
to create a plane across three points.
And that's all!
Tell me your experience with the macro or any suggestions you have :)
Bye!

2 comments:

  1. Hi ! it's a very cool feature ! I think I going to use it a lot. I made a short GUI for your macro. https://gist.github.com/wood-galaxy

    ReplyDelete
    Replies
    1. Hey! Thanks for your comment !
      The link seems broken, but I have a Gui in mind too :D

      Thanks for your support!

      Delete