New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path: PathArray based on multiple bases, and choice of direction #4812
Conversation
…eeCAD into patharray_multibase
…X axis before Y axis
These changes are intended to help reduce tool travel time. Discussion of the first one was at https://forum.freecadweb.org/viewtopic.php?f=15&t=58768&p=505517#p505517. The first change allows PathArrays to be based on multiple Paths instead of just one. It makes a copy of all of the bases in each arrayed position before moving on to the next position. The second change allows swapping the direction in which copies are arrayed (X first instead of Y first). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built and tested. Works as advertised. Code changes look good.
…tance. Helps create an imperfect "hand-crafted" appearance. Adds properties: - JitterPercent: % of copies that will be randomly offset - JitterMagnitude: Maximum distance to offset copies
…eeCAD into patharray_multibase
else: | ||
base = [obj.Base] | ||
|
||
if len(base)>0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The consequenc if len(base) == 0 isn't visible until the end. Looking ahead, nothing happens. So, instead you should check for that case first and and return if it's true, raising an error of necessary. Currently all the subsequent code is indented and dependent on that check which is confusing.
return | ||
if b.ToolController != obj.ToolController: | ||
# this may be important if Job output is split by tool controller | ||
PathLog.warning('Arrays of paths having different tool controllers are handled according to the tool controller of the first path.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required for acceptance of this PR but if you're up for it, you could also check if the base feature is a dressup and allow for arrays of those as well. Currently there's no way to make an array of dressed up operations.
… in the PathArray Base property.
…eeCAD into patharray_multibase
Merging. |
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the FreeCAD forum!
App
,Base
,Gui
or one of theMod
subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next onesgit pull --rebase upstream master
./bin/FreeCAD --run-test 0
Fixes typo in Draft Move command text
Draft: Fixed typos
issue #<id>
orfixes #<id>
where<id>
is the FreeCAD bug tracker issue number in case a particular commit solves or is related to an existing issue on the tracker. Ex:Draft: fix typos - fixes #0004805
And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.20 Changelog Forum Thread.