An example of Gordon Surface based upon OCC

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!
Post Reply
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: An example of Gordon Surface based upon OCC

Post by chrisb »

rainman110 wrote: Wed Sep 05, 2018 7:36 pm I am the developer of TiGL and implemented the gordon surface algorithm with my student merlin.
Thanks for making it public.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: An example of Gordon Surface based upon OCC

Post by Vincent B »

Hi. How to avoid twisted surface?
I've tried to change the order of selection for profiles or guides, but without result.
Attachments
Capture.PNG
Capture.PNG (54.5 KiB) Viewed 1811 times
twisted.FCStd
(18.95 KiB) Downloaded 52 times
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: An example of Gordon Surface based upon OCC

Post by microelly2 »

GlouGlou wrote: Sun Nov 11, 2018 10:40 am Hi. How to avoid twisted surface?
I've tried to change the order of selection for profiles or guides, but without result.
You gave to flip the direction of one rib curve
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: An example of Gordon Surface based upon OCC

Post by freecad-heini-1 »

microelly2 wrote: Sun Nov 11, 2018 10:33 pm
GlouGlou wrote: Sun Nov 11, 2018 10:40 am Hi. How to avoid twisted surface?
I've tried to change the order of selection for profiles or guides, but without result.
You gave to flip the direction of one rib curve
And how?
User avatar
Chris_G
Veteran
Posts: 2580
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: An example of Gordon Surface based upon OCC

Post by Chris_G »

microelly2 wrote: Sun Nov 11, 2018 10:33 pm You have to flip the direction of one rib curve
I am pretty sure the algorithm is supposed to take care of curve orientation by itself.
I have introduced several bugs in my python port.
But I'm afraid I'll gave great difficulties to find them.
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: An example of Gordon Surface based upon OCC

Post by hammax »

… there is no source from where you get the JoinCurves and therefore no possibility to correct/flip them.
But if you use interpolated curves from the endpoints of the JoinCurves in equal directions
the GordonSurface does not twist.

twisted_2.PNG
twisted_2.PNG (29.86 KiB) Viewed 1716 times
Attachments
twisted_2.FCStd
FC.18.15169
(32.24 KiB) Downloaded 60 times
Last edited by hammax on Tue Nov 13, 2018 6:02 am, edited 1 time in total.
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: An example of Gordon Surface based upon OCC

Post by Vincent B »

@hammax: You just swapped guides with profiles. :D
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: An example of Gordon Surface based upon OCC

Post by Vincent B »

Chris_G wrote: Mon Nov 12, 2018 8:25 am I am pretty sure the algorithm is supposed to take care of curve orientation by itself.
With not to do that manually with a option?
...
I finally change the direction of a sketch and the gordon came right. ;)
And able to finish this Rhino model (or something looking like ;) )
https://form2fab.com/wp-content/uploads ... ique_4.jpg
Attachments
Capture.PNG
Capture.PNG (262.99 KiB) Viewed 1681 times
gordonRight.FCStd
(13.99 KiB) Downloaded 61 times
Capture.PNG
Capture.PNG (20.41 KiB) Viewed 1691 times
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: An example of Gordon Surface based upon OCC

Post by hammax »

… I see new features updated for GordonSurface in the CurvesWB.
My trial was to use FrenetTN for Sketcher planes creating new profiles on existing profiles.

twisted_3.PNG
twisted_3.PNG (52.07 KiB) Viewed 1656 times
Attachments
twisted_3.FCStd
FC.18.15190
(42.93 KiB) Downloaded 58 times
User avatar
Chris_G
Veteran
Posts: 2580
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: An example of Gordon Surface based upon OCC

Post by Chris_G »

hammax wrote: Wed Nov 14, 2018 6:44 am … I see new features updated for GordonSurface in the CurvesWB.
I am trying to fix Gordon surface.
Currently, the algorithm is only partially working, and produces surfaces that have far too much control points.
The smartest and most important part of the TiGL algorithm is about preparing and reparametrizing the curves before feeding them to the actual Gordon algo.
I realized that these optimization functions were actually skipped in my implementation (and broken BTW).
The good news is that I found were the bug is happening.
The bad news is that it is located in the most complex function, dealing with "matrix solving", that is way over my poor math skills.
So I don't know how I will be able to fix that ... :cry:
Post Reply