JBrickBuilder connection model


Re: JBrickBuilder connection model
#15
Ciao Ben.

This thread quickly escalate to a really good ideas sources Big Grin

Ben Supnik Wrote:Prismatic. This is like a rail connector that cannot rotate. 1 degree of translational freedom. Example: a technic axle through a technic axle hole. For prismatic joints, you need more information than just two points to specify the connections, because the complete orientation of the joint matters. For example, if your technic brick with axle hole is rotated, the axle must rotate too or the connection is "wrong".
...
...
Rigid connection - this isn't a "joint" on wikipedia. 0 degrees of freedom, e.g. the two parts are connected in exactly one way. Like the prismatic connection, you need more orientation information than you can get from two points.

I think it is really easy to add these two new type of connection. There's more: thinking to general LEGO parts, there are parts that have prismatic connections but with irregular angles? Let me explain: technic axle is a square base prism, with four positions, all are 90 degree multiple. An 8-teeth gear have exactly 8 positions and so on (a 24-teeth gear, 24, ....) and all positions are multiples of a given angle.

So... think a connection that have two more data:
- a third optional point, that defines a vector going from first (base) point to third point, that must be orthogonal to first vector. Second vector defines an orientation for connection relative to first vector axis, defining a rigid connection where base points of two parts must be coincident and the two orientation vectors must be aligned (lying on same line). Et-voilĂ , rigid connection.
- an integer number that defines the number of "faces" that have the prismatic connection. If number is 1, or omitted, it is a rigid connection. Starting from 2 it defines available positions for connection: 2=180 degree (up or down, left or right), 3=120 degree, 4=90 degree (axle and axlehole), 8=45 degree (an 8-teeth gear). Positions are relative to the second vector orientation, so second vector define initial position of rotation on first vector axis. Ladies and Gentlemen, prismatic connection.

But, if you see, rigid connection is a prismatic connection with only one "side", so we need only one new connection type.

There is only an assumption: that prismatic connections are all based on regular polygonal base prism, or that positions in one connection are all multiple of same angle.

Now, we have a bonus if we can derive gear connection from prismatic:
- first vector is gear rotation axis
- second vector defines "0" position and gear pitch diameter (see http://en.wikipedia.org/wiki/Gear#General_nomenclature) or the distance of connection for other gear
- integer defines number of teeth (or prismatic connection "faces"/positions)

To connect two gear:
axes (vector 1) aligned (abs(dot product)==1) AND
distance between axes == pitch_diameter1+pitch_diameter2
next, rotate gear2 to match teeth of gear1:
- 8 teeth with 8 teeth: rotate second to 1/2 of 360/8 degree relative to orientation of first gear
- 8 teeth to 24 teeth: rotate second of 1/2 of 360/24 degree or rotate first of 1/2 of 360/8
and so on...

Now: there are connection that are prismatic but irregular? I.e. two position, one at 30 degree and one at 90 degree. If a such connection exists, we need a lot more complex model. But a such connection can be reduced to TWO rigid connection with same center point.

What do you think? It can be starting point?

Mario
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: JBrickBuilder connection model - by Mario Pascucci - 2015-02-04, 9:25

Forum Jump:


Users browsing this thread: 1 Guest(s)