LDCad Idea for an LDCad script


RE: Idea for an LDCad script
#16
(2022-01-10, 1:46)N. W. Perry Wrote: At least, I think it would. Rolleyes

I could think of the collision detection as an indicator to end a directed move or directed rotation. This would allow something like "move/rotate in this direction until the first collision occurs, remember the colliding triangles and try to get (approximate? calculate?) the one-directional move/rotate value" as in the following examples: move green block to the right along the red line until it reaches the black block (becomes blue) or rotate the green block around the bottom left edge clockwise until it reaches the black block (becomes cyan).
   
Doing one move and two rotations like this, I would guess a model could be set to ground (or aligned to any other part) automatically.

The following would be much harder: move until there is no collision. Most of the time there will be at least a small overlap, so the target position will not be found (with my algorithm):

.png   Screenshot2.png (Size: 2.47 KB / Downloads: 112)

Maybe the last one could be solvable by something that does volume intersection by trying to minimize the volume that intersects. As far as I understand LDraw, a volume model is not (directly) available as invisible boundaries are not included (like the bottom of a stud or the upper end of the two inner 3002 tubes). And so far my collision detection has only very little knowledge of volumes. Wink
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Idea for an LDCad script - by N. W. Perry - 2021-12-31, 21:13
RE: Idea for an LDCad script - by Owen Dive - 2022-01-03, 0:18
RE: Idea for an LDCad script - by N. W. Perry - 2022-01-06, 19:57
RE: Idea for an LDCad script - by Stefan Frenz - 2022-01-10, 8:39
RE: Idea for an LDCad script - by N. W. Perry - 2022-01-10, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)