Use Case
In my day to day work, my workflow consists of cutting out a variety of parts from a piece of flat stock on my CNC router.
The jobs for these parts all live within the same FreeCAD file. I get a parts list and need to pack as many of these parts as I can into a given piece of stock.
Current Workflow
I export all of my parts as gcode files into a directory. I then create a new FreeCAD project and import those gcode files using gcode_pre. I then clone and arrange these paths using the placement capabilities in #8459. I then export the composite gcode file and run it.
If I need to make any change to the base jobs, I have to go back to square one and re-export / import / position / clone those elements.
Proposed Workflow
I create a new Path Job from a cube the size of my stock in the same project as my parts and their jobs. I then create links to the jobs for those parts and drag the links into the operations group inside my new Job.
Any time my base parts/jobs are modified, the new composite job is recomputed with the updated path information. This could save me hours per day.
Feature: Support embedding links to jobs within other jobs
Re: Feature: Support embedding links to jobs within other jobs
I've also created a github issue for this as well: https://github.com/FreeCAD/FreeCAD/issues/8871
I apologize if that is jumping the gun a bit, I'm more familiar with github workflows than I am forums.
I apologize if that is jumping the gun a bit, I'm more familiar with github workflows than I am forums.
Re: Feature: Support embedding links to jobs within other jobs
Evening.
Have piddled around with an idea tangent to the one you presented here. I played with a simpler idea to link an operation from one Job object to another, and allow for simple translation along the way. Just a possible solution to assist those interested. Perhaps adding the ability to rotate the linked path around the Z-axis would assist additional users.
Here is a Linked Operation macro.
Decompress the attached file in your Macro folder.
Run FreeCAD, open your file, and select the operation in the source Job that you wish to link to another Job.
Run the 'linkedoperation.FCMacro' and it will create a Linked Operation on the base operation you selected, and ask for the target Job.
The operation has the following options:
- Track Dressups: Set true to include dressups added or subtracted to the base operation in the source Job. For example: If the base op is a Profile op, and this is FALSE, you can add a dressup in the original Job, and the Linked Operation will still reflect the original Profile op serving as a base for the dressup. However, if this is TRUE, then when the dressup is added to the Profile op in the original Job, then that dressup path will be linked, rather than the Profile op that was selected as a base for the Linked Operation at creation.
- Extra Translation: X, Y, Z values to add in addition to other pre-defined offset values available.
- Offset X*: Value used when Translation X set to Offset or Absolute X. *Otherwise, serves as a numerical feedback for the value calculated for other pre-defined values.
- Offset Y*: Value used when Translation Y set to Offset or Absolute Y. *Otherwise, serves as a numerical feedback for the value calculated for other pre-defined values.
- Offset Z*: Value used when Translation Z set to Offset or Absolute Z. *Otherwise, serves as a numerical feedback for the value calculated for other pre-defined values.
- Translate X*: Desired method to offset the X value of the linked path. Options: None, Offset, Absolute X, Stock Min X, Model Min X, and Stock Difference X.
- Translate Y*: Desired method to offset the Y value of the linked path. Options: None, Offset, Absolute Y, Stock Min Y, Model Min Y, and Stock Difference Y.
- Translate Z*: Desired method to offset the Z value of the linked path. Options: None, Offset, Absolute Z, Model Bottom, Stock Bottom, Model Difference Z, and Stock Difference Z.
Notes:
- *When Offset or Absolute_ translate modes are used, the Offset_ properties are used for value inputs.
- The Tool Controller is the same used by the base operation in the original Job object, with no ability to change.
- Coolant Mode can be changed for the Linked Operation.
- Note that depth of cut [DOC] (start height - final depth) is not changed when linking an operation. Therefore, ensure that DOC is sufficient in the source Job.
- Be aware that all depths and heights are determined by the original operation and Job. No changes to the linked path are available in this Linked Operation, other than lateral and vertical translation. Put another way, the Clearance and Safe offsets are determined in the source operation and Job. I say "offsets" because they become relative values when the path is linked with this macro. A different approach is needed to allow for adjustments to Clearance and Safe heights requested in the target Job.
Be it known:
This macro has very little testing. Use at your own risk as it carries no warranties or guarantees. Verify accuracy and safety of all paths created with this operation. I have NOT verified post processing accuracy of target Job objects containing Linked Operation objects. I am sharing what I am using and playing with, and this is more a basic proof of concept, which likely needs more work.
Have a great night,
Russell
Have piddled around with an idea tangent to the one you presented here. I played with a simpler idea to link an operation from one Job object to another, and allow for simple translation along the way. Just a possible solution to assist those interested. Perhaps adding the ability to rotate the linked path around the Z-axis would assist additional users.
Here is a Linked Operation macro.
Decompress the attached file in your Macro folder.
Run FreeCAD, open your file, and select the operation in the source Job that you wish to link to another Job.
Run the 'linkedoperation.FCMacro' and it will create a Linked Operation on the base operation you selected, and ask for the target Job.
The operation has the following options:
- Track Dressups: Set true to include dressups added or subtracted to the base operation in the source Job. For example: If the base op is a Profile op, and this is FALSE, you can add a dressup in the original Job, and the Linked Operation will still reflect the original Profile op serving as a base for the dressup. However, if this is TRUE, then when the dressup is added to the Profile op in the original Job, then that dressup path will be linked, rather than the Profile op that was selected as a base for the Linked Operation at creation.
- Extra Translation: X, Y, Z values to add in addition to other pre-defined offset values available.
- Offset X*: Value used when Translation X set to Offset or Absolute X. *Otherwise, serves as a numerical feedback for the value calculated for other pre-defined values.
- Offset Y*: Value used when Translation Y set to Offset or Absolute Y. *Otherwise, serves as a numerical feedback for the value calculated for other pre-defined values.
- Offset Z*: Value used when Translation Z set to Offset or Absolute Z. *Otherwise, serves as a numerical feedback for the value calculated for other pre-defined values.
- Translate X*: Desired method to offset the X value of the linked path. Options: None, Offset, Absolute X, Stock Min X, Model Min X, and Stock Difference X.
- Translate Y*: Desired method to offset the Y value of the linked path. Options: None, Offset, Absolute Y, Stock Min Y, Model Min Y, and Stock Difference Y.
- Translate Z*: Desired method to offset the Z value of the linked path. Options: None, Offset, Absolute Z, Model Bottom, Stock Bottom, Model Difference Z, and Stock Difference Z.
Notes:
- *When Offset or Absolute_ translate modes are used, the Offset_ properties are used for value inputs.
- The Tool Controller is the same used by the base operation in the original Job object, with no ability to change.
- Coolant Mode can be changed for the Linked Operation.
- Note that depth of cut [DOC] (start height - final depth) is not changed when linking an operation. Therefore, ensure that DOC is sufficient in the source Job.
- Be aware that all depths and heights are determined by the original operation and Job. No changes to the linked path are available in this Linked Operation, other than lateral and vertical translation. Put another way, the Clearance and Safe offsets are determined in the source operation and Job. I say "offsets" because they become relative values when the path is linked with this macro. A different approach is needed to allow for adjustments to Clearance and Safe heights requested in the target Job.
Be it known:
This macro has very little testing. Use at your own risk as it carries no warranties or guarantees. Verify accuracy and safety of all paths created with this operation. I have NOT verified post processing accuracy of target Job objects containing Linked Operation objects. I am sharing what I am using and playing with, and this is more a basic proof of concept, which likely needs more work.
Have a great night,
Russell
Code: Select all
OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.33742 +4 (Git)
Build type: Release
Branch: fix/engrave_combined
Hash: 9b334f5e28f821b5875760a8a8884c690a5f273b
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods:
* FC_SU
* freecad.gears 1.0.0
* PathExp.7z
* Z_MacroStartup
- Attachments
-
- linkedoperation.zip
- Version 1.0 of Linked Operation macro files
- (21.72 KiB) Downloaded 5 times
-
- Test-Linked_Operation-1.FCStd
- Sample file containing example of Linked Operation introduced here.
- (62.5 KiB) Downloaded 4 times
-
- Screenshot of source Job and operations top right, and target Job001 below with two Linked Operation objects with arrays added.
- Snip macro screenshot-b523f8.png (119.66 KiB) Viewed 95 times