Coin3D - FreeCAD Delegation to help move Coin3D forward (Update: coin/pivy has been migrated to Github!)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Coin3D - FreeCAD Delegation to help move Coin3D forward (Update: coin/pivy has been migrated to Github!)

Post by Kunda1 »

It's very clear that one of the roadblocks for FreeCAD is the Coin3D dependency.
There are many issues thast we face because of it:
  1. Coin3D bundles a version of libexpat that crashes FC in different use cases
  2. Coin3D does not support retina and HiDPI very well and therefore many MacOS users suffer the consequences
  3. For a long while, upstream Coin3D development was idle
  4. In the package ecosystem there is much confusion on what is the latest Coin3D point release. Users are packaging FreeCAD with different versions of Coin3D and running in to known issues over and over again. Many downstream packagers find this very frustrating and quit (FreeCAD on Arch was abandoned as a package (still exists in the AUR)).
I bet there are other issues as well.

So, I'm writing this thread to discuss what we can do about this. I know at one point we had our own fork going. But then upstream merged our changes (or some of them?). What is the correct question here? How do we stimulate movement in upstream? What can we do as a community to help coin3d move forward and in the process help us move forward overcoming the issues that it presents etc...
Please discuss...

References:
Image
Last edited by Kunda1 on Fri Apr 19, 2019 12:24 pm, edited 2 times in total.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kkremitzki
Veteran
Posts: 2517
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by kkremitzki »

Part of this effort involves the fact that we have a copy of the source of Quarter in FreeCAD with modifications, so Quarter needs to get packaged and our modifications upstreamed where possible.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by Joel_graff »

Not that I mean to hijack the topic, but perhaps it's time to revisit the issue of switching to OSG (or something else)... With the Python3 and Qt5 transitions nearing completion, it may be worth starting a thread to explore that in earnest. The last serious discussion I noted was dated late 2016.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by NormandC »

Joel_graff wrote: Sat Mar 09, 2019 8:23 am perhaps it's time to revisit the issue of switching to OSG (or something else)...
I find odd that in all those topics about the scene graph issue, the possibility of going with OCCT visualization is never considered. After all it's already part of OCCT, on Linux we have no choice to but to bundle the visualization component with FreeCAD so end users have it already (not sure about Windows?), and surely it must have benefited from improvements over the years. As it's a made-for-CAD component, it may already have tools to get things that will require programming in Coin or maybe even OSG, like hidden-line separation in wireframe mode.
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by fosselius »

I have just looked through https://dev.opencascade.org/doc/overvie ... ation.html

Will play around with it a bit tonight and then look at how it could replace coin3d in FreeCAD. (I am not saying that it ever will)

The output of this project will be greater knowledge of OCCT and FreeCAD on my part, in best case i might be able to post some kind of impact analysis for a migration.

When i do this kind of prestudies at work they usually take a few weeks full time work to generate a decent report. This is probably quite complex and i have limited time, so keep expectations low.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by wmayer »

NormandC wrote: Sat Mar 09, 2019 11:04 pm
Joel_graff wrote: Sat Mar 09, 2019 8:23 am perhaps it's time to revisit the issue of switching to OSG (or something else)...
I find odd that in all those topics about the scene graph issue, the possibility of going with OCCT visualization is never considered. After all it's already part of OCCT, on Linux we have no choice to but to bundle the visualization component with FreeCAD so end users have it already (not sure about Windows?), and surely it must have benefited from improvements over the years. As it's a made-for-CAD component, it may already have tools to get things that will require programming in Coin or maybe even OSG, like hidden-line separation in wireframe mode.
In the early days of FreeCAD we were using the OCCT viewer and even its document framework OCAF. But at that time the viewer was extremely slow for larger objects and lacked of many features that we got with Coin3d for free. The only big advantage of the OCCT viewer over Coin3d was the available highlighting/selection mechanism but by writing our own nodes we could achieve something similar.

And the whole OCAF was a pain in the ass. We got it working for built-in object types but for all custom object types you had to register them with a very weird plugin mechanism which we never got working reliably. And documentation was either non-existent or very poor.

After spending 2-3 years on this we gave up and started to implement something that we have control over and that we understand.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by NormandC »

Thanks for the explanation Werner.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by looo »

Is it already possible to add vtk-objects to the view? vtk could be another good alternitive/ addition.
One problem of coin is the slow interaction (dragging) on osx. I see this in the sketcher and also in other application where elements are dragged with the mouse.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by wmayer »

looo wrote: Tue Mar 26, 2019 6:01 pm Is it already possible to add vtk-objects to the view? vtk could be another good alternitive/ addition.
One problem of coin is the slow interaction (dragging) on osx. I see this in the sketcher and also in other application where elements are dragged with the mouse.
vtk and Coin3d are two completely different rendering systems. But ickby succeeded in the FEM module to use vtk stuff inside an Inventor node but I don't know if this is doable in a more general manner. I have never seriously worked with vtk so I don't know its internal working good enough.
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: Coin3D - FreeCAD Delegation to help move Coin3D forward

Post by fosselius »

I have started to poke around a bit here:
https://forum.freecadweb.org/viewtopic.php?f=10&t=35264
Post Reply