Feature request: Multiple horizontal passes on Profile/Contour?

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by RatonLaveur »

It makes a lot more sense treating this as a pocket. This is not a conventional profiling method. Not to my knowledge.

If you really want to have a nice finish with little rubbing for the final profile, you either treat as a pocket or profile once with an offset and then with finishing.

The method suggested intially in this thread does not reduce tool engagement (still need to engage 100% for the same amount of path) and does not reduce time. Also it does not improve finish of a part.

For all these reasons i feel like this should not be an implemented feature.

That being said FreeCAD is free and if a coder feels the need to create such a feature they might as well. But it should be kept secluded somehow (experimental features perhaps).
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by GeneFC »

VVilhelnn wrote: Thu May 21, 2020 9:59 pm Had a few toughs and wanted to get some perspective from other...

Would it make more sense to treat this as a pocket?
-Wilhelm
The current implementatation of Pocket has some issues that might compromise its use for this purpose. Neither the climb/conventional nor the inside/outside parameter settings are honored. Therefore it is likely that each z-layer will be a reverse direction from the previous layer.

There is a property in the Property panel for the Pocket operation called "Min Travel", which is supposed to allow the algorithm to move in the most efficient direction or obey the user setting for inside/outside and climb/conventional. I have set it to "false", since I always want the cut to be in climb mode and usually inside to outside.

Unfortunately that parameter has never worked. It makes no difference whether it is "true" or "false". The old Heeks lib was quite limited, but it did honor those settings. The newer area lib never has.

This was brought up a long time ago, but there has been no resolution. I can usually work around issue, but it would make for a somewhat weird "fat-profile" being discussed here.

[Edit] I should add that the first layer works correctly. It is the subsequent z-layers that revert to a default behavior.

Gene
VVilhelnn
Posts: 10
Joined: Thu Feb 09, 2017 1:58 am

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by VVilhelnn »

RatonLaveur wrote: Fri May 22, 2020 4:43 pm It makes a lot more sense treating this as a pocket. This is not a conventional profiling method. Not to my knowledge.
This does seem more like a pocket operation, it could be a good compromise to let pocket do what pockets do with a virtual wall offset from the part (to give pocket operation the area of operation) after pocket operation, it would not be too bad to do a final pass with a deeper step down per pass... for example pocket with step down of 0.2mm then final pass with say 1mm step down.
RatonLaveur wrote: Fri May 22, 2020 4:43 pm The method suggested intially in this thread does not reduce tool engagement (still need to engage 100% for the same amount of path) and does not reduce time. Also it does not improve finish of a part.

For all these reasons i feel like this should not be an implemented feature.

That being said FreeCAD is free and if a coder feels the need to create such a feature they might as well. But it should be kept secluded somehow (experimental features perhaps).
I belive there are multiple interpretations of what was asked, but I belive if you really look at the subject "Multiple horizontal passes on Profile" and my own experience with aluminum getting stuck into endmills because of heat-friction generated from chips not completely evacuated (CNC-router, not CNC-Mill with coolant and smaller work area meaning easier to deal with chips management).

The real ask that will solve a lot of our issues with "not having the bets machines with all the cool features as good chip evacuation" and described by @chrisb (depth first vs width first) approach... The width first approach will solve lot of the problems. Even if engagement is at 100% is only per step down a 0.2-0.5mm this is not so much of an issue... as long as there is room for the chips to go and they don't continue creating friction and heat.

Think deep slot with poorly evacuated chips... creating a wider slot per step down will help to reduce friction and heat. is not the per step down engagement. Is the the added chips to the engagement. Is like every pass you have a history that adds to the friction and heat. if every pass was as first on top of material then everything will be fine!! thus the need for this feature to help every pass even if going deeper look more like the first pass.

SO..... I agree that this maybe not a profile feature and more a pocket operation. But we do need a solution the question is where does it belong? If you don't think this should be added as a feature (anywhere) what are your suggestion to help the above issue, what operations can you do to help alleviate the issues (SOFTWARE FIX, not add more hardware to the problem) I am interested if this is not a valid feature then what is the valid g-coding solution??
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by RatonLaveur »

One could say i was too ....*narrow* minded...
VVilhelnn
Posts: 10
Joined: Thu Feb 09, 2017 1:58 am

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by VVilhelnn »

RatonLaveur wrote: Tue May 26, 2020 8:04 pm One could say i was too ....*narrow* minded...
pun intended, good one :lol:

What about a dress-up, will a dress-up feature to add width work? even if it doesn't do the finish perfectly we can always do a final-profile operation for finish purposes with deeper step down. Or do folks think pocket still the best approach + profile for finish purposes since pocket might ignore inside/outside priority.
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by Russ4262 »

Morning FC users,
I just submitted Path: Profile - New `ExpandProfile` feature for compound profile operations #3545. It clears each layer laterally first, before stepping down to clear the next layer.

From the PR description on GitHub:
"This version is the inverse method to the previously proposed method by @Schildkroet [Wsk8] in PR #3484 . This method clears each layer laterally, before stepping down to the next layer depth for clearing. This method does treat the clearing area as a pocket and uses Path.Area() to manage clearing using the offset cut pattern only. However, due to bugs in Path.Area(), clearing paths generated are not always as clean as they should be. As such, I suggest a more manual approach to generating the clearing paths as used in 3D Surface and Waterline. Doing so would allow more control and likely provide a more stable, consistent, and desirable result."

Russ
VVilhelnn
Posts: 10
Joined: Thu Feb 09, 2017 1:58 am

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by VVilhelnn »

Russ4262 wrote: Mon Jun 01, 2020 4:53 pm Morning FC users,
I just submitted Path: Profile - New `ExpandProfile` feature for compound profile operations #3545. It clears each layer laterally first, before stepping down to clear the next layer.

From the PR description on GitHub:
"This version is the inverse method to the previously proposed method by @Schildkroet [Wsk8] in PR #3484 . This method clears each layer laterally, before stepping down to the next layer depth for clearing. This method does treat the clearing area as a pocket and uses Path.Area() to manage clearing using the offset cut pattern only. However, due to bugs in Path.Area(), clearing paths generated are not always as clean as they should be. As such, I suggest a more manual approach to generating the clearing paths as used in 3D Surface and Waterline. Doing so would allow more control and likely provide a more stable, consistent, and desirable result."

Russ
@Russ4262 and @Schildkroet, and everyone else for that matter thank you sooo sooo much for this addition. Your contributions for everyone in the world to benefit is greatly appreciated this are the reasons why OSS is so powerful and empowering to everyone. Again Thanks for the contribution.

I will try to download and start playing with it :)

-Wilhelm
vinnie2018
Posts: 6
Joined: Fri Apr 24, 2020 2:11 pm

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by vinnie2018 »

OS: Linux Mint 19.3 (MATE/mate)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 31b1ad874fb4750b6f6f25b494246f6ac7e61cde
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)


I am getting the following error when I try to use this feature to profile a cube:

<Exception> Quantity::operator +(): Unit mismatch in plus operation
PathProfile.ERROR: Unable to create path for face(s).
{'sclassname': 'N4Base18UnitsMismatchErrorE', 'sErrMsg': 'Quantity::operator +(): Unit mismatch in plus operation', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'Quantity::operator +(): Unit mismatch in plus operation', 'btranslatable': False, 'breported': True}


steps to reproduce error:
1. create a cube
2. create a job
3. create a profile with default settings which creates the path seen in the screen shot.
4. In the Profile Operation's property set "Expand Profile Step Over" to 50 and "Expand Profile" to 1 mm produces the error above.
Attachments
box_job_pic_1.jpeg
box_job_pic_1.jpeg (55.23 KiB) Viewed 1266 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by GeneFC »

Worked fine for me.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21777 (Git)
Build type: Release
Branch: master
Hash: 478823b90967a9b76796c64f74b8e3a5440150fa
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

Python and QT versions are different from yours.

Gene
vinnie2018
Posts: 6
Joined: Fri Apr 24, 2020 2:11 pm

Re: Feature request: Multiple horizontal passes on Profile/Contour?

Post by vinnie2018 »

Thanks for the reply Gene. Do you mind giving the attached file a try ? Below is a more complete trace of the error :

Code: Select all

<Exception> Quantity::operator +(): Unit mismatch in plus operation
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathUtils.py", line 62, in new_function
    res = function(*args, **kwargs)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 515, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathAreaOp.py", line 401, in opExecute
    aOS = self.areaOpShapes(obj) # pylint: disable=assignment-from-no-return
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathProfile.py", line 493, in areaOpShapes
    shapeEnv = self._getExpandedProfileEnvelope(obj, shape, False, obj.StartDepth.Value, finalDep)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathProfile.py", line 655, in _getExpandedProfileEnvelope
    offsetVal = calculateOffsetValue(obj, isHole)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathProfile.py", line 641, in calculateOffsetValue
    offset = obj.OffsetExtra.Value + self.tool.Diameter
<class 'ArithmeticError'>: {'sclassname': 'N4Base18UnitsMismatchErrorE', 'sErrMsg': 'Quantity::operator +(): Unit mismatch in plus operation', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'Quantity::operator +(): Unit mismatch in plus operation', 'btranslatable': False, 'breported': True}
159.623 <App> Document.cpp(3760): Failed to recompute profile_issue#Profile: {'sclassname': 'N4Base18UnitsMismatchErrorE', 'sErrMsg': 'Quantity::operator +(): Unit mismatch in plus operation', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'Quantity::operator +(): Unit mismatch in plus operation', 'btranslatable': False, 'breported': True}
Recompute failed! Please check report view.
<Exception> Quantity::operator +(): Unit mismatch in plus operation
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathUtils.py", line 62, in new_function
    res = function(*args, **kwargs)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 515, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathAreaOp.py", line 401, in opExecute
    aOS = self.areaOpShapes(obj) # pylint: disable=assignment-from-no-return
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathProfile.py", line 493, in areaOpShapes
    shapeEnv = self._getExpandedProfileEnvelope(obj, shape, False, obj.StartDepth.Value, finalDep)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathProfile.py", line 655, in _getExpandedProfileEnvelope
    offsetVal = calculateOffsetValue(obj, isHole)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathProfile.py", line 641, in calculateOffsetValue
    offset = obj.OffsetExtra.Value + self.tool.Diameter
<class 'ArithmeticError'>: {'sclassname': 'N4Base18UnitsMismatchErrorE', 'sErrMsg': 'Quantity::operator +(): Unit mismatch in plus operation', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'Quantity::operator +(): Unit mismatch in plus operation', 'btranslatable': False, 'breported': True}
193.049 <App> Document.cpp(3760): Failed to recompute profile_issue#Profile: {'sclassname': 'N4Base18UnitsMismatchErrorE', 'sErrMsg': 'Quantity::operator +(): Unit mismatch in plus operation', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'Quantity::operator +(): Unit mismatch in plus operation', 'btranslatable': False, 'breported': True}
Recompute failed! Please check report view.
Attachments
profile_issue.FCStd
(284.12 KiB) Downloaded 28 times
Post Reply