PDA

View Full Version : STL files



juan
08-13-2003, 01:40 PM
does anyone know of a way to export an STL file from lightwave(mac)

mlinde
08-13-2003, 02:29 PM
What is an STL file? If you are referring to the SGI Standard Template Library, I'm going to say no, there is no way to export to this format. If you are referring to something else, I need more information to be able to assist with that question.

Triple G
08-13-2003, 03:34 PM
Check the front page of Flay.com. Chrome Cow just released a bunch of LScripts that will import and export STL (Stereo Lithography) files. The site says they're untested on a Mac, but seeing how they're Lscripts, they should work.

pauland
08-17-2003, 08:48 AM
Originally posted by juan
does anyone know of a way to export an STL file from lightwave(mac)

I don't have a Mac, but I know that 3D explorer can do it.

Paul

noiseboy
08-17-2003, 05:40 PM
Originally posted by Triple G
The site says they're untested on a Mac, but seeing how they're Lscripts, they should work.

for what its worth these lscripts do not work with 7.5c on mac os x. I think this may be down to Lscript being broken on the Mac rather than the script.

noiseboy
08-17-2003, 05:57 PM
just as an update (and to partially confirm my suspicions) the STL import works in ascii mode in vanilla 7.5 and so does export in ascii mode. What are the chances of lscript being fixed before LW8?

mlinde
08-17-2003, 06:27 PM
Originally posted by noiseboy
just as an update (and to partially confirm my suspicions) the STL import works in ascii mode in vanilla 7.5 and so does export in ascii mode. What are the chances of lscript being fixed before LW8?

You'd have to take that up with Chuck or the development team. The easy solution (if they could do it) would be to downgrade LScript to 2.5, which shipped with 7.5. 2.5.1, 2.6, and 2.6.1 had nasty errors on the Mac. If you want to do this yourself, you should be able to grab the file "lcore3.shlb" from the original 7.5 CD (if you have one).

Make SURE you keep your current lcore file, in case this hack doesn't work!!!!

ChromeCow
09-09-2003, 07:36 PM
Hi All,

I wrote those STL imp/exp tools, and not having access to a Mac, I just guessing here, but I think the problem boils down to how Intel & Motorola write out binary number (big-endian vs. little-endian).

Might be able to work around that, but it's tough without a test bed.

Sorry. LScript is a great cross-platform tool, but once you get down to the metal, the differences start to show.

Sean Hyde-Moyer
www.chromecow.com

ChromeCow
09-11-2003, 05:43 AM
I'm going to try to add Mac support for the STL tools. I'll need an STL file created and saved on the Mac.

If someone can make a simple object (a sphere would do) and zip it up & post it, I can get started.

Thanks,
Sean Hyde-Moyer
www.chromecow.com

noiseboy
09-11-2003, 06:21 AM
attached is a 50mm sphere exported out of Ashlar-vellum's Argon modeller as a ascii stl file. I hope it may be of some use.

tapsnap
09-11-2003, 11:46 AM
The script seams to work fine on the Mac version of 7.5b. In fact I've been sending out files every day this week to have models made. So far everything is fine except for my own modeling inadequacies; ie. overlapping polys, holes, etc.

ChromeCow
09-12-2003, 05:33 AM
Thanks noiseboy. Can I ask a favor, can you give me the same thing in Binary? That seems to be where the trouble is.

tapsnap: Yes, if my theory is correct, you should have no problem exporting. The only problem would be if you tried reading an STL generated by another application on the Mac. I'm glad to get confirmation that the export works. Yay.

If I can get a binary created by another app on the Mac, I should be able to fiddle with the bits to get it reading properly.

If anyone else has had success or failure with the scripts, please let me know.

Thanks!
Sean.

noiseboy
09-12-2003, 06:54 AM
I believe the attached file is a STL binary of my carefully modelled 50mm sphere. It'll probably end up on e-bay. HTH

ChromeCow
09-13-2003, 06:40 AM
I have fooled you into modeling a sphere for me. Woot!

Thanks...I hope this gives me the info I need to make the changes. I may need some testing down the road...I'll post when I have code.

Thanks,
Sean
www.chromecow.com

ChromeCow
09-13-2003, 07:00 AM
The sphere imports just fine on the PC. Hmmmm.

Noiseboy, can you try importing the sphere with my script and tell me:

1) If it fails to load

and if so

2) How it fails to load?

Man...this is like working in the dark with mittens on.

Sean.

noiseboy
09-13-2003, 08:45 AM
Ok here's whats happening.Running 7.5c on Mac Os 10.2.6. Running the STL import script the following error pops up;
>>cannot read file " thefilepath"<<
If I run the script on another machine with vanilla 7.5 then the ascii import works but binary import comes up with the following error;
>>line 179, invalid argument 3 type to addpoint()<<
By the way Sean thanks for making the effort to make this Lscript Mac compatible. I guess I'm going to have to keep several versions of LW on my machine.

mlinde
09-14-2003, 11:23 AM
Hey guys.
Hi Sean.
The issue is with LScript in 7.5c. I'm sure Sean is using the file() object in LScript to open or save his STL files. file() does not work in LScript 2.6.1, which ships with 7.5c.

This is a well documented Mac Lightwave bug.

ChromeCow
09-15-2003, 06:23 PM
Thanks all,

Micheal's right, the file object agent is stuffed in 7.5c. Looks like the only work around is to put the files in some default filepath and only enter the name. Blah. No fix.

However, the bug in 7.5 is more along the lines I expected, a bad value, probably byte-order confusion. I'm working on a fix, and when I have something I think will work, I'll post.

Thanks for testing, Noiseboy.

Best,
Sean Hyde-Moyer
www.chromecow.com

Lightwolf
09-16-2003, 01:29 AM
Hi Sean,

on the STL byte ordering subject:
AFAIK STL uses PC style byte ordering by default, which means that any STL exporter on the Mac (from another tool) writes out PC style byte ordered binaries.
In the end, that means that on the Mac you'll have to swap your bytes for binary reads and writes, while on the PC you don't.
I don't think there is a big and little endian version of STL, I wouldn't really know of a failsafe way to detect that from an importer either (unlike for example .TIF, where that has been taken care of in the header).

Cheers,
Mike - if I'm not porting my stl i/o to the Mac right now, I might as well try to help.

ChromeCow
09-22-2003, 07:11 AM
That fits with the somewhat sketchy picture I've built up of Mac behavior.

From what I gather, the exporter works just fine (though there may be some issues under 7.5c). I have reports of it being regularly used without issue.

It's the importer that seems to have problems.

So here's my guess:

On the Mac, LScript is writing out binary in the PC flavor (so Export is working just fine).

It is also reading in PC flavor, such that object saved on the Mac by Mac apps fail when importing.

I really need to work with some Mac users to fully test this theory.

Thanks Mike!

noiseboy
09-22-2003, 07:37 AM
Sean
I'll help if I can, running 7.5 on one desktop G4 and 7.5c on my Laptop G4.
Colin

ChromeCow
09-23-2003, 06:27 AM
Thanks Colin,

Let's take this to email.

My email address is on the front page of www.chromecow.com

-S.

tapsnap
09-27-2003, 07:56 AM
Got my models back from the rapid prototyping shop last week. Just got back to my computer after a week cleaning up the models. Boy, this process is just so cool. Thanks so much Chromecow for writing this long awaited Script.

pauland
09-27-2003, 07:58 AM
Originally posted by tapsnap
Got my models back from the rapid prototyping shop last week. Just got back to my computer after a week cleaning up the models. Boy, this process is just so cool. Thanks so much Chromecow for writing this long awaited Script.

OK, post some pics so we can see the result!

Paul

tapsnap
09-28-2003, 07:26 PM
These are of the models before any clean up. Sorry no photos of the finished model just yet.

tapsnap
09-28-2003, 07:27 PM
Here's another

pauland
09-28-2003, 07:30 PM
Thanks for posting them. You can see the fine lines from the layers, so I guess that's where the cleaning up would help, but I think it looks great!

Paul

noiseboy
09-29-2003, 01:45 AM
your model looks great, out of curiosity how big is it?

tapsnap
09-29-2003, 10:29 AM
He sits about 9 inches tall. This wasn't the stereolythography process that I have used in the past, it's the Z-corp process. Its a cheaper process but the results are a little rougher and the model a little more fragile. For what I was doing it was great: I was very pleased.

ChromeCow
10-07-2003, 07:10 PM
Thanks for posting those, Tapsnap!

That makes me happy...};^)

Sean
www.chromecow.com

ChromeCow
11-09-2003, 10:31 AM
Hi All,

The STL Import/Export tools have been ported to Mac.

You can find them here:

http://www.chromecow.com/downloads.htm

under the LScript links.

Enjoy!
Sean Hyde-Moyer

Lightwolf
11-09-2003, 10:32 AM
Congrats Sean !!!
The carriage return in the FAQ is the best bit :D
Cheers,
Mike

ChromeCow
12-04-2003, 07:46 AM
Hehe. Thanks.

I always find FAQs somewhat contrived. I thinks they're more often than not FIQs (Frequently Imagined Questions).

There's a generation or two that probably have no idea what a cairrage return is, and I'm not about to make it any easier...};^)

Be well,
Sean Hyde-Moyer
www.chromecow.com