Hi, Quoting Leonardo Zide (2013-07-17 01:06:01) >> Would you accept a patch which adds simple slopes as well? > All patches are welcome.
I found it quite hard to add functionality to add more functionality to the C++ version. Probably especially because of lines 80-160 which are quite cryptic to me. So I went another way and implemented a small Python script which does the same thing. It turned out that emulating the functionality of the C++ program was possible with just 50 lines of Python (compared to 200 lines in C++). This is probably due to the fact that my Python code makes heavy use of Python specific features. I then extended the script and it can now generate everything partsgen.cpp can plus: - 36 different slope bricks - bricks which are as high as 5 normal bricks - corner bricks Especially handling slopes turned out to be *very* tricky and I spent 300 lines of code on it. You can see an overview of the 102 generated parts as solid and wireframe renderings here: - http://mister-muffin.de/p/p36V.png - http://mister-muffin.de/p/tda4.png You can download a zip archive with the parts here: - http://mister-muffin.de/lego/parts-minimal.zip The software that generated it is available here: - https://github.com/josch/lego-parts-generator I do not plan to add any more pieces than those which are currently generated. All pieces are very rudimentary and I just wanted to get the basic shape right for building simple models. I dont think there are any pieces left which would be easy to generate. After testing the result more, I might convert this code into a Debian package to provide a DFSG free parts library which can be used by other programs but contains a few more pieces than the leocad parts library. Leocad is of course free to use that library as well. If there is an easy way to convert ldraw parts libraries to leocad format, the binary package could offer both versions. What do you think? cheers, josch _______________________________________________ Leocad mailing list [email protected] https://list.gerf.org/listinfo/leocad
