DrJB Posted April 16, 2015 Posted April 16, 2015 This topic/question has been on my mind for a while. I must warn, this might not be for the fain of heart. In reality, there are three main/distinct parts. These are: Inventory/Identify all the possible connections in Lego 1. Axle vs . Axle hole 2. Pin vs. Pin hole 3. Stud as in system bricks 4. Spherical ball joints as in technic tow ball 5. Ball/Socket as in Hero Factory 6. Dual small pins of Lego Factory 7. 2mm bar vs. hole in technic bricks' studs 8. ... I'm sure there are few more Now, once all connections have been identified, organize 'all' parts based on the type of connections they have. 1. Parts could belong to a single sub-group as in axles/bushings 2. Parts that have 2 types of connections (common amongst technic parts) 3. Parts that do not mate with anything else but parts within their own family (e.g. 90617/90622) 4. Else? Last, build a connectivity matrix of that list, for a given part, all other parts that could mate with it. Some skills in Math/Programming might be needed Any brave souls out there? Quote
Tommy Styrvoky Posted April 16, 2015 Posted April 16, 2015 what about studs in pin holes?, and pins in underside of bricks?, they are both "illegal"techniques, but provide a connection. Quote
DrJB Posted April 16, 2015 Author Posted April 16, 2015 Sure, we can start with the legal techniques only then extend, or go full-fledge legal/possible and see where that leads us. This is for sure an 'academic' excursion/distraction and for sure there are people here with the right background. If you pause a minute and think about it, the people who designed LDD had to start with some sort of algorithm that handles connectivity first. Quote
dr_spock Posted April 16, 2015 Posted April 16, 2015 Not sure stud in liftarm hole is illegal. Some Technic sets do that for markers, head and tail lights using 1x1round trans-color studs. Maybe this should be in General. Some of sci fi folks do a lot of crazy connections. Quote
Captainowie Posted April 16, 2015 Posted April 16, 2015 A lot of this work has already been done for the LDraw system of tools. See http://www.ldraw.org/reference/specs/lcd/ Quote
Gabor Posted April 16, 2015 Posted April 16, 2015 http://bramlambrecht.com/tmp/jamieberard-brickstress-bf06.pdf You can find information about studs and technic holes behind this link. It's not always illegal. Quote
DrJB Posted April 16, 2015 Author Posted April 16, 2015 (edited) A lot of this work has already been done for the LDraw system of tools. See http://www.ldraw.org...ence/specs/lcd/ Thank you for the reference. That is indeed a very good read, and very much in line with what I was thinking. Again, if one pauses and thinks a bit more about the whole lego system, there is way more TLG does than just molding plastic (reminds me of another thread). Such connectivity database must be hardcoded within LDD, and yet none of this exists in the LDraw based suite (anyone knows otherwise?). Given that for any given connection, any male part can mate with a multitude of female parts (and vice-versa) complicates the math considerably. Because for any connection, there are ensuing degress-of-freedom (I'm sure Sergio SR3D has already stumbled upon this) that are allowed or not. For example pin+hole has only rotation, but must also account for smooth/friction. Likewise, the tow ball connection has 3 rotations as DOFs, but they are limited in range. So, for each type of connection, one must specify the degrees of freedom, the range/bounds for each of those, and whether they are tight/loose. The more one thinks about this, the more one appreciates (gets humbled by) the effort the TLG programmers (and mathematicians) had to invest into LDD. Connectivity itself is only the beginning, as on top of that, there ARE always exceptions: a 2x1 tile cannot mate with a liftarm (illegal in LDD), but two 1x1 tiles can (side by side). This means that the connectivity matrix (or database) not only handles general principles/connections, but most likely every single part combination ! One of the 'events' that got me thinking more about this is, I was building the yellow Aventador in LDD, and on the car's underside, the author uses the old differential, coupled to a transmission ring. Essentially as below: + + While building gear boxes, LDD lets you move the coupler (center part) left/right to engage either gear. If you try to engage the driving ring into the differential, LDD won't let you. Some call this an LDD bug. To me, it makes me appreciate even more the amount of work TLG must invest to make new parts available in the LDD palette. It is way beyond geometry only. The connectivity has to be right, and I'm sure there are many other part attributes I/we haven't even thought about. I said enough for a post. Who's next? Edited April 16, 2015 by DrJB Quote
Captainowie Posted April 16, 2015 Posted April 16, 2015 none of this exists in the LDraw based suite (anyone knows otherwise?). This has actually been implemented by several authors. You already mention SR3DBuilder, but LDCad manages connections as well (I believe using a slightly different methodology). There are also other lesser known applications that do this. There are several threads in the LDraw forums (http://forums.ldraw.org/index.php, particularly in the Official File Specifications/Standards and LDraw Editors and Viewers subforums) that discuss this in great detail. I have not used LDD, so can't comment there. Quote
Boxerlego Posted April 17, 2015 Posted April 17, 2015 You forgot about the Door rails along with the Bricks that have groves for sliding type connections. Quote
DrJB Posted April 17, 2015 Author Posted April 17, 2015 You're right. I guess I was focusing on mainly technic and few system, but if you look more, I'm sure there are many types of connections possible out there, some we might have not thought of yet. This has actually been implemented by several authors. You already mention SR3DBuilder, but LDCad manages connections as well (I believe using a slightly different methodology). There are also other lesser known applications that do this. There are several threads in the LDraw forums (http://forums.ldraw.org/index.php, particularly in the Official File Specifications/Standards and LDraw Editors and Viewers subforums) that discuss this in great detail. I have not used LDD, so can't comment there. Very interesting read indeed. Bookmarked for tomorrow's lunch break. Quote
dr_spock Posted April 17, 2015 Posted April 17, 2015 How about no connection? My roof is basically held on by gravity. Turn the house upside down and it falls off. Quote
DrJB Posted April 17, 2015 Author Posted April 17, 2015 (edited) You' right, and all this connectivity makes sense in the context of developing software that handles all the connections. Or at least, that is how the discussion might evolve. That said, i do not know of any Lego CAD program that knows about gravity or which was is up. LDD is the only one that does not tilt the z-axis, but I'm sure this was done to be easy on the young lego audience. That said, you can be assured that your roof will not fall off :) Edited April 17, 2015 by DrJB Quote
Lipko Posted April 17, 2015 Posted April 17, 2015 (edited) Likewise, the tow ball connection has 3 rotations as DOFs, but they are limited in range. So, for each type of connection, one must specify the degrees of freedom, the range/bounds for each of those, and whether they are tight/loose. The more one thinks about this, the more one appreciates (gets humbled by) the effort the TLG programmers (and mathematicians) had to invest into LDD. Connectivity itself is only the beginning, as on top of that, there ARE always exceptions: a 2x1 tile cannot mate with a liftarm (illegal in LDD), but two 1x1 tiles can (side by side). This means that the connectivity matrix (or database) not only handles general principles/connections, but most likely every single part combination ! I think the angle limitation can be solved with the basic collision detection LDD already has, no need to have separate data. Plus I don't think every part is added to a huge database and connectivity matrix, I think having having some kind of invisible connecting primitives added to the part models is a better way. Every part has a visible and collision meshes (I guess they are the same) and have some connection primitives too, which are invisible and override collision near or inside the connection mesh (I guess) in case of a connection is found. The connections doesn't have to be perfectly aligned for LDD to recognize it's a connection, so I guess for recognition, LDD uses a simple cylinder-cylinder collision detection method (and I also think that the snapping feature is separate from the recognition feature. The snapping perfectly transforms the parts). I can imagine that you only need a few types of the connection primitives and pairs. Maybe the stud+pinhole restriction between two parts is simply solved by maximizing the allowed contact number of such type to one. I have another argument against a connectivity matrix on a part-by-part basis: Unimog tire and rim bug. If they are not orientted in the same way (the polygon-approximated connecting cylinders are not in the same angle), LDD detects it as a collision. I guess the tiny, but numerous collisions of the corners in the approximated circles collide. Edited April 17, 2015 by Lipko Quote
Boxerlego Posted April 17, 2015 Posted April 17, 2015 How about no connection? My roof is basically held on by gravity. Turn the house upside down and it falls off. The old set in place held by gravity connection. That is a good one Dr_spock, Lots of LEGO parts can fill this role. You're right. I guess I was focusing on mainly technic and few system, but if you look more, I'm sure there are many types of connections possible out there, some we might have not thought of yet. Here is another a connection that is unique for LEGO, the Light saber Bar connections. The ideal connection with the bar is usually with a clip like that on the 1x1 brick. However that not the only connection the bar can make and basically any open Studd hole the Bar can make a tight fit with it. Also if you have the right friction pin you can also insert the Bar inside that Technic pin as well but not every friction pin this will work on. Quote
Boxerlego Posted April 25, 2015 Posted April 25, 2015 What about Stud connectivity? There are many avenues to go about building with them. Here is just a few? Quote
Erik Leppen Posted April 25, 2015 Posted April 25, 2015 (edited) - clips and bars (modern hinges) - old 2 and 3 finger hinges - hinge brick 1 x 2 - bars and the half-pin - the half-pin and flex axle ends - clips can hold tiles [and plates?] - tiles [and plates?] can be put vertically between two studs on a brick/plates, although this may be "illegal". - power function cable ends, old 9V cable ends and Mindstorms cable ends - unimog ball joints - wheels and tires... - the CV joint - pulleys and rubber bands - the old toothed angle connectors, toothed bushes and technic 1xN plates - knob wheels - the very old gears - 8880 ball joints and hub elements - the 8466 black wheel connector, CV joint spindle and yellow housing element with ball joints - pneumatic tubing and everything they connect to (including connectors and bars) - fibre optics cable and corresponding light brick - flex system ends and cables. Flex system cables and soft axles - the bottom of the new brick separator fits on 2xN plates - you can put a normal Technic pin in the bottom of a 1x1 brick, but that might be illegal. Somewhat more far-fetched, but technically they are connections: - the halves of a turntable [each type separately] - the Unimog hub spindle and housing element - the plug in the old 9V train controller ;) Edited April 25, 2015 by Erik Leppen Quote
anoble Posted November 3, 2019 Posted November 3, 2019 DrJB, I am currently working on a similar project. I have had converted ldr released files of Lego sets in a dataset and realized all the transformation matrix to get the vertices, so that I can analyze Lego architecture. I am currently reviewing my work, before diving into a connector database analysis. Anyone willing to tag along in this review? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.