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: 868
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

in other news, i finally learned to use the surface filling tool thanks to Microelly2 and Chris_G.

this tools adds a huge value to the Silk workflow because it is overall better at patching the final holes near corners (not always the corner itself). i can only get it to do G1 at the edges, but it looks great in the center of the fill. My NStar grids and surfaces are G2 to the surrounding surfaces, but very ugly in the center., and the degenerate triangle was only ever meant as a placeholder.

downgrading the edge is definitely worth it overall.

degenerate triangle(the area of interest is the LIGHT blue triangle hiding in the big light blue area up top):
Silk_model_143_00.png
Silk_model_143_00.png (208.61 KiB) Viewed 2645 times
.
surface > filling: 3 edges, G1 to each face
Silk_model_143_02.png
Silk_model_143_02.png (182.29 KiB) Viewed 2645 times
same scenario for stars: here is 3Star filling a corner
Silk_model_142_03.png
Silk_model_142_03.png (192.32 KiB) Viewed 2645 times
.
and the surface> filling
Silk_model_142_02.png
Silk_model_142_02.png (197.71 KiB) Viewed 2645 times
Last edited by emills2 on Mon May 21, 2018 2:38 am, edited 2 times in total.
emills2
Posts: 868
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

the filling has better rounding, and it ends up so close to G2 in practice (on a G1 setting) that the NStar has no practical advantage:

look at the red dot at the center / left / up. go three zebra lines to the right and look below: a slight G2 error. but the highlight runs clean and smooth acrosss the toughest spot, where the 3 surfaces meet.
Silk_model_142_00.png
Silk_model_142_00.png (747.15 KiB) Viewed 2644 times
here, although there is perfect G2 at the seam (near red dot), the zebra gets mushed and ugly where all three surfaces connect. it certainly doesn't 'flow'
Silk_model_142_01.png
Silk_model_142_01.png (735.96 KiB) Viewed 2644 times
so i'm going to give up on improving the NStar stuff, after all i was waiting for the surface tool in a way.

I still see some value in Silk because it allows me to generate all the inputs for final surface filling with lightweight surfaces, and can reach G3 on the edge blends. and 3D splines.
emills2
Posts: 868
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

ulrich1a wrote: Sun May 13, 2018 6:28 pm ...The surface workbench provides in its current state no minimal surfaces. I played with this workbench some time now, in order to find something useful that can be done with it, in order to add it to the documentation. I still have no really convincing example except of the acoustic foam example from Wilfried. I may need to concentrate on Cars.

Ulrich
just wanted to flag you that i have a use case that is very important (to me) for the surface filling tool (in the few posts above). i also used it for someone else here in a 'pure FreeeCAD context': https://forum.freecadweb.org/viewtopic. ... 20#p234293

it doesn't always work perfect, but it accomplishes a very advanced task.

Edit: Also, it could be used to repair a step file with a broken surface. happens all the time, and it's often a difficult thing to fix. rebuilding solids with bad seams is an important function
Last edited by emills2 on Mon May 21, 2018 5:08 am, edited 1 time in total.
emills2
Posts: 868
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

the surface filling tool doesn't give much console feedback as to parameter use
Silk_model_143_06.png
Silk_model_143_06.png (493.38 KiB) Viewed 2636 times
.
but the parameters can be found and manipulated through the python explorer
Silk_model_143_08.png
Silk_model_143_08.png (544.23 KiB) Viewed 2636 times
.
including forcing the G2 parameter to return a surface, whether it wants to or not :)
Silk_model_143_07.png
Silk_model_143_07.png (156.5 KiB) Viewed 2636 times
this is the part that is odd to me. i can guarantee the surface loop is a valid candidate for G2, since all the corners of the surface loop are G2 to each other.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Silk: a NURBS workbench

Post by PrzemoF »

Would be perfect for modeling a car after crash ;)
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Silk: a NURBS workbench

Post by microelly2 »

emills2 wrote: Mon May 21, 2018 2:57 am
including forcing the G2 parameter to return a surface, whether it wants to or not :)
Silk_model_143_07.png

this is the part that is odd to me. i can guarantee the surface loop is a valid candidate for G2, since all the corners of the surface loop are G2 to each other.
can you please upload the grey face, I want to look inside to understand why it is so wavy.
emills2
Posts: 868
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

microelly2 wrote: Mon May 21, 2018 1:47 pm can you please upload the grey face, I want to look inside to understand why it is so wavy.
sure. here it is, had to recreate it.

Code: Select all

>>> sel=Gui.Selection.getSelection()[0]
>>> sel
<Part::PartFeature>
>>> sel.BoundaryOrder=[2,1,1]
>>> App.activeDocument().recompute()
first thing to do to diagnose would probably be to look a the whole filling surface untrimmed, check to see how it aligns its u and v with respect to the 'natural' u and v on the underlying Bezier surface that this fills
Silk_model_144_00.png
Silk_model_144_00.png (273.35 KiB) Viewed 2557 times
Attachments
Silk_model_144.FCStd
(547.56 KiB) Downloaded 72 times
emills2
Posts: 868
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

now i got curious whether setting all 3 sides G2 at once other combinations worked better. (this 3 sided hole is clearly a hard problem, and i'm very happy with the G1 result for what it is)

all G2. bad
Silk_model_144_01.png
Silk_model_144_01.png (222.24 KiB) Viewed 2550 times
Silk_model_144_01.png
Silk_model_144_01.png (222.24 KiB) Viewed 2550 times
.
G2 on both the straight 'u' and straight 'v' edges
Silk_model_144_02.png
Silk_model_144_02.png (797.95 KiB) Viewed 2550 times
.
the untrimmed surface filling with the single G2 on the rounded edge
Silk_model_144_03.png
Silk_model_144_03.png (189.63 KiB) Viewed 2550 times
.
a closer look at the untrimmed surface (file attached)
Silk_model_144_04.png
Silk_model_144_04.png (63.22 KiB) Viewed 2550 times
now we could do a whole other series of tests to feed the curves in different orders, to see if we can force the untrimmed surface to line up better with the source surface UV, and whether that allows valid results for G2
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Silk: a NURBS workbench

Post by triplus »

Nice progress.
emills2
Posts: 868
Joined: Tue Apr 28, 2015 11:23 pm

Re: Silk: a NURBS workbench

Post by emills2 »

triplus wrote: Tue May 22, 2018 12:37 pmNice progress.
definitely :) but i certainly don't claim any credit. all i did was sit back and wait for someone else to implement OCC filling.

i think the kayak models can go a lot further now!
Post Reply