Tutorial: joining studs to a non-planar surface


Tutorial: joining studs to a non-planar surface
#1
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...

[Image: stb0.gif]
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


[Image: stb1.gif]
Extract stud4a primitives -> stb1.dat


[Image: stb2.gif]
Inline (using LDDP) stb1 contents (one level), and remove everything but 4-4edges. Inline the result -> stb2.dat

[Image: stb3.gif]
Using MLCad, extract bottom surface from stb0.dat -> stb3.dat

[Image: stb4.gif]
Use Slicerpro on stb2.dat as pattern, stb3.dat as former -> stb4.dat

[Image: stb5.gif]
Generate the tubes using Ytruder. Stud4a top is at Y=44, so we use Ytruder with projection on plane Y=44 -> stb5.dat

[Image: stb6.gif]
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

[Image: stb7.gif]
Windz can now find correct bfc orientation -> stb7.dat

[Image: stb8.gif]
We can now reintegrate all these elements (edge lines from stb4.dat, cylinders from stb7.dat) in stb0.dat -> stb8.dat

[Image: stb9.gif]
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

[Image: stb10.gif]
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

[Image: stb11.gif]
Now cut stb9.dat with the studs (stb10.dat) using Intersector -> stb11.dat
stb11.dat

[Image: stb12.gif]
Create intersection lines with Isecalc ->stb12.dat

[Image: stb13.gif]
Remove the unwanted (yellow) surfaces from stb11.dat, and add edge lines from stb12.dat then restore proper colors -> stb13.dat

[Image: stb14.gif]
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

[Image: stb15.gif]
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

[Image: stb16.gif]
Generate the side walls using Ytruder. Top is at Y=35, so we use Ytruder with projection on plane Y=35 -> stb16.dat

[Image: stb17.gif]
Merge stb13, stb14, stb15 and stb16 -> stb17.dat

[Image: stb18.gif]
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

[Image: stb19.gif]
Add it to stb8 ->stb19.dat

Reply
Re: Tutorial: joining studs to a non-planar surface
#2
Wow. Very impressive tutorial.

One question though, it appears that the final product does not use any primitives that were in the stud because you fully inlined it, is this the case?

Does this mean that when trying to render the shape with POVRay using a primitive substitution library, that the studs would be polygonal instead of circular? As in
[Image: FAgf8.png]
instead of
[Image: 8diBa.png]
Reply
Re: Tutorial: joining studs to a non-planar surface
#3
Yes, bottom of cylinder will remain polygonal (the stud itself will be substituted, so the most visible part will be smoothed.) Unfortunately there is no really good solution to that problem. One possibility is to pack cylinder/cyls/cyls2 to form the tube, but since match with the surface can't be perfect, these cylinders must poke inside shape. Not so nice for transparent parts... And it is especially tedious to do for the part author (I know, I've done several parts this way...)
Reply
Re: Tutorial: joining studs to a non-planar surface
#4
Great work on this crazy part, Philo. And thanks for showing how you did it. I made the under studs in 95188 in a similar way but your use of ytruder was much cleverer than what I did (used intersector and hand editing). If I'd seen this first I could have saved some time and I might get a chance to use it if I add more underdetails.

To make things work in POVray you could extend the quad section only down to 8LDU (or whatever) above the ground plane and use primitives to make the final 8LDU. You'll end up with a weird intersection in POVray but I think the result would look better in POVray than just having polygons since the join will usually be in shadow.

eg. http://www.ldraw.org/cgi-bin/ptdetail.cgi?s=95188

Tim
Reply
Re: Tutorial: joining studs to a non-planar surface
#5
Yes, maybe in the final part I'll probably scale up the stud4a... This was written more to document an idea I had than to show the real part design.
Reply
Re: Tutorial: joining studs to a non-planar surface
#6
I figured. But since the question was asked I felt it should be answered Smile

Tim
Reply
Re: Tutorial: joining studs to a non-planar surface
#7
It's worth noting that if you use LDView to do the export to POV, and have curve smoothing turned on for the POV export, then the result will look a lot better. It will still be polygonal, but the sides of the cylindrical section will be smooth shaded at least.

Like so (please view the original, since the JPEG quality setting on the preview is really low):

[Image: 3002.png]
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)