[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: PR #4074 The section cut feature

Post by uwestoehr »

realthunder wrote: Mon Jun 07, 2021 11:28 pm but of course a native section feature will be more convenient.
Thanks. So I will update my PR to get it merged. Maybe I should give it a better name to make clear that its result is a real object, not something just for a view.
User avatar
M4x
Veteran
Posts: 1474
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: PR #4074 The section cut feature

Post by M4x »

Hm, interesting idea. Maybe something like permanent section cut?
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Re: PR #4074 The section cut feature

Post by galou_breizh »

realthunder's branch includes a split function that does exactly that, a permanent cut. The cutting element does not even need to be planar. You can select to activate one side of the split or the other.
User avatar
M4x
Veteran
Posts: 1474
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: PR #4074 The section cut feature

Post by M4x »

Are you talking about Part_SliceApart? ;)
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: PR #4074 The section cut feature

Post by Pauvres_honteux »

Thinking of the commercial software I use on a daily basis, they all have section cut/view that are blistering fast no matter how big of a model one load into memory (up to tens of gigabyte) and the section cut/view still performs in sub-seconds.
This leads me to belive they must utilize the graphic card capability in some way, not the CPU.
Further, they have obviously found a way to achive the section view + visible and selectable edges + filling and therefore measure possibilities, even cross section area calculation.

The question that comes to my mind: is COIN really not possible to trick into doing this type of visualisation?
Is it absolutely necessary to replace it with a new rendering engine? (I imagine it's not something you do in a coffe break)
Exactly what is missing in COIN to make it work?
And exactly what is gained (and do we loose something?) if we make the switch to the newer rendering engine?
werner wrote:
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #4074 The section cut feature

Post by uwestoehr »

M4x wrote: Wed Jun 09, 2021 8:58 pm Are you talking about Part_SliceApart? ;)
I don't see how I can this way cut assemblies. However my PR does in fact so the same
- first create a box
- take the assembly and cut the box from it

The general problem is hereby that the cut operation is quite slow for larger assemblies. But OK, the normal use case is probably to cut either just one object or simpler assemblies.

From my former work with SolidWorks I remember that also its section feature needed a lot of time to calculate a cut through assemblies with 10 and more parts.
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #4074 The section cut feature

Post by chrisb »

For a ping you need the user_id:
Werner wrote: ping
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
FLOSS Noobie
Posts: 13
Joined: Sat Feb 27, 2021 1:17 am

Re: PR #4074 The section cut feature

Post by FLOSS Noobie »

Pauvres_honteux wrote: Thu Jun 10, 2021 8:39 am The question that comes to my mind: is COIN really not possible to trick into doing this type of visualisation?
You can take a look at the Fosdem talk by Realthunder and OficineRobotica to get a little overview of the new renderer https://youtu.be/-K1EVcYAmRM?t=1493
I'm not a developer or anything like that, so take everything I say with a grain of salt ;) .
Essentially, this is what I can understand about the new renderer.
Coin 3d is quite outdated and its rendering part is now kind of obsolete, so instead of going with a completely new scene graph library, the plan is to upgrade only the rendering with Diligent Graphics. It sure isn't a small task, but it's a better option.
The new renderer would allow the implementation of new functionalities as well as a performance upgrade, which would allow FreeCAD to better handle large/complex models, see this thread https://forum.freecadweb.org/viewtopic.php?f=8&t=12134.
Also, people who have modern hardware would benefit from the new rendering engine, as Diligent Graphics focuses on taking full advantage of the modern graphics APIs (Vulkan and Direct3D12) while supporting older hardware through Direct3D11 and OpenGL.
Once again, don't take what I say too seriously. I mean, just look at my user name :D .
Hopefully it was helpful in some way.
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Re: PR #4074 The section cut feature

Post by galou_breizh »

M4x wrote: Wed Jun 09, 2021 8:58 pm Are you talking about Part_SliceApart? ;)
No I'm talking about PartDesign/Split (only available in realthunder's fork I think).
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: PR #4074 The section cut feature

Post by realthunder »

galou_breizh wrote: Tue Jun 15, 2021 12:14 pm
M4x wrote: Wed Jun 09, 2021 8:58 pm Are you talking about Part_SliceApart? ;)
No I'm talking about PartDesign/Split (only available in realthunder's fork I think).
They actually share the same code. So for anyone wandering the difference, just think about Part_SliceApart and Part_Section. They have some overlap, but not exactly the same.

Pauvres_honteux wrote: Thu Jun 10, 2021 8:39 am This leads me to belive they must utilize the graphic card capability in some way, not the CPU.
Further, they have obviously found a way to achive the section view + visible and selectable edges + filling and therefore measure possibilities, even cross section area calculation.
I am sure they are using rendering trick to achieve instant section. It can even do rough edge detection and area measurement. But I doubt the result is good enough for engineering use. The real geometrical section (which is supposed to give the analytical solution) won't be that fast.

The question that comes to my mind: is COIN really not possible to trick into doing this type of visualisation?
Is it absolutely necessary to replace it with a new rendering engine? (I imagine it's not something you do in a coffe break)
Exactly what is missing in COIN to make it work?
For relatively simple rendering task, like the section filling, it is possible without big change, but then that's not something readily available in Coin, so you'll have to render it with your own OpenGL calls anyway. And the aging rendering framework of Coin is actually making the task harder.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
Post Reply