Silk: a NURBS workbench

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

ezzieyguywuf wrote: Mon Mar 26, 2018 12:15 am I don't know much about Silk (or NURBS honestly) but I saw Chris_G mentioned a python nurbs library, so I thought I'd mention verb, an open-source cross-platform NURBS library.
this might be the first time i actually appreciate the 'modern' website design aimed at mobile :lol:

ChrisG, Microelly, and i (maybe others i'm not aware of?) are essentially all playing with the OCC equivalent of
http://verbnurbs.com/examples/surface.html

to 'mush' together the capabilities of
http://verbnurbs.com/examples/loftedSurface.html and http://verbnurbs.com/examples/sweptSurface.html

...to reach the holy grail of 'actually good' http://verbnurbs.com/examples/surfaceBoundaries.html objects
ezzieyguywuf wrote: Mon Mar 26, 2018 12:15 am journey to write my own CAD kernel
welcome to the club :D i bang out my models one control point at a time 8-) thank god for FreeCAD giving me clean python access to basic NURBS utilities on an Open Inventor openGL stack! before you run off to write your kernel from scratch...can you fix the topology here? your example in the developer's forum looked really promising, although i couldn't understand it all.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Silk: a NURBS workbench

Post by triplus »

emills2 wrote: Wed Mar 28, 2018 2:29 am ChrisG, Microelly, and i (maybe others i'm not aware of?) are essentially all playing with the ... to reach the holy grail ...
Capable and useful upstream surface workbench? :idea:
ezzieyguywuf
Posts: 656
Joined: Tue May 19, 2015 1:11 am

Re: Silk: a NURBS workbench

Post by ezzieyguywuf »

emills2 wrote: Wed Mar 28, 2018 2:29 am
ezzieyguywuf wrote: Mon Mar 26, 2018 12:15 am I don't know much about Silk (or NURBS honestly) but I saw Chris_G mentioned a python nurbs library, so I thought I'd mention verb, an open-source cross-platform NURBS library.
this might be the first time i actually appreciate the 'modern' website design aimed at mobile :lol:

ChrisG, Microelly, and i (maybe others i'm not aware of?) are essentially all playing with the OCC equivalent of
http://verbnurbs.com/examples/surface.html

to 'mush' together the capabilities of
http://verbnurbs.com/examples/loftedSurface.html and http://verbnurbs.com/examples/sweptSurface.html

...to reach the holy grail of 'actually good' http://verbnurbs.com/examples/surfaceBoundaries.html objects
ezzieyguywuf wrote: Mon Mar 26, 2018 12:15 am journey to write my own CAD kernel
welcome to the club :D i bang out my models one control point at a time 8-) thank god for FreeCAD giving me clean python access to basic NURBS utilities on an Open Inventor openGL stack! before you run off to write your kernel from scratch...can you fix the topology here? your example in the developer's forum looked really promising, although i couldn't understand it all.
So you’re saying that if freecad has access to this verb library, the work you’re doing now would be much easier, or nah?

Regarding the topology stuff, I’m taking a step back from that for a while. The main reason is I want to take some time to receive input and feedback from more OG freecad devs to ensure the direction I’m going is one that could eventually me merged into main.

If I can reach some sort of consensus with the broader freecad dev community, I’m absolutely interested in finishing that project up.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

ezzieyguywuf wrote: Wed Mar 28, 2018 5:09 pm if freecad has access to this verb library, the work you’re doing now would be much easier, or nah?
don't let me stop you, but i don't think so. i believe OCC has all that stuff and more, so FreeCAD is always just a hair away from it. The OCC dev pages give teasers on some really complex stuff that's not available through FreeCAD UI or python yet. I sometimes wonder if OCC is being wasteful in its tesselations for NURBS, but that's not worth writing a new kernel in and of itself.
ezzieyguywuf
Posts: 656
Joined: Tue May 19, 2015 1:11 am

Re: Silk: a NURBS workbench

Post by ezzieyguywuf »

emills2 wrote: Thu Mar 29, 2018 1:01 am
ezzieyguywuf wrote: Wed Mar 28, 2018 5:09 pm if freecad has access to this verb library, the work you’re doing now would be much easier, or nah?
don't let me stop you, but i don't think so. i believe OCC has all that stuff and more, so FreeCAD is always just a hair away from it. The OCC dev pages give teasers on some really complex stuff that's not available through FreeCAD UI or python yet. I sometimes wonder if OCC is being wasteful in its tesselations for NURBS, but that's not worth writing a new kernel in and of itself.
meh, I want to try writing a kernel anyway. my question was just exploring if it'd be worthwhile to try bringing verb to freecad first.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

triplus wrote: Wed Mar 28, 2018 11:24 am
emills2 wrote: Wed Mar 28, 2018 2:29 am ChrisG, Microelly, and i (maybe others i'm not aware of?) are essentially all playing with the ... to reach the holy grail ...
Capable and useful upstream surface workbench? :idea:
i'm not sure i understand what you're saying Triplus. I vaguely noticed some people talking about improving the Surface workbench tools, but i don't know how to use them. I wasn't following closely, but i don't remember any screenshots or demos at the time. I can't really follow a lot of the dev threads, because it all goes over my head with the c++ stuff

i just gave it a shot right now. in both cases i fed the commands two edges from adjacent surfaces, and the two edges joining them (which i borrowed from my blend surface)

this surface took 5 minutes to generate (2nd surface tool on Surface workbench)
surface from boundary edges.png
surface from boundary edges.png (132.34 KiB) Viewed 2156 times
this one took 30 minutes in practice, because it froze my computer over and over during selection. also, i don't know how to use all the options (first tool on Surface workbench).
surface from boundary edges other tool.png
surface from boundary edges other tool.png (112.79 KiB) Viewed 2156 times
my tool makes this in a few seconds
Silk_model_131_03.png
Silk_model_131_03.png (105.33 KiB) Viewed 2156 times
is there a place where i can learn how to use all the options of the new Surface workbench tools? with the time required per operation, i can't really try things blindly.
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Silk: a NURBS workbench

Post by freecad-heini-1 »

Hi Emmils2,

I played a bit with the surface and curves workbench and created the acoustic foam example.
My vid is in German language, but I quess that you can undestand without my voice:
phpBB [video]

https://forum.freecadweb.org/viewtopic. ... 48#p208248

And I tried to design the tide-bottle with the surface workbench, at the end I used the curves-workbench:
phpBB [video]


Best regards
Wilfried
Last edited by freecad-heini-1 on Fri Mar 30, 2018 10:04 am, edited 1 time in total.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Silk: a NURBS workbench

Post by triplus »

emills2 wrote: Thu Mar 29, 2018 4:06 am i'm not sure i understand what you're saying Triplus.
We need surface capability oriented and interested developers. To progress FreeCAD further in this area. And it is nice to see a few of you are tackling this area. For things like this:
this one took 30 minutes in practice

...

my tool makes this in a few seconds
To hopefully improve in the future. ;)
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

freecad-heini-1 wrote: Thu Mar 29, 2018 2:41 pm My vid is in German language, but I quess that you can undestand without my voice:
nice video, thanks. nice to see to the surface filling tool in action. This is the capability of OCC that attracted me towards FreeCAD in the first place. only took 15 years to reach the GUI :lol:

I have a hard time using it on my machine. I think i'll take the hint from you and reduce my surface tessellation values. I normally keep them really high, because otherwise i can't see the defects in what i'm doing.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

i have added an auto-G3 option to ControlGrid64_2Grid44, the object that make a smooth blend along a sharp corner.
Silk_model_134_00.png
Silk_model_134_00.png (534.01 KiB) Viewed 1945 times
.
it is '0' (off) by default. setting it to '1' (on) cause the grid to seek G3 to the two adjacent surfaces being blended. This is a poorly optimized numerical solution, so i only let it run 200 iterations.

With only 6 control points, G3 isn't always achievable.

sometimes it works great! the blend looks nice, and the spacing of the grid flows evenly. but sometimes, it just runs into the inner scale limits (0.75-3) without actually hitting G3, or it finds G3, but in a ridiculously distorted grid.

i usually turn it on, and if it is ugly, i turn it off and overwrite the crazy values: in the pictures below, i edited the 2s and 1s by hand, but kept the other automatically generated values. So on one side of the blend i obtained G3, and on the other side, i force it to do what i want, and accept it is only G2.
Silk_model_143_11.png
Silk_model_143_11.png (44.66 KiB) Viewed 1945 times
Post Reply