Profile Expand / Offset

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!
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Profile Expand / Offset

Post by dubstar-04 »

What is the purpose / use case for the expand vs offset properties of the profile operation?

expandOffset.png
expandOffset.png (14.02 KiB) Viewed 2005 times

Wiki Entry:
expandwiki.png
expandwiki.png (53.34 KiB) Viewed 2003 times

Thanks,

Dan
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Profile Expand / Offset

Post by dubstar-04 »

If I try and use the expand profile property I get the following error:

Code: Select all

  File "/home/sandal/Documents/GitHub/FreeCAD/build/Mod/Path/PathScripts/PathOp.py", line 526, in execute
    result = self.opExecute(obj)  # pylint: disable=assignment-from-no-return
  File "/home/sandal/Documents/GitHub/FreeCAD/build/Mod/Path/PathScripts/PathAreaOp.py", line 394, in opExecute
    aOS = self.areaOpShapes(obj) # pylint: disable=assignment-from-no-return
  File "/home/sandal/Documents/GitHub/FreeCAD/build/Mod/Path/PathScripts/PathProfile.py", line 530, in areaOpShapes
    shapes.extend(self._processEachModel(obj))
  File "/home/sandal/Documents/GitHub/FreeCAD/build/Mod/Path/PathScripts/PathProfile.py", line 699, in _processEachModel
    shapeEnv = self._getExpandedProfileEnvelope(obj, eSlice, False, obj.StartDepth.Value, obj.FinalDepth.Value)
  File "/home/sandal/Documents/GitHub/FreeCAD/build/Mod/Path/PathScripts/PathProfile.py", line 655, in _getExpandedProfileEnvelope
    offsetVal = calculateOffsetValue(obj, isHole)
  File "/home/sandal/Documents/GitHub/FreeCAD/build/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}


Steps to reproduce:

- Deselect all geometry
- Select profile operation
- Press apply
- Press ok
- Select the profile operation the the job tree
- Change the value of the expand profile property in the data tab

Can anyone replicate?

Thanks,

Dan

OS: Debian GNU/Linux 10 (buster) (GNOME/gnome-xorg)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23700 +7 (Git)
Build type: Unknown
Branch: pr/4278
Hash: c434ee34a724c1dec1b79fa0c499a3c0ec15aeb3
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Profile Expand / Offset

Post by dubstar-04 »

Test file attached
Attachments
ProfileTest.FCStd
(16.17 KiB) Downloaded 47 times
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Profile Expand / Offset

Post by Russ4262 »

User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Profile Expand / Offset

Post by dubstar-04 »

Hi Russ,

Thanks for the reply. What was the reason for closing the PR?

Thanks,

Dan
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Profile Expand / Offset

Post by Russ4262 »

I re-opened the PR because I think it should be fixed regardless of the fate of this feature. I intend to use it and I think others will get some use out of it. Also, if the feature will be live in 0.19, it ought to be working without this error.

Russell
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Profile Expand / Offset

Post by dubstar-04 »

Russ4262 wrote: Thu Jan 28, 2021 6:16 pm I re-opened the PR because I think it should be fixed regardless of the fate of this feature. I intend to use it and I think others will get some use out of it. Also, if the feature will be live in 0.19, it ought to be working without this error.

Russell

Thats great news Russ!

Thank you,

Dan
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Profile Expand / Offset

Post by Russ4262 »

dubstar-04 wrote: Fri Jan 29, 2021 8:32 am ... Thats great news Russ! ...
Not any more. Pie in my face and the feature being removed prior to 0.19 release. That clarification I was lacking was delivered.

PR #4333, [Path] Remove `Expand Profile` feature from Profile op

Neither "cheers" nor "cheerio" seem appropriate after such a press release.

Hope your weekend is sunny and warm. Thanks for the support, sir. Keep those successive Profile ops in a macro.

Russell
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Profile Expand / Offset

Post by dubstar-04 »

Russ4262 wrote: Sat Jan 30, 2021 2:29 am
dubstar-04 wrote: Fri Jan 29, 2021 8:32 am ... Thats great news Russ! ...
Not any more. Pie in my face and the feature being removed prior to 0.19 release. That clarification I was lacking was delivered.

PR #4333, [Path] Remove `Expand Profile` feature from Profile op

Neither "cheers" nor "cheerio" seem appropriate after such a press release.

Hope your weekend is sunny and warm. Thanks for the support, sir. Keep those successive Profile ops in a macro.

Russell
Has there been discussion regarding this feature?

Thanks,

Dan
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Profile Expand / Offset

Post by mlampert »

There has been, and it wasn't fair (to Russell) at all not to have that discussion in public. I am the one who deserves the cake in the face (and much more). While Russ' feature is extremely useful, I don't think it belongs into Profile, which is the contentious point here. And while I did discuss this with Russell I neglected to clarify that it needs to be cleaned up for 0.19

I realise that this comes as a big disappointment to all, especially Russell - so I would like to elaborate on the reasoning. A "Profile" is an op which follows a line, be that an explicit line in the form of some connected edges or the envelope wire of a face/solid. And that is all a Profile op should ever do. The "Expand" feature however makes the Profile op behave like a Pocket op and one might wonder - why do I need two ops when both of them do the same thing anyway. The moment we're talking about clearing an "area", it's not a "Profile" anymore (IMHO).

Now FC (hopefully) is close to a release which has a considerable impact on the importance, or the weight of above reasoning. If we were to ship this feature in 0.19 as part of the Profile op it becomes very hard to remove that feature in a subsequent release. Users who would use it in 0.19 would rightfully complain about it not being there in 0.20.

Let me make this very clear, the functionality of what Russell implemented is awesome, and nobody questions the need for that functionality - the only question is where and when.

Final note: if all of this makes you angry - don't hold back, it'll have an impact on what happens in 0.20, and when.
Post Reply