collection of Clip filter bugs

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

collection of Clip filter bugs

Post by uwestoehr »

1. Edit: this is no bug since it doesn't matter in what pipeline a function is defined, it can be used by any filter in any pipeline. A fix in this regard was committed: https://github.com/FreeCAD/FreeCAD/commit/ee797360e1a5
take this example file:
Z88-CantileverFaceload.FCStd
(658.47 KiB) Downloaded 62 times
- click on the "Clip001" oject and add there a new plane
result: the plane is added to another pipeline than the filter is in


2. now fixed: https://github.com/FreeCAD/FreeCAD/commit/ee797360e
- continue from the state of bug 1
- use in "Clip001" the sphere as function and press Apply
- move the sphere
- recompute the "Clip001" object to see the change
result:
FreeCAD_iaSFSC2Ux4.png
FreeCAD_iaSFSC2Ux4.png (9.72 KiB) Viewed 2920 times
So the result is something broken

3. now fixed: https://github.com/FreeCAD/FreeCAD/commit/a306ce5686b
open this example file:
Z88-CantileverFaceload-single.FCStd
(175.39 KiB) Downloaded 61 times
- recompute the "Clip001" object
result: crash
Yes, the sphere should not be an input since it a function and as such already used for the "Clip001" object, but FreeCAD must not crash.

Since it is a crash: here is an issue: https://github.com/FreeCAD/FreeCAD/issues/6683
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of Clip filter bugs

Post by uwestoehr »

4. now fixed: https://github.com/FreeCAD/FreeCAD/commit/54ef47276fba
take this example file:
Z88-CantileverFaceload-single.FCStd
(191.25 KiB) Downloaded 66 times
- open the "Clip001" object
- do nothing but cancel the dialog
result: the plane is no longer the used function but the sphere


5.
- take the example file from 4.
- open the "Clip001" object
- in the dialog do nothing but press either Cancel or OK
result: the object is marked to be recomputed despite nothing was changed

6.
take this example file:
Z88-CantileverFaceload-single2.FCStd
(178.5 KiB) Downloaded 63 times
- note that the "Clip001" object has no filter set in its properties
- recompute it
result: despite the object has no function, you see a sphere cut

7.
- continue from the state of bug 6.
- delete the sphere and plane
- recompute the "Clip001" object
result: there is still a sphere cut

8.
- take a simulation file of your choice that contains a result pipeline
- click in the toolbar on a filter icon of your choice
- in the appearing dialog, do nothing but cancel
result: despite you canceled, the filter was created
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: collection of Clip filter bugs

Post by ickby »

Hello,

after our discussion on Github I checked the behavior for the updating of the sphere function in the clip filters. I used the stable version 0.19.3 as well as commit ca9fb5400c319725466f1af2c410fc08e4050511 from March 25., which I think is before your fixes were applied. This is the Tree setup for my test:

1. Create Pipeline, add Clip filter
2. Add Sphere to clip filter
3. Set all visual properties to clip filter

When the tool "Apply changes to pipeline" is disabled:
- Moving the Sphere does not change the filter output
- Hitting Recompute button, or F5, or Dialog Apply/Ok does update the filter output

When the tool "Apply changes to pipeline" is enabled:
- Moving the Sphere does change the filter output on the fly with the changes

This behavior is exactly as intended. The live update is nice to have and often desired. However, sometimes the results become so large that live updates severely slows the manipulation of the clip functions. This is exactly the reason why the user has the choice to switch between the two modes. The access to the two modes is extremely easy and convenient by being a toggle button in the toolbar.

To reply to your argument from github:
For the manipulators a delayed computation is not sensible. I mean when I want to adjust the sphere and later want to make the cut, we have the sphere settings dialog. There I can adjust, then click on "Apply". But for the manipulators, I want to see the change immediately. One needs to use it so set the sphere that I see what I need to see.
Yes you want that often, and you can easily have it by simply activating the live updates. On the other side, I often want to have the convenience of drag and drop manipulation of the functions (which is way easier than the settings dialog) but not suffer from large model lags. So why not being able to do both via a simple choice of a toggle button as it is now? There is no drawback for your prefered behavior with the current method, while your change seems to make mine impossible.

Disabling this and enforcing live updates no matter the user choice seems not a good idea and makes for a very inconsistent experience. So IMHO the changes should be reverted.

I will have a look on some of the other bugs later this week, it unfortunately took me too long today to compile freecad.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of Clip filter bugs

Post by uwestoehr »

ickby wrote: Wed Mar 30, 2022 7:40 pm When the tool "Apply changes to pipeline" is disabled:
Where is this tool set/activated?
Can you please document this in the Wiki?
ickby wrote: Wed Mar 30, 2022 7:40 pm Yes you want that often, and you can easily have it by simply activating the live updates. On the other side, I often want to have the convenience of drag and drop manipulation of the functions (which is way easier than the settings dialog) but not suffer from large model lags.
The idea of a manipulator is to directly manipulate something. When I do this as user and notice it is slow, I can anytime stop and continue to set the sphere in the filter dialog. Nobody forces the user to use the manipulator.
And the strength/beauty of the manipulator is exactly to see immediately what is happening. I don't know what manipulators would be useful for without a live result. Therefore I miss that for the plane function there is no cool manipulator like we have for the "Clipping plane on face" tool - that also provides life results.
By the way, even with my most complex models, the life cutting works smooth.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: collection of Clip filter bugs

Post by ickby »

The tool ist in the Post Processing toolbar, the very first Button, rigth next to "create Pipeline".

Yes, i'm going to document it in the Wiki, thats a good Point.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of Clip filter bugs

Post by uwestoehr »

ickby wrote: Thu Mar 31, 2022 4:44 am The tool ist in the Post Processing toolbar, the very first Button, rigth next to "create Pipeline".
Yes, i'm going to document it in the Wiki, thats a good Point.
Thanks! For example I was not aware of this feature.

I tested some more complex meshes and I think with normal PC calculation power, we can enable the Apply immediately option as default. What do you think?

(Concerning the manipulators I still think they are only useful on live results.))
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: collection of Clip filter bugs

Post by ickby »

uwestoehr wrote: Thu Mar 31, 2022 11:20 am I tested some more complex meshes and I think with normal PC calculation power, we can enable the Apply immediately option as default. What do you think?
Yes, it can definitely be applied as default.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of Clip filter bugs

Post by uwestoehr »

ickby wrote: Mon Apr 04, 2022 5:32 am Yes, it can definitely be applied as default.
OK, I had a look and it appears that to achieve this. we have to add a new preferences setting, right?
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: collection of Clip filter bugs

Post by wmayer »

Therefore I miss that for the plane function there is no cool manipulator
There is a manipulator that also works but it's by a factor of 1000 too small. You can see it if you hide the Clip001 object and then do a view fit.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of Clip filter bugs

Post by uwestoehr »

wmayer wrote: Mon Apr 11, 2022 3:17 pm There is a manipulator that also works but it's by a factor of 1000 too small. You can see it if you hide the Clip001 object and then do a view fit.
Thanks. I noticed it, but it looks for me this way:
FreeCAD_W8WvpAoHul.png
FreeCAD_W8WvpAoHul.png (94.51 KiB) Viewed 2227 times
while I expected this:
FreeCAD_8cGW5zLaDf.png
FreeCAD_8cGW5zLaDf.png (59.43 KiB) Viewed 2227 times
(this ia what I get using the Clipping Plane on Face toolbar icon)

I already tried to increase the plane manipulator without success. It works somehow different than the sphere manipulator and I don#t have the time at the moment to read how it is working and to understand why it is too small.
However, I think the plane manipulators should be uniform. I vote for the Clipping Plane on Face manipulator. What is your opinion?
Post Reply