Tutorial: joining studs to a non-planar surface
2012-01-15, 12:41 (This post was last modified: 2012-01-16, 21:30 by Travis Cobbs.)
2012-01-15, 12:41 (This post was last modified: 2012-01-16, 21:30 by Travis Cobbs.)
This decribes method to create the junction between stud primitives and a non-planar surface. It is not perfect (there are some T-junctions created in the process), but it's pretty efficient. It is also the opportunity to see an example of usage of many tools...
We start with the partial part, stud4a are in position and we need to join them to dome shaped surface above.
Starting file: stb0.dat
an
Extract stud4a primitives -> stb1.dat
Inline (using LDDP) stb1 contents (one level), and remove everything but 4-4edges. Inline the result -> stb2.dat
Using MLCad, extract bottom surface from stb0.dat -> stb3.dat
Use Slicerpro on stb2.dat as pattern, stb3.dat as former -> stb4.dat
Generate the tubes using Ytruder. Stud4a top is at Y=44, so we use Ytruder with projection on plane Y=44 -> stb5.dat
Problem is that the orientation of the generated surface depends only on the orientation of lines in stb4.dat. If you look at the file in BFC mode, orientation is not correct. Windz should be able to do clean up, but stb5.dat has no clear interior/exterior, so Windz doesn't perform well on it. We will add the stud4a primitives (from file stb1.dat) to it to make things clear, we also remove the edge lines inserted by Ytruder on the edges of non circular paths -> stb6.dat
Windz can now find correct bfc orientation -> stb7.dat
We can now reintegrate all these elements (edge lines from stb4.dat, cylinders from stb7.dat) in stb0.dat -> stb8.dat
Now we go on with generation of walls between studs.
First step, using MLCad we create top of walls as rectangles that enter in cylinder tubes -> stb9.dat
Adjust Y value of stb1.dat so that height of stud4a be in the middle of quads in stb9 (we could have used cylinders of stb7, but since there are more cuts the result would not be as clean). Inline multilevel down to quad and lines -> stb10.dat
Now cut stb9.dat with the studs (stb10.dat) using Intersector -> stb11.dat
stb11.dat
Create intersection lines with Isecalc ->stb12.dat
Remove the unwanted (yellow) surfaces from stb11.dat, and add edge lines from stb12.dat then restore proper colors -> stb13.dat
Generate remaining edge lines with Edger2, options "Create only unmatched edges" and "write only new lines". The result contains only side edge lines, those where we want to grow side surfaces. Change edge color to 24 -> stb14.dat
We will now use the same process as the one used for stud cylinders.
Use Slicerpro on stb14.dat as pattern, stb3.dat as former -> stb15.dat
Generate the side walls using Ytruder. Top is at Y=35, so we use Ytruder with projection on plane Y=35 -> stb16.dat
Merge stb13, stb14, stb15 and stb16 -> stb17.dat
Run Windz on stb17 to improve BFC. Unfortunately stb17 has no clear inside/outside, so Windz result is not perfect, and you still have to flip a few quads manually. It can be done relatively easily using LDView tree view with highlight to find line number of inverted elements, and change winding in LDDP. -> stb18.dat
Add it to stb8 ->stb19.dat
We start with the partial part, stud4a are in position and we need to join them to dome shaped surface above.
Starting file: stb0.dat
an
Extract stud4a primitives -> stb1.dat
Inline (using LDDP) stb1 contents (one level), and remove everything but 4-4edges. Inline the result -> stb2.dat
Using MLCad, extract bottom surface from stb0.dat -> stb3.dat
Use Slicerpro on stb2.dat as pattern, stb3.dat as former -> stb4.dat
Generate the tubes using Ytruder. Stud4a top is at Y=44, so we use Ytruder with projection on plane Y=44 -> stb5.dat
Problem is that the orientation of the generated surface depends only on the orientation of lines in stb4.dat. If you look at the file in BFC mode, orientation is not correct. Windz should be able to do clean up, but stb5.dat has no clear interior/exterior, so Windz doesn't perform well on it. We will add the stud4a primitives (from file stb1.dat) to it to make things clear, we also remove the edge lines inserted by Ytruder on the edges of non circular paths -> stb6.dat
Windz can now find correct bfc orientation -> stb7.dat
We can now reintegrate all these elements (edge lines from stb4.dat, cylinders from stb7.dat) in stb0.dat -> stb8.dat
Now we go on with generation of walls between studs.
First step, using MLCad we create top of walls as rectangles that enter in cylinder tubes -> stb9.dat
Adjust Y value of stb1.dat so that height of stud4a be in the middle of quads in stb9 (we could have used cylinders of stb7, but since there are more cuts the result would not be as clean). Inline multilevel down to quad and lines -> stb10.dat
Now cut stb9.dat with the studs (stb10.dat) using Intersector -> stb11.dat
stb11.dat
Create intersection lines with Isecalc ->stb12.dat
Remove the unwanted (yellow) surfaces from stb11.dat, and add edge lines from stb12.dat then restore proper colors -> stb13.dat
Generate remaining edge lines with Edger2, options "Create only unmatched edges" and "write only new lines". The result contains only side edge lines, those where we want to grow side surfaces. Change edge color to 24 -> stb14.dat
We will now use the same process as the one used for stud cylinders.
Use Slicerpro on stb14.dat as pattern, stb3.dat as former -> stb15.dat
Generate the side walls using Ytruder. Top is at Y=35, so we use Ytruder with projection on plane Y=35 -> stb16.dat
Merge stb13, stb14, stb15 and stb16 -> stb17.dat
Run Windz on stb17 to improve BFC. Unfortunately stb17 has no clear inside/outside, so Windz result is not perfect, and you still have to flip a few quads manually. It can be done relatively easily using LDView tree view with highlight to find line number of inverted elements, and change winding in LDDP. -> stb18.dat
Add it to stb8 ->stb19.dat