We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Unlekker load stl from applet
Page Index Toggle Pages: 1
Unlekker load stl from applet (Read 848 times)
Unlekker load stl from applet
Apr 19th, 2009, 10:34am
 
Hi,
I try to load an STL file with unlekkerLib but the applet want an absolute path. I tried dataPath() and sketchPath() but they returned null when used as an applet. I also tried getAbsolutePath() but it seems to need permission to get the absolute path and I don't want to sign it. Anyone as code to load an STL file in an applet?

Thanks a lot.

Code:
import unlekker.data.*;
import unlekker.geom.*;

STL stl;
FaceList poly;

void setup() {
 size(400,400, P3D);
 stl = new STL(this, "requin.stl");
 poly=stl.getPolyData();
}

void draw() {
 background(0);
 translate(width/2,height/2);  
 noStroke();
 lights();
 poly.draw(this);
}


Code:
java.lang.RuntimeException: RawSTLBinary requires an absolute path for the location of the input file. 

Re: Unlekker load stl from applet
Reply #1 - May 16th, 2009, 3:29pm
 
Hi there. I suspect the problem is that in unlekkerLib I didn't take care to support loading files from a JAR. Try uploading the STL separately in the same directory as the JAR file, and see if that works.
Re: Unlekker load stl from applet
Reply #2 - May 19th, 2009, 1:51pm
 
Thanks for your help and for this amazing library.
I tried all that I could but it didn't work. But now that I know that it's not supposed to, I'm happy :)
If I find something, I will post it here.
Page Index Toggle Pages: 1