JLDraw - a simple LDraw model viewer in Java


JLDraw - a simple LDraw model viewer in Java
#1
Hi people.

As promised in another topic, I share with you my last little program:
JLDraw (on SourceForge).

Presentation topic on Eurobricks

Enjoy! (...and let me know what you think ;-) )

Mario
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#2
In one word: Wow!
It works great here, performance is good, rendering quality could be better (I still prefer LDView Wink ) but it's already quite good and very legible.
I like the hide feature and info panel.
Actually the only thing that bothers me is the "complete.zip" usage. I agree it can be useful for newbies, or to create a standalone, portable viewer (eg. to carry it on a usb dongle), but it's a pain for a regular LDraw user.
Maybe a mouse shortcut for panning?
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#3
Yes, there are 2 different audiences. One is a normal library "customer" who simply wants complete.zip takeaway
and only replace it when we make a new parts release.

The other audience is parts authors who want to simply specify their LDRAW base directory.

It would be really cool if this viewer would let users choose between these 2 options by e.g. a radiobutton
in a configuration panel.
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#4
Does this program run in a Web browser? Is there a demo somewhere?
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#5
No, it's a standalone java application, it doesn't need a web browser (but you need to have a java runtime installed). It can be downloaded on sourceforge at the link provided by Mario.
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#6
Hi Philippe and Steffen,
thanks for trying out JLDraw Smile

I surely can arrange a configuration panel where you can choose what library you want (it needs a refactoring of code to deal with filesystem, not only with a zip archive, but it isn't a problem, requires only perspiration Big Grin ), but in my intentions JLDraw is for normal customer, that wants a "quick and dirty" solution to view a model.

Nevertheless, it is common issue when I download LDraw models from Eurobricks, to say, there are missing parts or submodels, because author checked in his own library installation and there it is fine, but anyone opening model probably has a "standard" library, missing special (custom) parts and submodels. So it can be a check for your model, before release, to open it with "vanilla" standard library and see if all parts are "standard" and all submodels are included.

To check what I say look at this (submodels missing in almost all models, in 6770 there is only a reference to two sub-model, both missing, the model is rendered empty), this (reference to part 6538c.dat, not in official library 2014-01).

Ok, I'm going to code next version, with choice of what library use ;-)

Mario
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#7
Good point... each published model should be a mpd containing all unofficial/custom parts needed (mpd built with MPDcenter or MPDwizard) but only few people do this properly. That brings me to another issue of JLDraw, it doesn't properly display parts embedded in mpd (try for exemple this file that includes many unofficial parts)
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#8
=8O

Thanks for pointing me this. Even if I tested on lots of LDraw models, probably there aren't any with custom part embedded...

Ready for next release in 1000000... 999999... 999998... Big Grin
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#9
Looks like a good start. Feel free to take any code from my previous effort in java:

http://www.scottwardlaw.com/LEGO/LOCAD.zip

Also, feel free to contact me directly lego at scott wardlaw dot com

Scott
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#10
Hi Philippe.
New version is out, with corrected (I hope) handling for custom parts.

I added:
* support for unzipped folder-based LDraw library (official and unofficial)
* pan with mouse (shift-right-click and drag)
* better part identification

As usual on Sorceforge and Eurobricks.


A question: I found some little typos in official part library. Where I can list for future correction?

Mario
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#11
Thank for this update that works good here.

In one of your posts you write: but in my intentions JLDraw is for normal customer, that wants a "quick and dirty" solution to view a model.

In the first version that I tested (jldraw-0.1.0.1.jar) I only had to start the app and load the model to view.

Now I need to configure jldraw myself. That itself is in my eyes a step back. I know the reason for this, but I think there are possibilies to combine both (quick and user configurable).

1) In a good windows configuration there should be a system variable for the LDraw Base Path. I think it would be a good idea to use that value if present.
2) The unofficial folder should be on a good organized system at the defined (unoffical) place (<LDRAWBASEDIR>\Unofficial).
3) Because 1 and 2 can often be set automatically there should be a possibility to change both values separately. I can not see any possibility today!

I hope I could explain my whishes.
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#12
Hi Michael.

You are perfectly right, there was an error in program that ask *at every start* for LDraw folder even if a "complete.zip" exists. That was wrong. I just released v0.2.0.1 that correct this bug.

Now program strategy at first start is (or should be, bugs, bugs everywhere...):
- it checks if a file "complete.zip" is in program same folder: if true, automatically add to available library list
- after that checks if a configuration file exists in program folder (file is created by program, not by user)
- if a configuration file exists, program scan and loads LDraw library from folders listed in configuration file
- if no configuration file is found,
- program ask if you want to add a local LDraw library
- if you click on Yes, program ask for LDraw and ask for an unofficial library folder (optional).
- a configuration file is saved automatically with LDraw folders positions
- program now checks if both zipped and unzipped library exists and are available
- if a local folder exists, program will select it
- if no local folder exists, program select zipped, if any
- if both options aren't available, program will display a warning dialog and exists.

So, if you want only a zipped "complete.zip" program will ask only at first start if you want to add a folder.

Thank you.

Mario
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#13
I did not check yet all options that you described.
I can not change the folder of the library from inside the program. I need to delete the preferece file. Sad
Reply
Re: JLDraw - a simple LDraw model viewer in Java
#14
Hi Michael.

At the moment it is the only option if you want to change path to LDraw folder library. Zipped version of library is autodetected.
I'm a little short of time, in next release I'll add a dialog to allow changing preferences from inside program.

Mario
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)