# LDraw.org Discussion Forums

Full Version: Working with primitives in Patterns
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Daniel Görner Wrote:[...] Just the connection between both: unmatched edges around the squarecirclethingy. How do i avoid that? [...]

I guess that you called edger2 with wrong parameters.

Try something like:

Code:
`Edger2.exe -l E:\LDRAW -s  primtest.dat primteste.dat`

where "E:\LDRAW" have to be substitued with the correct location of your LDRAW folder.

PS: Keep in mind that primitives have 4 digit decimal point accuracy. If you multiply it with a non-integer (like 1.5) the multiplication will lead to a 5th digit behind the decimal point. Normally you do not use these precision for the adjacent triangles.
Chris Dee Wrote:Could you post a file just showing this problem?

I did. Post 3 of this thread.
We have an adaptor ring (4-4aring.dat) to go from hi-res to lo-res (outside to inside). Do we have one to go from lo-res to hi-res? And if not, what would be better? Just put a hi-res ring and a lo-res ring together causing overlaps as in 4150ps5, or just use the hi-res ring and fill the gap to the edge of the part with triangles?

I'm just asking because I'm trying to redo 4150ps5 almost entirely with primitives (I had to write some 48 primitives myself, I just hope I did it right, please check the attached files) to make it look more like the actual pattern.
For patterned parts, I personally think overlapping would generally be better. Having said that, I suspect that this is a rare occurence. I assume that the only reason that hi-res primitives were used in 4150ps5 was due to the 6-way symmetry in the middle. Normally there wouldn't be a hi-res primitive inside a lo-res one.

It's worth noting that 4-4aring.dat has a logical thickness of 0. (Both the 48 circle and the 16 circle have a radius of 1 LDU.) And while an adaptor ring could be made that goes the other direction, it would be required to have a logical thickness greater than 0, and I suspect would be quite difficult to set up and use.

Note: I was not aware of 4-4aring.dat, so it isn't currently supported by LDView. However, it should be pretty trivial to add support, so I'll try to get that into the official 4.2 release.
Travis Cobbs Wrote:Note: I was not aware of 4-4aring.dat, so it isn't currently supported by LDView. However, it should be pretty trivial to add support, so I'll try to get that into the official 4.2 release.

I've just stumbled over it, because LPC offered it.
IMHO present 4150ps5 is already pretty good!
I am not a great fan of primitives in patterns, as it is often impossible to properly match triangles to rings, you have to be very careful. In 4150ps5 you have a similar problem to match the hires ring to normal resolution part edge, I agree with Travis that overlap is the best way to do it.
Daniel Görner Wrote:I'm just asking because I'm trying to redo 4150ps5 almost entirely with primitives (I had to write some 48 primitives myself, I just hope I did it right, please check the attached files) to make it look more like the actual pattern.
No, you didn't. To have good matching between all primitives, they must all use the same rounding. I strongly suggest that you use PrimGen2 to create primitives.
Philippe \Philo\" Hurbain Wrote:IMHO present 4150ps5 is already pretty good!

No, the proportions are completely wrong.

Philippe \Philo\" Hurbain Wrote:I am not a great fan of primitives in patterns, as it is often impossible to properly match triangles to rings, you have to be very careful.

Me too, at least, because I'm still in the learning process, and the stuff I did the whole day I could have done with triangles in a few minutes. But I understand, that a version with primitives is preferred, because it's a lot smaller. But I need up to 5 rings per segment to get the width that I want, this is also "not so good". If I don't like what I get out of that, I'll go back to triangles.

Philippe \Philo\" Hurbain Wrote:I strongly suggest that you use PrimGen2 to create primitives.

GAWD! Why do I find out about a tool AFTER I spent hours and hours to find out how I can do it with the stuff I know??? I made the rings with LPC... If this forum had emoticons, you'd see here one that smashes its head with the keyboard.
Quote:But I need up to 5 rings per segment to get the width that I want, this is also "not so good". If I don't like what I get out of that, I'll go back to triangles.
Yes, compactness of code is good, but part complexity (number of triangles) is even more!
Quote:If this forum had emoticons, you'd see here one that smashes its head with the keyboard.
;o)
I definitely go back to triangles, because I only have to make a 12th of the pattern which can be mirrored and rotated. Using primitives I'd have to use BFC INVERTNEXT which would result in even more code. And the subpart can be used in other parts like this.
You should never have to use BFC INVERTNEXT for a two-dimensional primitive (disc/ring/ndis).
Pages: 1 2 3