I made a simple Path command to make circular holes (larger than the tool diameter) by helical milling motions. I used to do something similar with custom scripts in HeeksCNC, but as the Path functionality of FreeCAD is maturing I think I can finally do all my stuff in FreeCAD directly! Pleas note that I have no idea if it is sane to mill like this, I am just an amateur CNC machinist, but it at least it worked for me in the past...
Attached you can find a screenshot to see how it looks at the moment. If anyone is interested, code is available at
https://github.com/dev-at-stellardeath- ... tree/helix.
For polishing, if have some questions:
- I use Gui::InputField widgets to edit the properties in the task panel. To set the initial value, the best I came up with was to use setText(), i.e.:
Now this works fine in an english locale. However, in my native language the str(self.obj.SomeQuantityProperty) returns the values separated by commas, for example "1,15 mm". This might be reasonable, however, it seems that the Gui::InputField widget is not locale aware, as it then silently converts the "1,15 mm" as "115 mm". Is there a way to pass it a Quantity object directly, from Python?
Code: Select all
ui = FreeCADGui.UiLoader() widget = ui.createWidget("Gui::InputField") widget.setText(str(self.obj.SomeQuantityProperty))
- The generated helical paths look quite strange for large z-steps, I think there are some issues in the routine that draws them.
- Is there really no better way to get topology information for Shapes/Faces/Edges than to loop over all pairs of possibly connecting Faces/Edges/Points and test if they are the same? This is insane, there must be a better way! For example, I would have expected that a Face directly provides a method or list that returns all adjacent faces which share some common edge with it. I cannot imagine that this information is not already available somewhere.