I took a quick look and the library generated by the python script is huge because it doesn't use primitives and generates all vertices so I can't just it as it is. Do you think you can update it to generate stud*.dat primitives and include them instead?
I'll add a second library search parth configurable with qmake as well. On Tue, Sep 9, 2014 at 11:52 AM, Johannes Schauer <[email protected]> wrote: > Hi Leonardo, > > Quoting Leonardo Zide (2014-09-09 20:31:21) > >> Can leocad yet make use of the raw ldraw format or must there be some > >> conversion into its own format beforehand? > > > > It can use LDraw's library directly, see > >http://leocad.org/trac/wiki/PartsLibrary > > I see. Indeed running > > leocad -l /usr/share/ldraw-parts > > works! > > >> If it can make use of the raw ldraw format, then maybe the leocad Debian > >> package can "Suggest" the ldraw-parts package? (it cannot "Recommend" it > >> because then leocad cannot be in "main" anymore). > >> > > > > Sounds good to me. > > The wiki page lists *.bin files as the default library paths. Can leocad > search > more than one path? Maybe the Debian package can be adjusted to look into > /usr/share/ldraw-parts so that it picks up eventual files there in case the > ldraw-parts package is installed. > > >> Unfortunately I don't seem to be able to do this conversion as I'm > getting: > >> > >> Unknown parameter: --convert > >> > >> What is the problem? > >> > > > > That option has been removed since the library format is now the same. > > I see. > > I can file a bug report about this and the path issue above with Debian. > > >> If you do not think that either the script or the generated parts > should go > >> into leocad itself, then I can package the software for Debian main and > the > >> leocad package can then depend on it. > >> > >> What do you think? > >> > > I like being able to run without any external files so having the > generated > > library in C++ is great for that but I don't plan to add new bricks to it > > anymore. Since you have the python script I think I could make a custom > build > > step to generate the library, zip it and convert the zip file to a data > array > > like I do with the color and minifig configs. > > > > Another option would be to convert your script to C++, I can look into > that > > as well but then I won't get any updates to your script in the future. > > > > Which one do you prefer? > > The first option sounds like the better one. It does not sound like a good > way > to spend anybodies time to convert a Python script to C++ :) Before you go > that > route, it would be easier to just store the zipped result of a run of the > Python script. The disadvantage would be the same as with the conversion > to C++ > (harder to get updates) but the advantage is that this approach needs less > time. > > As for the first option: since leocad also has to work on non-Debian > platforms, > you probably want to integrate a copy of the python script into leocad. In > that > case, should I ever add more parts to the script, I will send you a patch. > > If the first option is hard to implement (because of the bit where you > have to > convert the zip file into a data array) then I can also just package the > script > for Debian and then leocad can pick up the parts just as it does with > ldraw-parts. In that case, leocad does not need to change anything while > Debian > users still have a larger default set of parts. > > cheers, josch >
_______________________________________________ Leocad mailing list [email protected] https://list.gerf.org/listinfo/leocad
