Stepover on Profile Op?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 107
- Joined: Tue Feb 21, 2023 9:30 pm
Re: Stepover on Profile Op?
Hi,
Is it possible or easier then to automatically add if needed a thin base (invisible?) in stock size under the part (or under final depth inside the part)? That way it will be very easy to use other operations too, to accomplice the same thing without messing with my design.
Again, that's just me with very little experience with CAD/CAM software thinking out loud dump ideas.
Is it possible or easier then to automatically add if needed a thin base (invisible?) in stock size under the part (or under final depth inside the part)? That way it will be very easy to use other operations too, to accomplice the same thing without messing with my design.
Again, that's just me with very little experience with CAD/CAM software thinking out loud dump ideas.
Re: Stepover on Profile Op?
Morning.
Here is a Multi-profile dressup macro.
Decompress the attached file in your Macro folder.
Run FreeCAD, open your file, and select the Profile op you wish to modify.
Run the 'multiprofile.FCMacro' and it will create a dressup on the Profile op.
The dressup has the following options:
- Multi Profile Width: width to extend profile cut
- Step Over: stepover percentage of base Profile op tool diameter
- Cut Outside In: set order of cuts to start at outermost profile and work inward
- Keep Tool Down: keep tool down when moving to adjacent profile cuts at depth
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 dressup utility.
Be it known:
This dressup does make some changes to the base Profile op, recalculates, and restores the orignal state; therefore, if the dressup fails, the base Profile op would potentially be left in an altered state. I recommend you make a copy of the target Profile op and use the copy as the base to ensure your original Profile op is not lost. No, this is not the best way to do a multi-profile, but I am sharing what I am using.
Cheers,
Russell
Here is a Multi-profile dressup macro.
Decompress the attached file in your Macro folder.
Run FreeCAD, open your file, and select the Profile op you wish to modify.
Run the 'multiprofile.FCMacro' and it will create a dressup on the Profile op.
The dressup has the following options:
- Multi Profile Width: width to extend profile cut
- Step Over: stepover percentage of base Profile op tool diameter
- Cut Outside In: set order of cuts to start at outermost profile and work inward
- Keep Tool Down: keep tool down when moving to adjacent profile cuts at depth
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 dressup utility.
Be it known:
This dressup does make some changes to the base Profile op, recalculates, and restores the orignal state; therefore, if the dressup fails, the base Profile op would potentially be left in an altered state. I recommend you make a copy of the target Profile op and use the copy as the base to ensure your original Profile op is not lost. No, this is not the best way to do a multi-profile, but I am sharing what I am using.
Cheers,
Russell
Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.0.32929 (Git)
Build type: Release
Branch: master
Hash: 1dcc58c4b1c51c50215639ca58326f6b69867743
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods:
* FC_SU
* freecad.gears 1.0.0
* PathExp
* Z_MacroStartup
- Attachments
-
- Sample of attached macro/dressup usage.
- Snip macro screenshot-a32519.png (117.94 KiB) Viewed 1897 times
-
- MultiProfileMacro.7z
- Multi-profile Dressup macro source files.
- (6.77 KiB) Downloaded 47 times
Last edited by Russ4262 on Sun Apr 23, 2023 12:57 pm, edited 1 time in total.
Re: Stepover on Profile Op?
I think this is worth a pull request. It's not unnatural to have a larger stock because that's what is readily available, or the stock is rectangular, while the object is not.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 107
- Joined: Tue Feb 21, 2023 9:30 pm
Re: Stepover on Profile Op?
Awesome!!!
I've already tested in a couple of my parts and it's working like a charm!
Although I've discovered an issue on some tight spots with the profile op on edges and the offset settings. If I increase or decrease the offset value a bit, then it stops complaining. There is a range that is relative to the tool DIA. That's not a macro issue but, it shows up there too. You can see the range that the profile is collapsing on the first photo. That's one profile op within that range. The range is wider with a bigger diameter tool.
Code: Select all
OS: Fedora Linux 37 (Workstation Edition) (GNOME/gnome-xorg)
Word size of FreeCAD: 64-bit
Version: 0.21.0.32867 (Git)
Build type: Release
Branch: master
Hash: 89ebbfebcd2574aa59c72795add4c9aa793a4212
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
- Attachments
-
- Profile.FCStd
- (51.3 KiB) Downloaded 31 times
-
- Screenshot from 2023-04-23 12-01-25.png (16.76 KiB) Viewed 1857 times
-
- Screenshot from 2023-04-23 11-50-48.png (18.19 KiB) Viewed 1857 times
Re: Stepover on Profile Op?
Morning.
Thanks for the support. Please don't be offended that I differ in opinion. The method used is not one I consider ideal. This shared macro is intended to help users get more out of FC where it is not yet capable via master.
Morning.Dimitrios2 wrote: ↑Sun Apr 23, 2023 9:05 am ... Although I've discovered an issue on some tight spots with the profile op on edges and the offset settings. ... There is a range that is relative to the tool DIA. That's not a macro issue but, it shows up there too....
Glad it is helpful. I am aware that the open-edge side of the Profile op is a bit finicky. Also, I did not test or specifically plan for usage with open edges from the onset, so any successful use in such cases is a plus.
Thanks for sharing your success and open-edge experience!
Peace and blessings.
Have a great day.
Russell
-
- Posts: 107
- Joined: Tue Feb 21, 2023 9:30 pm
Re: Stepover on Profile Op?
Hi,
By rounding the wL (wireLenglth) and the midW (middle width?) to 12 decimals in Profile.py file, finally I'm not getting any errors. The path looks really close to what it should be. Do we really need more decimals in there? I should make a couple test parts.
The following photo is a tight path test, not an actual part.
By rounding the wL (wireLenglth) and the midW (middle width?) to 12 decimals in Profile.py file, finally I'm not getting any errors. The path looks really close to what it should be. Do we really need more decimals in there? I should make a couple test parts.
The following photo is a tight path test, not an actual part.
Code: Select all
def _findWireMidpoint(self, wire):
midPnt = None
dist = 0.0
wL = round(wire.Length, 12)
midW = wL / 2
midW = round(midW, 12)
for e in range(0, len(wire.Edges)):
E = wire.Edges[e]
elen = E.Length
d_ = dist + elen
if dist < midW and midW <= d_:
dtm = midW - dist
midPnt = (E.valueAt(E.getParameterByLength(dtm)))
break
else:
dist += elen
return midPnt
- Attachments
-
- Screenshot from 2023-04-24 01-26-45.png (61.15 KiB) Viewed 1755 times
Re: Stepover on Profile Op?
Evening,Dimitrios2 wrote: ↑Sun Apr 23, 2023 10:28 pm Hi,
By rounding the wL (wireLenglth) and the midW (middle width?) to 12 decimals in Profile.py file, finally I'm not getting any errors. The path looks really close to what it should be. Do we really need more decimals in there? I should make a couple test parts.
...
Nice improvement. No, I don't see a need for full decimal-place engagement in this function. Based on your presentation, I would think six to ten decimal places should serve the purpose well since the function only seeks to find the midpoint of a wire. Additionally, this function is limited to use in the Profile.py module, not the entire Path workbench. This limited scope of this function suggests your change will have fewer unwanted repercussions, if any.
May I suggest raising an issue in GitHub be considered. I will modify my Profile.py file accordingly to test.
Many thanks, and have a great day.
Russell
Edited 4/25/23: Corrected suggestion.
Last edited by Russ4262 on Tue Apr 25, 2023 11:33 pm, edited 3 times in total.
-
- Posts: 107
- Joined: Tue Feb 21, 2023 9:30 pm
Re: Stepover on Profile Op?
Professionalism at its finest.
- sliptonic
- Veteran
- Posts: 3459
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Stepover on Profile Op?
Please follow contributing policy and create an issue first.
Re: Stepover on Profile Op?
My apology for the miscommunication. Duly noted and redacted.
Thanks,
Russell
Thanks,
Russell