POV-Ray : Newsgroups : povray.off-topic : STL binary floating data. : Re: STL binary floating data. Server Time
25 Apr 2024 08:21:02 EDT (-0400)
  Re: STL binary floating data.  
From: GioSeregni
Date: 9 Mar 2020 15:00:00
Message: <web.5e66917b517dbb512c923fbd0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "GioSeregni" <gms### [at] hotmailcom> wrote:
> > HI all.
> > One of my interests is export shapes during my work with IntelliCAD (but Autocad
> > is the same), using the lisp language at runtime.
> > I write *.pov, *.inc and *.stl also.
> > Unfortunately from cad i can only write STL with the heavy ASCII format, because
> > I have a problem with the lisp.
> > Autocad uses double precision float numbers. STL binary want single precision
> > floats. But the AutoLISP (seems that) does not allow me this conversion.
> > Allow me to ask here, maybe some experienced 3D programmer knows a solution?
> > Thanks in advanced!
> > G.
>
> STL to POV-Ray conversion has been discussed before, people seem to use various
> utilities:
>
<http://news.povray.org/povray.general/thread/%3C59799a41%241%40news.povray.org%3E/?ttop=419996&toff=50&mtop=417481>
>
> not being an "experienced 3D programmer" (but interested in file format
> conversion(s)), I'd be tempted to output ASCII as now, then use a small (Tcl[*])
> script to convert to binary STL.
>
>
> regards, jr.
>
> [*] guessing that, coming from LISP, you'll appreciate Tcl's list handling.
Thanks! If you are interested, this is my small Autolisp program.
I dont know if it works on your specific CAD without adjustments, I'm afraid
not, but the concept is this. 3DFACE ---> STL faces
WARNING all is working in a folder ... C:\CADEXT... and at the end It calls
Meshlab.
I put it only as a guide to the code, but it will certainly have to be adapted.
A minimum of experience is needed.
Regards!
G.


Post a reply to this message


Attachments:
Download 'cad2stl.zip' (3 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.