[merged] PR #4118 The section cut feature

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [merged] PR #4118 The section cut feature

Post by uwestoehr »

user1234 wrote: Sun Feb 06, 2022 11:56 am - more then one Part/Body/Object or Assembly:
Often some Objects are not correct cut. Independent if it is a linked object or not. The question is if this i OCCT related.
Many thanks for testing! This feedback is what I need.
If possible, send me your test file. When it contains confidential things, please send me a private message.

Since the feature makes real cuts of parts, the OCC kernel fails when objects overlap each other in the assembly. This is nice to make collision checks, but often also unwanted. Therefore I am working on an option that will allow you to cut also overlapping parts in assemblies.

Your first screenshot however seems as if I made a mistake in the size determination of the block that actually cuts the assembly. I need to check this.

Since I am currently abroad and cannot have a look, can you please try to:
- select the shells (the parts inside the holes of your assembly) and make them invisible
- press the Refresh view button and recreating the cut this way
Does it fix the issue?
user1234 wrote: Sun Feb 06, 2022 11:56 am - It makes an own panel, i think the correct place would be in the ComboView --> Tasks, also with a Cancel, OK button and an update view Checkbox, like you made it the PartDesign tasks (which i really like).
The design is to have an own panel that can stay open. This is important for assemblies because one need to add or remove parts to/from the cut. This can be done by either making parts in/visible but also by adding some to the assembly. Therefore it is no task dialog. A further benefit of it is that you can keep it open for a while, switch to other documents or load/unload documents
user1234 wrote: Sun Feb 06, 2022 11:56 am - The field of the values are too small. The Close button should be under all elements.2.png
That looks really weird at your side. Here on Windows it looks correct. What is your Qt version?
I will check the dialog what went wrong here.
user1234 wrote: Sun Feb 06, 2022 11:56 am - At the moment, the behavior is that all (top) objects in the document are cut. I think i nice feature will be, that when objects are marked, that only the marked objects will be cut.
Currently all visible objects are cut. Introducing a new button to all tree objects would be very intrusive in terms of the core code of FreeCAD. I think using the visibility is a simple way to select what should be cut.
user1234 wrote: Sun Feb 06, 2022 11:56 am - The behavior at the moment is, that a cut object with its (linked) sub objects raises in the tree. I would be nice, that this is a own object, with no sub elements, only with source links to the related objects (like a View ind TechDraw). And when you doubleclick it, then you can edit this cut object. This sounds maybe odd, but i think this keeps the tree view more cleaner.
I thought about this a wile (the initial PR was 16 months ago ;) ) My personal wish was that when I change a part in the assembly I can recompute the cut object and get it updated.
The other thing I wanted is to modify existing cut objects. To do this you need to close the cut dialog. This means you don't plan to cut. On reopening the dialog, the tree is checked for an existing cut objects. if there is any, its values are read and the sliders and cut values are setup accordingly. When this doesn't work, please tell me because this is then a bug.

user1234 wrote: Sun Feb 06, 2022 11:56 am - It would be very nice, when a own cut geometry (e.g. Sketch) can be supported.
I don't know how this could be achieved. Basically the cutting feature as it is uses a block. The objects to be cut are put into a compound and the block cuts the compound using Part's cut feature. You can try it, when you add a sketch to the compound, the block won't cut it. For me this is OK since the cutting feature is designed to cut 3D objects.

user1234 wrote: Sun Feb 06, 2022 11:56 am - It would be very nice, when you can also make only graphical cuts. Reason: if the cut due OCCT does not work. Also not all cuts must be boolean persist cuts, for example for assemblies working for assembly operators on very large objects.
How could this be done?
The only way of graphical cuts I know is the existing Clip View tool. Since most solid objects in OCC consists only of outer shells/faces, the Clipping tool delivers hollow objects, see my initial post in this thread. This was the starting point for me because these cuts were useless for me.

many thanks and regards
Uwe
user1234
Veteran
Posts: 3319
Joined: Mon Jul 11, 2016 5:08 pm

Re: [merged] PR #4118 The section cut feature

Post by user1234 »

uwestoehr wrote: Sun Feb 06, 2022 10:44 pm The design is to have an own panel that can stay open. This is important for assemblies because one need to add or remove parts to/from the cut. This can be done by either making parts in/visible but also by adding some to the assembly. Therefore it is no task dialog. A further benefit of it is that you can keep it open for a while, switch to other documents or load/unload documents
As i really hate Creo DM, they have a really good peristant cut feature. The behavior is that you activate the cut via doubleclick. It stays independend what task you do. With a second doubleclick on the cut object you deactivate the cut.

uwestoehr wrote: Sun Feb 06, 2022 10:44 pm If possible, send me your test file.
Was attached on the post before.

uwestoehr wrote: Sun Feb 06, 2022 10:44 pm That looks really weird at your side. Here on Windows it looks correct. What is your Qt version?
I will check the dialog what went wrong here.
Arg. I forgot the FreeCAD infos. I think it is 5.12.


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

Re: [merged] PR #4118 The section cut feature

Post by uwestoehr »

user1234 wrote: Sun Feb 06, 2022 11:22 pm The behavior is that you activate the cut via doubleclick. It stays independend what task you do. With a second doubleclick on the cut object you deactivate the cut.
I understood you. But having a new field/tag etc. for every object would be a change that affects all WBs. I thought doing the selection via the visibility is a neat and also intuitive way -> you get cut what you see. To add later non-cut elements, you simply show them after the cut has been made.

Thanks for your example.
I won't have access to FreeCAD the next days. I will have a look as soon as I am back home.
user1234
Veteran
Posts: 3319
Joined: Mon Jul 11, 2016 5:08 pm

Re: [merged] PR #4118 The section cut feature

Post by user1234 »

uwestoehr wrote: Sun Feb 06, 2022 11:38 pm I understood you. But having a new field/tag etc. for every object would be a change that affects all WBs. I thought doing the selection via the visibility is a neat and also intuitive way -> you get cut what you see. To add later non-cut elements, you simply show them after the cut has been made.
OK.

uwestoehr wrote: Sun Feb 06, 2022 11:38 pm I won't have access to FreeCAD the next days. I will have a look as soon as I am back home.
Same.

Greetings
user1234
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: [merged] PR #4118 The section cut feature

Post by NewJoker »

uwestoehr wrote: Sun Feb 06, 2022 11:38 pm
This feature is great. But maybe it would be possible to extend its functionality a bit and allow for non-persistent cuts as well. The currently available Clipping plane tool has a large limitation - it makes models look like they are hollow inside. It seems that this new tool could serve as a base or workaround for proper clipping functionality requested by many users. For example, you could add a button to switch from preview (clipping) to actual persistent cut. Or at least a button to cancel the cut before closing the window.

old.PNG
old.PNG (24.33 KiB) Viewed 4018 times

new.PNG
new.PNG (28.55 KiB) Viewed 4018 times
marioalexis
Posts: 124
Joined: Wed Jun 19, 2019 7:44 pm

Re: [merged] PR #4118 The section cut feature

Post by marioalexis »

I have a question about this functionality.
Why is the Part_SectionCut command added to StdWorkbench items? Shouldn't it be on the same level as other Part commands like Part_Mirror, for example?
The StdWorkbench commands are created prior to loading of the Gui of Part module, at which point the Part commands are created.
StdWorkbench should not depend on functionality of the Part module.
In fact, the Warning "Unknown command 'Part_SectionCut'" is printed at the beginig of the program.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [merged] PR #4118 The section cut feature

Post by uwestoehr »

marioalexis wrote: Mon Feb 07, 2022 4:03 pm I have a question about this functionality.
Why is the Part_SectionCut command added to StdWorkbench items? Shouldn't it be on the same level as other Part commands like Part_Mirror, for example?
Thanks for spotting this. Yes, it should have been part of the Part WB-only.

Since I am abroad this week and cannot fix this, can you please make a PR that I can then commit?
Many thanks, in advance!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [merged] PR #4118 The section cut feature

Post by uwestoehr »

NewJoker wrote: Mon Feb 07, 2022 12:51 am This feature is great. But maybe it would be possible to extend its functionality a bit and allow for non-persistent cuts as well.
This feature is already there: Just assure that no checkbox for x, y, z is checked and you remove this way the cut. So you have the choice:
- closing the dialog or changing the document with a checkbox being checked results in a persistent cut
- closing without any checkbox being checked leads to no change at all

I will add tooltips to the checkboxes to give the user this info.
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: [merged] PR #4118 The section cut feature

Post by NewJoker »

uwestoehr wrote: Mon Feb 07, 2022 5:32 pm This feature is already there: Just assure that no checkbox for x, y, z is checked and you remove this way the cut. So you have the choice:
- closing the dialog or changing the document with a checkbox being checked results in a persistent cut
- closing without any checkbox being checked leads to no change at all

I will add tooltips to the checkboxes to give the user this info.
Right, I didn't notice that it's enough to just deselect all the checkboxes. Great news and thanks for implementing this :-)
User avatar
paddle
Veteran
Posts: 1391
Joined: Mon Feb 03, 2020 4:47 pm

Re: [merged] PR #4118 The section cut feature

Post by paddle »

This looks great. This was for me a missing feature and it's awesome that you made it!
Thanks
Post Reply