Silk: a NURBS workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Silk: a NURBS workbench
for the sake of people who may be interested in the topic, but do not regularly check the users showcase forum, i will link here some recent posts that you may find interesting (in reverse chrono order):
a surfboard fin
viewtopic.php?t=78689
a boaty boat thing named boaty McBoatface
viewtopic.php?t=78525
a weird and fun bifurcating pipe thing (working on someone else's models)
viewtopic.php?p=675551#p675551
an old fashioned smoking pipe (working on someone else's models)
viewtopic.php?p=671788#p671788
a grip on a steering wheel
viewtopic.php?p=486716#p486716
producing tube caps and other high quality 'rotating' triangle surfaces (like the tip of the surfboard fin)
viewtopic.php?p=566151#p566151
a very compact model of an otherwise challenging design (working on someone else's models)
viewtopic.php?p=521702#p521702
an example of the flexibility of the 'rotating' triangles surface cap (NURBS sphere logic applied to non-circular edges, with fully 3D edges around the cap)
symmetry helps a lot here, but is not necessary. all 4 sides could be different surfaces from different guide curves (shared in pairs along the edges of course)
a surfboard fin
viewtopic.php?t=78689
a boaty boat thing named boaty McBoatface
viewtopic.php?t=78525
a weird and fun bifurcating pipe thing (working on someone else's models)
viewtopic.php?p=675551#p675551
an old fashioned smoking pipe (working on someone else's models)
viewtopic.php?p=671788#p671788
a grip on a steering wheel
viewtopic.php?p=486716#p486716
producing tube caps and other high quality 'rotating' triangle surfaces (like the tip of the surfboard fin)
viewtopic.php?p=566151#p566151
a very compact model of an otherwise challenging design (working on someone else's models)
viewtopic.php?p=521702#p521702
an example of the flexibility of the 'rotating' triangles surface cap (NURBS sphere logic applied to non-circular edges, with fully 3D edges around the cap)
symmetry helps a lot here, but is not necessary. all 4 sides could be different surfaces from different guide curves (shared in pairs along the edges of course)
- michacassola
- Posts: 23
- Joined: Fri Feb 17, 2023 10:17 am
- Contact:
Re: Silk: a NURBS workbench
@emills2,
WOOW!!! You seriously rock!
I am super busy with other things today at work, I will need a bit of time to go through everything.
But first things first: Thank you very much for your help!
It's not even help, it feels like a Masterclass!
Thanks a lot!
WOOW!!! You seriously rock!
I am super busy with other things today at work, I will need a bit of time to go through everything.
But first things first: Thank you very much for your help!
It's not even help, it feels like a Masterclass!
Thanks a lot!
- michacassola
- Posts: 23
- Joined: Fri Feb 17, 2023 10:17 am
- Contact:
Re: Silk: a NURBS workbench
@emills2
So I went through the tutorials and am thinking about a workflow with Draft Points to be able to always transform them and change the attached Sketches and therefore the CubicSurfaces.
However I enabled the zebra tool after one tutorial and get these bad results, how do you get things smooth?
So I went through the tutorials and am thinking about a workflow with Draft Points to be able to always transform them and change the attached Sketches and therefore the CubicSurfaces.
However I enabled the zebra tool after one tutorial and get these bad results, how do you get things smooth?
- michacassola
- Posts: 23
- Joined: Fri Feb 17, 2023 10:17 am
- Contact:
Re: Silk: a NURBS workbench
Also, after trying around a bit, I can see blending two surfaces with splitting curves and so on is very nice, but I cannot figure out a way to get two 4x4 surfaces next to each other that are already smooth... Is that also not intended, will I first have to overshoot with construction and then blend blend blend, like in the example?
Re: Silk: a NURBS workbench
Curves WB Zebra is based on the current precision of the graphic representation (the model objects are more or less perfect in abstraction)
select the curve or surface, under properties, view tab, reduce the values of:
-angular deflection (1 degree, ok to leave it at this value long term)
-deviation (reduce to 0.01 or 0.05 temporarily).
after checking the surface, put deviation back up to 0.1 at least, because it really slows down FreeCAD. Silk recalculates all surfaces when you change a parameter. this is basically instantaneous...until you draw the shape on screen, and now precision matters (and can lock up your machine for minutes at a time). so after checking a seam, there isn't much reason to show it as perfect all the time.
once you are done with everything, set the final surfaces back down to very low deviation. the deviation value of an intermediary surface or curve does not affect the precision of objects that are built upon it. these values strictly affect graphical representation. all objects can be calculated to near infinite precision individually
Last edited by emills2 on Tue Jun 06, 2023 8:01 pm, edited 1 time in total.
Re: Silk: a NURBS workbench
DING DING DING! Congratulations adventurer, these are the magic words that unlock tutorial 02.5! It only took 6 years since i wrote tutorial .03 for the question to be asked directly (several users figured this out by themselves though).michacassola wrote: ↑Tue Jun 06, 2023 12:40 pm a way to get two 4x4 surfaces next to each other that are already smooth...
The reason i didn't go into this until explicitly requested is that unless you are 'primed' for the explanation, it will likely appear discouragingly obtuse. So I just skipped ahead and said "look, just blend away the hard edges, automatic G2". You are now in a position to judge accurately for yourself if direct G1 is something you want to deal with, or skip to blending.
now i just have to write it up...i have a test model ready, and all the pictures i need. I think i should have it posted here sometime today (working now).
Re: Silk: a NURBS workbench
Tutorial 0.25 - manually aligning tangency (G1) across the shared seam of two adjoining surfaces.michacassola wrote: ↑Tue Jun 06, 2023 12:40 pm way to get two 4x4 surfaces next to each other that are already smooth...
(i've decided to do videos from now on for tutorials, but who knows when i'll actually do it. so for now, here is a text and picture answer to your question)
With Silk you can align two adjacent grids/surfaces of type 4X4 to tangency (G1), this is built-in to the sketch>poly>grid>surface pipeline. Whether or not that is 'smooth' is debatable and depends on situation. In the general case, the answer is NO, merely reaching G1 is not acceptable.
G1 across a mirror plane tends to look good. Also, if the curves were harmonious, and looked good already with fine sharp creases, a small adjustment to G1 can look better.
Unfortunately, we can often have something nice, but creased slightly, and following the G1 rules distorts it and makes it ugly.
On disharmonious or severely distorted edge curves, G1 is attained but still looks like a visual flaw. this is where cutting and blending is needed to achieve G2, continuous curvature. In the long run, it's better to assume everything will be blended, and to be pleased when, on occasion, blending can be skipped with a good result.
it is still worth learning the rules for G1, because sometimes it's good enough, and it is key to some very advanced stuff (which won't be covered here). When we do G2 blends, we get some design freedom back, because we can ignore the G1 rules (blending automatically does G1+G2 for you).
(read the rule, move on right away, it'll make more sense on a second read through)
G1 RULE for all NURBS :
-poly/grid lines going across a join must be colinear (parallel and touching at endpoints)
-the length of poly/grid lines going across a join must maintain a constant ratio across the join (in pairs)
in Silk, you control this entirely from the edges, by aligning the sketch lines (3L and nodes), and setting their lengths. so if your sketches connect, and the lengths follow the proportion/ratio rule, applying the rule within the grid is automatic. G1 ready sketches > G1 surfaces.
First let put together the bare minimum to work with: two surfaces side by side, which are built using a common edge between them. We'll draw them first with no concern for tangency, and then adjust them. don't try to be perfect in form right off the bat, Silk is made to design with, not just model an existing design. The structure must match exactly, but the details do not matter yet.
Here i drew a sketch on YZ. i drew three lines in sequence, and closed the sketch (3L sketch). I copied the sketch, pasted it twice, and adjusted placement in +X for one copy, and -X for the other copy (orignal copy left on YZ plane). then i edited all the sketches, and moved the points around so each sketch is wildly different from the others. .
then i drew a node sketch (N sketch) on XY, right at the origin (center of circle and one point of the line at origin) .
then i copied and pasted this node sketch 6 times, and mapped the copies to all the endpoints of the 3L sketches (i kept the original node sketch right at the origin, and hid it. this way, i can make more copies later if i want to).
The mapping i used (6 times) is:
-select endpoint (from 3L sketch)
-select edge connected to endpoint (from 3L sketch)
-set mode: normal to edge.
there are a bazillion mappings you could use, but this is a great start for 3D work. the nodes can now spin around 360 degrees, normal to the 3L sketches. after mapping, i edited the ones on the right side so they point back towards the middle. .
i need two more nodes sketches in the middle, so i can point then backwards to the left. i could map the same node sketch again twice, but here there is a useful shortcut. i already know that these nodes can be in the same plane as the middle node skteches i already have. so i select the existing node sketch, create new sketch, accept objectXY as the mapping. draw the circle and line, point them kinda backwards. i do this front and back on the middle 3L sketch. notice that the middle nodes share planes, but there are not otherwise aligned. this is all the sketching we need, in terms of structure. editing these will get us what we're after.
make the polys. one per 3L sketch, one for each pair of node sketches. .
[continued]
Last edited by emills2 on Wed Jun 07, 2023 4:04 am, edited 4 times in total.
Re: Silk: a NURBS workbench
make the two grids, make sure to select polys counterclockwise in a loop as you do.
(i turned the sketches back on here, they were in the way when i wanted to show the polys) .
and put some surfaces on the grids .
okay, this is nicely pinched, so we'll be able to see the changes as we make them G1 (simple tangency)
i edit the left pointing node in the back. i create a reference to the right pointing node line .
and snap the the left pointing line parallel to it [continued]
(i turned the sketches back on here, they were in the way when i wanted to show the polys) .
and put some surfaces on the grids .
okay, this is nicely pinched, so we'll be able to see the changes as we make them G1 (simple tangency)
i edit the left pointing node in the back. i create a reference to the right pointing node line .
and snap the the left pointing line parallel to it [continued]
Re: Silk: a NURBS workbench
now we do the same thing thing in the front
edit left pointing node, make reference to right pointing node .
snap parallel are we G1 yet? actually surprisingly close, but not quite
. we have not set the constant ratio going from one side to the other. blue to red in the picture below must have equal proportion in the front, and in the back
edit left pointing node, make reference to right pointing node .
snap parallel are we G1 yet? actually surprisingly close, but not quite
. we have not set the constant ratio going from one side to the other. blue to red in the picture below must have equal proportion in the front, and in the back
Re: Silk: a NURBS workbench
we're going to set length in red, and match ratios on blue.
set back red 15 mm (close to where it already was). still free to rotate the line. .
set back blue to 10 mm. now the ratio is set. 15:10 -> 3:2 .
go to red sketch on front side (points right), set length 30 mm. still free to rotate. .
go to blue sketch in front, set length 20 mm (30:20 -> 3:2) so we set the ratios on the sketches, and Silk sets the ratios for the grid's internal control points automatically.
It doesn't look much different, but it is now G1. the zebra lines touch at the seam. it is strictly tangent. but it is not smooth. i'm intentionally using an extremely ugly model, so we can see the problem, and the limited value of G1.
set back red 15 mm (close to where it already was). still free to rotate the line. .
set back blue to 10 mm. now the ratio is set. 15:10 -> 3:2 .
go to red sketch on front side (points right), set length 30 mm. still free to rotate. .
go to blue sketch in front, set length 20 mm (30:20 -> 3:2) so we set the ratios on the sketches, and Silk sets the ratios for the grid's internal control points automatically.
It doesn't look much different, but it is now G1. the zebra lines touch at the seam. it is strictly tangent. but it is not smooth. i'm intentionally using an extremely ugly model, so we can see the problem, and the limited value of G1.
Last edited by emills2 on Wed Jun 07, 2023 2:05 am, edited 1 time in total.