Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

ldr-importer does not import all lego blocks #116

Closed
karelrosseel opened this issue Jan 31, 2016 · 19 comments
Closed

ldr-importer does not import all lego blocks #116

karelrosseel opened this issue Jan 31, 2016 · 19 comments

Comments

@karelrosseel
Copy link

I am working with lego mindstorms and have problems with importoring block form LDD.lego.com please can you try this also.. 2 blocks (T and gyrosensor) are not importing in blender.. attached 'onderdelen.ldr'
problem ldr to blender.zip

@le717
Copy link
Owner

le717 commented Feb 4, 2016

The majority of your LDD export problems can be resolved by updating the LDraw export table. Download this file (source), go to where ever LDD is installed (often C:\Program Files (x86)\LEGO Digital Designer), copy the ldraw.xml file from the zip and replace the one in program files with it. Open LDD, export, then try importing again.

It's not an exact fix, but it help a lot. If it still will not import, then I am unable to help any further.

@karelrosseel
Copy link
Author

Thanks to help me.. I see after the update that an extra blok is showing up.. good, but still not the 'gyrosensor' of lego mindstorms.. who can help me? thanks a lot.
extra
extra-ldd

@CrownedComedian
Copy link

It appears LDD won't even try to write that brick to the .ldr file. I suggest exporting the .ldr file from LDD and then opening it in a LDraw application(I use LDCad) and adding the brick there. You could also manually add the line of code by opening it in a text editor and relocating the brick in Blender. Unfortunately, the brick imported as several objects in Blender, so just select all of the subparts and Ctrl + J.
image

@karelrosseel
Copy link
Author

hi, thanks to help me.. but I does not work for me for the moment.. what do I wrong? I get only crosses.. (I do not know how to work with code in the texteditor) I downloaded http://www.melkert.net/LDCad/download
points-from-ldr-to-ldcad

@CrownedComedian
Copy link

For a quick and dirty fix, copy this line and paste it into your .ldr file(as see in my previous picture):

1 15 0 22 21 1 0 0 0 1 0 0 0 1 99380.dat

If you're interested, here is a link to LDraw's file format documentation. This line of code will make more sense if you read it:
http://www.ldraw.org/article/218

As for LDCad, go to Prefs -> LDraw and make sure the app is finding you part library and config files correctly. You can also get some extra help here:
http://www.melkert.net/LDCad/docs/start

@karelrosseel
Copy link
Author

Thanks, I paste your code and it worked.. unless one block is not showing up.. see previous problem (there where 2 blocks with problems) I attached the picture.
-> also I tried to fix the libary of LDcad with the movie https://www.youtube.com/watch?v=9HTlrNFj6bw but still does not work.. what do I wrong? I see only red XYZ-arrows.. strange?
allmost-ok
ldcad problem

@karelrosseel
Copy link
Author

The extra code does not work for extra blocks because I can not script all the blocks myself..
-> Do you know all the pieces by name? Where is the database located on the web?
-> on bricklink.com there are not all pieces specified https://www.bricklink.com/catalogList.asp?v=2&pg=1&q=EV3&catLike=W&catString=119&sortBy=N&sortAsc=A&catType=P
-> on bricklink.com I found this numbers for the motors, wires,.. https://www.bricklink.com/catalogItemInv.asp?S=31313-1 )
-> on the forum I found an announcement of the new EV3 bricks http://www.eurobricks.com/forum/index.php?showtopic=86274

------I found out Line Type 1-------http://www.ldraw.org/article/218 ----------------------
Line type 1 is a sub-file reference. The generic format is: 1(colored file)
1 x y z a b c d e f g h i filename.dat

Can It be automatically fixed by .ldr importer? I get a 'report: error' in Blender. How comes? Picture and the file with all the sensors attached.

Thanks to help me.
problem+all-sensors-not-showing-up.zip

@karelrosseel
Copy link
Author

The NXT mindstorms does export but not the EV3 mindstorm blocks.. why?
next-versus-ev3-mindstorm-opens-not-in-blender
-> I found also all the bricks in STEP file.. but how can that be imported in color in blender? https://grabcad.com/library?page=1&time=all_time&sort=recent&query=EV3

@CrownedComedian
Copy link

No, I don't know all of the pieces by name because... I don't have to! Every time you select a brick in LDD & LDCad, the part number is shown(see my previous picture). You can search and download(and move them to your parts library) LDraw brick numbers from a small "lookup" box here:
http://www.ldraw.org/library/tracker/

My LDD won't export the EV3 brick to .ldr, which is why I suggested to build in LDD, export to .ldr, then re-add missing parts in LDCad. I'm trying to build less in LDD because of this hassle... and this:
http://brickset.com/article/18789

I downloaded my LDraw parts library from the complete.zip(last download link in the link) from here:
http://www.ldraw.org/parts/latest-parts.html

In my LDCad -> Prefs -> LDraw -> Search (library) paths.. -> Current item properties -> Location = C:\Users\NAME\Downloads\complete\ldraw\ and the Type is set to Official Library. Move this to be first in the search order, hit Accept, then relaunch LDCad.

The eurobrick link was posted in 2013, and in LDD's extended mode, not Mindstorms mode.

Your problem(#116) is not with the importer, but with LDD's .ldr exporter. There's nothing this importer script could do because it doesn't even know to look for the EV3 brick in a direct export from LDD. HOWEVER, you can blame issue #11 for your all-sensors-not-showing-up problem!!!

If you are still reading this and are able to fix everything, I'd love to see your renders!

@le717
Copy link
Owner

le717 commented Feb 8, 2016

Wow, back up the bus. There are multiple reasons for the issues here. I will explain it all ASAP.

@karelrosseel
Copy link
Author

The standard bus (car) you can find it in ldd-designer.com : but my NEW CAR: https://grabcad.com/library/lego-mindstorm-car-with-people-1
and the standard education version:
(the complete list of http://www.ldraw.org/parts/latest-parts.html consist all parts of.. http://gallaghersart.com/page/new_ldd_parts_and_the_ldraw.xml/ ?
That would be nice (becaus wheels, bricks, sensors are all other xml files)
thanks to work it out for me

  • making wires langer of the brick possible?

@karelrosseel
Copy link
Author

model1 ldd
Does anyone knows how to export an .step file into blender (with colors)?

@CrownedComedian
Copy link

Well.................. A while ago I found this tutorial on how to export SUPER realistic models from Mecabrick to Blender:
https://www.youtube.com/watch?v=rCMqcTCfD2c

.................................but... For this importer, I suggest sticking to LDraw, as this issue is kinda getting off topic, sorry.

You don't have to use LDCad, there are other LDraw applications out there.

.............

@karelrosseel
Copy link
Author

Good idea but, MECAbrick only imports files from LDD (.lxf) and than I see the import is also not correct from .lxf to mecabricks.. always strange.. I posted 'missing parts' also because there are no 'EV3' bricks in the list. http://www.mecabricks.com/en/forum/topic/50/22
import-lxf-in-megabricks

@le717
Copy link
Owner

le717 commented Feb 12, 2016

OK, listen carefully.

  1. LDD having issues exporting is not a concern of the script. The problem is the LDD export table, even the one from Gallagher, does not support all the bricks. If you read the site you'll see it says that out of 3,109 bricks in LDD, only approx. 1,770 are supported. The majority of bricks will not export. That is just the way it is. The only way it can be fixed is to have the files correctly defined in the ldraw.xml and it is a very complicated thing to do, something I am unable to do.
  2. The EV3 brick is in LDraw, I did a render of it upon importing it using the script.
  3. LDD will still be available but not updated. That's it. You can still use and download it all you want.
  4. If the script cannot find a part, I cannot do anything about it. Non-existent bricks crash script #11 relates to the entire script stopping upon hitting that case, but that's it. I cannot "search" for it or anything. If it cannot be found then that's just how it is. It is not my fault if you get a "sources not found" issue. The script just does what it is told. Further, that part may not actually be in LDraw or it is under a different number and the XML is wrong. The only precaution you can take is to make sure you have the latest version of the LDraw parts library, as they often update it.
  5. Anything 3D models/Mecabricks I can't help with. Sorry about that.

Hopefully that answers all your questions.

@CrownedComedian
Copy link

That is kinda what I've been saying, I actually still use LDD more than LDCad because most of the bricks I work with safely export from LDD.

...although, it isn't hard to tell the script to jump to the next line if it can't find the file for #11.

@le717
Copy link
Owner

le717 commented Feb 12, 2016

...although, it isn't hard to tell the script to jump to the next line if it can't find the file for #11.

One would think this, but the way the original author wrote it makes it impossible to do so. Trust me, many have tried. It's not possible. :(

@CrownedComedian
Copy link

No, it's possible.

@le717 le717 closed this as completed Mar 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants