To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 11814
11813  |  11815
Subject: 
Re: on Collision, stop Movement
Newsgroups: 
lugnet.cad
Date: 
Wed, 18 Aug 2004 22:56:53 GMT
Viewed: 
1201 times
  
In lugnet.cad, Jeff Findley wrote:
In lugnet.cad, Andrew Allan wrote:

To add my 2 cents worth, I've tried a few experements within MBC for making
parts clickable where I defined "male" and "female" connection points within the
brick (i.e. STUD = male). Ignoring the sheer number of ways even a brick as
simple as the ubiquious 2x4 can be connected the real barrier I ran into was
with geometry.


You need to have the user pick more than just the "male" and "female" locations.

To clarify, my system consideres each connection point as a vector with a
defined point of origin. The vectors are perpendicular to the stud axis. In this
way a brick can rotate about the vector (or stud) and still be aligned just like
real life. Using vectors however fails in special cases such as ball joints
(however they only represent a limited number of situations).

As for the roation issue (about the axes of the "male" and "female" locations),
one way to do this is to define a default vector perpendicular to the axis of
the "male" and "female" axes, then have the user specify a rotation angle to
use.  To make it easier on the user, you could define multiple vectors (e.g. for
a stud on a 2x4 brick, you'd have two vectors, one parallel with the short side
and one parallel with the long side), then have the user click a "rotate" icon
until the brick being moved is oriented correctly.

Here I apply a seperate male vector for each stud on the top of the brick and a
seperate female vector for each receptor (in the case of a 2x4 brick we get 8
male vectors and 11 female).

For other connections such as technic pins differently named vectors are used.

Now for the parts to "click" the compatible male and female vectors need to
align (both spacially and directionally).

Here's where the complexity comes in. Let's assume the process is manual (ie you
select the two bricks to join and issue a command - my first idea).

By comparing seperation distance (in 3d) of each male and female vector (from
both bricks) one might assume that the shortest stud to receptor distance is the
one the user intends to connect (hey it's only a guess).

Then the brick to be placed is moved so that the two vectors selected by the
application now have the same origin (so far quite easy).

If the bricks are aligned, then the job is done. However, where this type of
feature is useful is where the bricks aren't aligned. Now the program will need
to rotate the brick being placed through upto 3 axis to align the studs.

Firstly this needs some consideration. For most bricks the studs are
perpendicular to the "Y" axis, so the rotation order would be say X, Z and Y if
necessary (brick relative), however for studs not on the Y axis another order
would be better.

Having rotated the X & Z axes the bricks will now be in the same plane but not
necessarily with the studs aligned. The final rotation in the Y axis must align
the studs (not necessarily trivial).

Throughout the above process there is lots of margin for the "click" sequence to
wrongly guess the user's intention thus having the brick placed in the wrong
place or incorrectly aligned (rotated the wrong way). To minimise this the user
should therefore have their bricks "best fit" aligned previously.

This is also quite mathematically intensive, so serious computing power would be
needed to make a system which is "real time" (especially on a complex model)

Andrew...



Message has 1 Reply:
  Re: on Collision, stop Movement
 
(...) I was addressing this issue from the user's point of view. The math of the transformation matrices needed to carry out the user's intent is a detail I do not wish to cover (it's only coding, right?). I am only trying to define a minimum set of (...) (20 years ago, 20-Aug-04, to lugnet.cad)

Message is in Reply To:
  Re: on Collision, stop Movement
 
(...) You need to have the user pick more than just the "male" and "female" locations. To get the two bricks on top of each other (instead of inside each other), the "male" and "female" locations ought to have some concept for up and down. For parts (...) (20 years ago, 18-Aug-04, to lugnet.cad)

23 Messages in This Thread:








Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR