V0.20.2 Curves WB issues, Macros & Silk WB

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

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

LQ_6 wrote: Tue Mar 28, 2023 8:19 pm Nop T_T I corrected the arc tangency, zebra analysis still breaks
can you upload your corrected model please? it would make it easier for me
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

i wanted to wait for your updated model before trying Surface Filling, so i did a Silk version in the meantime.
Pipa_Silk_06.FCStd
(782.2 KiB) Downloaded 14 times
Pipa_Silk_05_01.png
Pipa_Silk_05_01.png (315.4 KiB) Viewed 693 times
Pipa_Silk_05_02.png
Pipa_Silk_05_02.png (331.71 KiB) Viewed 693 times
the file gnosys shared is interesting, but it pinches too hard at the bend [edit: in my personal taste]. This is because there is only one 64 surface on top, and one 64 surface on the bottom. Nothing wrong with that, but i do not personally use the 64 surface directly.

I do the base model with mutliple 44 surfaces, segment them, and then blend them. more setup, but finer control. this is a case where the finer control is necessary [edit: in my personal taste].

first i do a 2D version of wht the blends will look like, to see if they can be tuned to the proper shape. in this case i see two basic shapes. the 'mouth' and the 'stem', meeting at a 'neck'. the number of sections needed is a guess based on experience. I 'compose' everything, then blend. it's really important to me that there are 2 things here, even though they look like one smooth things. there's a burning chamber, and it is connected to a tube.
4 sketches of 3 lines each in white.
used to create 4 curves (thin yellow)
5 points placed on curves where i want to cut them (3 endpoint + 2 cut points)
curves cut (upper and right thick yellow)
pieces of curves blended (thick yellow)
Pipa_Silk_05_03.png
Pipa_Silk_05_03.png (684.89 KiB) Viewed 693 times
once satisfied that the current composition has a chance of success, i draw all the arc cross section
Pipa_Silk_05_04.png
Pipa_Silk_05_04.png (541.42 KiB) Viewed 693 times
i have to split them in half otherwise the arc conversion can bug out (90 degree included angle max). But now i need a curve along the arc split :( this is annoying, but it's only 4 extra sketches, and they are brain-dead simple. a circle and a line. the interesting part here is knowing how to use the placement/attachment tools to to make these sketches point the way you wan them to. in the end, these extra edge along the arc split can also becomes useful in the design (i wish i didn't need them by default)

95% of the design is done now. there will be almost no decisions left to make. all the rest of the work is to dress up the design implicit in these skecthes

[continued]
Last edited by emills2 on Wed Mar 29, 2023 4:04 am, edited 6 times in total.
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

slap a control polygon on every 3 line sketch, and on the node sketches in pairs (node sketches are the line-circle sketches).
Pipa_Silk_05_05.png
Pipa_Silk_05_05.png (600.19 KiB) Viewed 685 times
these control polygons form loops, select them in a loop, then slap a control grid on them (4 loops in picture)
select each control grid and slap a surface (type 44) on them (4 surfaces in picture)
Pipa_Silk_05_06.png
Pipa_Silk_05_06.png (574.29 KiB) Viewed 685 times
Pipa_Silk_05_07.png
Pipa_Silk_05_07.png (368.22 KiB) Viewed 685 times
yeeech, that's ugly right?
cut out the ugly part by segmenting the surfaces. this operation generates a new smaller grid, slap some 44 surfaces on the top most and right most grids. now we have the portion we wish to keep. i segmented using values determined during the 2D study phase (no new decisions at this stage)
Pipa_Silk_05_08.png
Pipa_Silk_05_08.png (385.68 KiB) Viewed 685 times
[continued]
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

the two segment grids (44) at the corner are used as inputs to a blend grid (64). i slap a 64 surface on the blend grid.
now some decisions need to be made. my early 2D study of the blends (using blend polys) was just enough to give me confidence, but now i need to apply this tuning the the entire blend grid, and they are sensitive about how they meet in the middle where the arcs are split.

the two blend polys of the study had 4 degrees of freedom each, and i had set them independently. the blend grids have 10 degrees of freedom each. some of the 10 degrees need to match across the two blend grids, but some are left as true design parameters

after playing around for 5 minutes, i decided that the neck pinch area was critical to get right. so the blend study of this area is the driver. i match the blend to these values, then i play around with the remaining dofs to match the bottom portion of la pipa.
Pipa_Silk_05_09.png
Pipa_Silk_05_09.png (388.37 KiB) Viewed 673 times
the picture above shows these ~five minutes of tuning. lots of room to improve still if desired. once the necesary matching is done between grids, the remaining dofs are assigned visually by asking "does this grid look nice? like a pretty low poly model?" right now the answer is "it looks ok towards the mouth, but the control grid looks messy in the direction of the neck" so those should be worked on. it's also possible i made some errors in the matching here, i was going pretty fast.

right now it is G3 on the 44 portions (bezier cubic), auto G2 where the 44 touches the 64 blend, generally G3 with some G2 exception within the 64 blend surface (cubic NURBS with 6 control points).

then i just play around to check CAD validity. Curves>ParametricSolid gives me a parametric quilt. Part> mirror give me the other half
Pipa_Silk_05_10.png
Pipa_Silk_05_10.png (495.45 KiB) Viewed 673 times
then i do Part>ShapeBuilder>Shell, then Part>ShapeBuilder>Solid still a hollow shell LOL, but object type matters...because now i can do Part>THickness to verify that this surface is capable of Offsetting...that's as far as i validated. I haven't worked with FreeCAD much the last two years, so it will take me some time to figure why i failed to create a thickness after i had previously capped the two ends. i'm sure it's there, just need to dig. Anyway! clean offset surface! it's actually kind of a big deal.
Pipa_Silk_05_11.png
Pipa_Silk_05_11.png (351.93 KiB) Viewed 673 times
Pipa_Silk_05_12.png
Pipa_Silk_05_12.png (268.74 KiB) Viewed 673 times
Pipa_Silk_05_13.png
Pipa_Silk_05_13.png (364.53 KiB) Viewed 673 times
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

there is a lot of room left to tune this shape more precisely. with the right settings, you can open a sketch and see the surface without seeing the intermediary grid. so when you drag/drop in your sketch, or change dimensions, you can see the results in the surface basically in real time (until the model gets big, then you have to do all modifcations through dimension constraints to avoid killing your computer with recomputations)

also, i may have a slight G1 error (that is fixable) in the model shared previously.
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

ok, fixed the g1 problem. the blends are G2 out of the box, but the transition from top to bottom is not a blend. so by screwing too hard with the tuning, i had broken the flow from top to bottom. fixed it by further matching the tuning

Curves>Zebra showing a G1 error going from top to bottom: right in the between the two blends, the zebra shears completely. G2 but clearly not G3 from left to right though, there's a lot of wiggle, but the zebra is continuous.
Pipa_Silk_05_15.png
Pipa_Silk_05_15.png (466.91 KiB) Viewed 655 times
the highlighted (green) grid lines need to be tangent to each other
Pipa_Silk_05_16.png
Pipa_Silk_05_16.png (243.76 KiB) Viewed 655 times
Pipa_Silk_05_17.png
Pipa_Silk_05_17.png (329.88 KiB) Viewed 655 times
fixed it (just a matter of setting values equal in both grids)
Pipa_Silk_05_18.png
Pipa_Silk_05_18.png (288.23 KiB) Viewed 655 times
now the G1 error goes away between the two blends (top to bottom)
Pipa_Silk_05_19.png
Pipa_Silk_05_19.png (496.32 KiB) Viewed 655 times
Last edited by emills2 on Wed Mar 29, 2023 5:03 am, edited 1 time in total.
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

[deleted - was dealing with a bug]
Last edited by emills2 on Wed Mar 29, 2023 3:31 am, edited 1 time in total.
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

clean across the mirror, very clean across the blend in this view. neck area is obviously way tougher. I mean, there's no reason to think that the pipe is G3 in the neck area, so if i wasn't trying to match the picture precisely, i could probably (maybe) make it G3. It's also not unsual to have a 'sacrificial" area of the model, somewhat hidden, where you 'drag off' problem geometry and non G3 stuff.
Pipa_Silk_05_22.png
Pipa_Silk_05_22.png (261.21 KiB) Viewed 647 times
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

redid the 'thickness' as a filled offset using the same tools as in gnosys's design. it works well, even though i wasn't expecting the 'filled' portion to be so wobbly.
Pipa_Silk_08_01.png
Pipa_Silk_08_01.png (111.97 KiB) Viewed 541 times
this is technically correct, but in many cases will not match expectation

i would like the end caps to be flat (in the plane of the arc profiles), so i need to extend the offset surface past the plane of the original surface's arcs, and them trim them.

is there a function (python or otherwise) in FreeCAD that will extend a surface? i would think it's probably in OCC somewhere, as it's a pretty standard CAD feature.

I can also make the original surface slightly longer on each end to begin with, then trim, but i would lose some control over the intended start/end faces. it would be more difficult to set a specific diameter, specific position, etc. It will also not always be obvious how much extension is needed depending on the final offset.
emills2
Posts: 875
Joined: Tue Apr 28, 2015 11:23 pm

Re: V0.20.2 Curves WB issues, Macros & Silk WB

Post by emills2 »

i was able to improve the model in top view, but then found problems.
Pipa_Silk_09_20.png
Pipa_Silk_09_20.png (188.52 KiB) Viewed 503 times
after looking more closely, i see that my model still has some excess pinching in the transition that is not easy to get rid of. the area is technically smooth on a very small scale, but looks bad. the fold on the upper face is a matter of taste, but the pinched part on the side is definitely a defect.
Pipa_Silk_09_29.png
Pipa_Silk_09_29.png (197.17 KiB) Viewed 503 times
Pipa_Silk_09_30.png
Pipa_Silk_09_30.png (214.43 KiB) Viewed 503 times
i don't have a solution yet, but the basic problem is that my main bezier face model pinches too much in the inside corner. the 'neck' profile for the arcs is rotated almost 90 degrees to the arcs for the 'stem' profiles. this causes a lot of distortion, which the blend only partially removes.
Pipa_Silk_09_37.png
Pipa_Silk_09_37.png (312.88 KiB) Viewed 503 times
Post Reply