Experimental part snapping in LDCad 1.3


Re: snapping primitives
#9
Also the needed information can differ a lot depending on what you want to do with it. In my approach I've choosen to describe shapes instead of connection types. So the software doesn't know anything about studs/pegs etc, it's only matching shapes against other shapes.

For example this is info I'm using for the 5.5 axle.

0 !LDCAD SNAP_CYL [gender=M] [caps=none] [secs=A 6 18 R 8 2 R 6 8 A 6 80] [center=true] [pos=-1 0 0] [ori=0 -1 0 1 0 0 0 0 1] [slide=true]

The engine will test this against other shapes, and if it fits it will snap to it along it's y axis. The above will go (partly) into a peghole because it's shape is simular (they share a radius 6 section, and the other sections are larger):

0 !LDCAD SNAP_CYL [gender=F] [caps=none] [secs=R 8 2 R 6 16 R 8 2] [center=true] [slide=true] [pos=0 0 0] [ori=1 0 0 0 1 0 0 0 1]


I've tried using as many primitive's possible for defining the info but I'm somewhat disappointed on that subject. It seems many primitives are 'misused' somewhat degrading their snap information on the higher level. For example the axle.dat primitive seems to be used for internals alot (Isn't is mend to be used open ended only?). Also some primitives are used mirrored (messing up orientation) although I managed to compensate for that somewhat. And finally there are a lot of parts that don't use primitives where they should, for example most tehcnic beams are missing the last peghole if only inherited info is used.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
snapping primitives - by Steffen - 2013-12-12, 4:57
Re: snapping primitives - by Ben Supnik - 2013-12-13, 2:27
Re: snapping primitives - by Roland Melkert - 2013-12-13, 18:28
Re: snapping primitives - by Ben Supnik - 2013-12-16, 1:31
Re: snapping primitives - by Roland Melkert - 2013-12-16, 2:27
Re: snapping primitives - by Roland Melkert - 2013-12-12, 18:05
Re: snapping primitives - by Philippe Hurbain - 2013-12-12, 18:53
Re: snapping primitives - by Travis Cobbs - 2013-12-12, 19:01
Re: snapping primitives - by Philippe Hurbain - 2013-12-12, 19:12
Re: snapping primitives - by Roland Melkert - 2013-12-12, 19:24
Re: snapping primitives - by Philippe Hurbain - 2013-12-12, 19:56
Re: snapping primitives - by Michael Horvath - 2013-12-12, 23:06
Re: snapping primitives - by Roland Melkert - 2013-12-12, 21:07

Forum Jump:


Users browsing this thread: 1 Guest(s)