Hi Ben.
Violation of primitive semantic meaning is one aspect. One other is how to "detect" as more connection points as possible without complex/extended math/geometric computation.
Some examples:
- stud4.dat/stud4a.dat (underside tube): I chose to assign five connection points to this primitive: one stud receiver for center hole and four stud receiver at top left/right and bottom left/right. Parts like 3062b, 4073, 15279, 2569, 3957b gets right connection points, but when a plate 6x6 is analyzed by connection detector, it gets 125 underside stud receiver, because every stud4.dat gets 5 connections, but some are duplicated: two adiacent stud4a have two coincident connection, so I use a trivial duplicate check to avoid connection duplication.
- stud3.dat (underside pin/stud): used in 1xn bricks, plates and tiles, I chose to assign three connections: two stud receiver on sides and a pin-to-open-stud connection on pin base. In a 1x4 brick there are three stud3.dat, so there are two duplicated connection on adiacent pins, that duplicate checker detects and removes, but still connection placement is wrong in lots of parts because I chose to put connections on left and and right sides (along X-axis), when in some part pin is rotated or part is designed along Z-axis, so connection are wrong placed. No easy correction is available, so I need to do a visual check and manual editing.
- 1x1 bricks, plates and tiles: no primitives can be used to place a connection, because all of them uses basic shapes, like box5.dat.
At the present status of library I didn't find a simpler and safe way to detect connections from primitives, this is why I made a connection editor and a connection library.
Surely it is a my limit, and a limit in my coding/math/geometric skills. I don't even think to propose my model as a standard for LDraw library. I released specifications, code and sample only in hope that it was useful to anyone. Nothing more.
Mario
Violation of primitive semantic meaning is one aspect. One other is how to "detect" as more connection points as possible without complex/extended math/geometric computation.
Some examples:
- stud4.dat/stud4a.dat (underside tube): I chose to assign five connection points to this primitive: one stud receiver for center hole and four stud receiver at top left/right and bottom left/right. Parts like 3062b, 4073, 15279, 2569, 3957b gets right connection points, but when a plate 6x6 is analyzed by connection detector, it gets 125 underside stud receiver, because every stud4.dat gets 5 connections, but some are duplicated: two adiacent stud4a have two coincident connection, so I use a trivial duplicate check to avoid connection duplication.
- stud3.dat (underside pin/stud): used in 1xn bricks, plates and tiles, I chose to assign three connections: two stud receiver on sides and a pin-to-open-stud connection on pin base. In a 1x4 brick there are three stud3.dat, so there are two duplicated connection on adiacent pins, that duplicate checker detects and removes, but still connection placement is wrong in lots of parts because I chose to put connections on left and and right sides (along X-axis), when in some part pin is rotated or part is designed along Z-axis, so connection are wrong placed. No easy correction is available, so I need to do a visual check and manual editing.
- 1x1 bricks, plates and tiles: no primitives can be used to place a connection, because all of them uses basic shapes, like box5.dat.
At the present status of library I didn't find a simpler and safe way to detect connections from primitives, this is why I made a connection editor and a connection library.
Surely it is a my limit, and a limit in my coding/math/geometric skills. I don't even think to propose my model as a standard for LDraw library. I released specifications, code and sample only in hope that it was useful to anyone. Nothing more.
Mario