• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

single and double precision in mobile comma

  • Thread starter Thread starter Gio_S
  • Start date Start date

Gio_S

Guest
Good morning and thanks for the attention,
I promise (see welcome message) to ask for info but also to remain available to the community, some experience with autolisp I would have.. .
finished preamble, my huge problem.
from intellicad environment (similar autocad) generate directly in lisp, from the interior design database, the stl files I need.
but I have a huge problem, I am forced to use for the stl output files the text coding, which, unlike the binary, does not contain fields for color, while the color to distinguish the parts is very useful.
this happens because the stl files of binary type, where each face previews a corner to annotate the color, they want a single-type mobile comma format, while autolisp would seem just that it uses only the double.
how could I do, to write on file of data to mobile comma, but to 32 bit?
At the moment, for extreme cases where the color is really necessary, I use an external executable, which I did in other language, which reads the dxf that I genero from the design, and in turn writes the stl format colored by fishing them from the layer name, or the color I assigned to the 3dface entity, but this is rather slow and macchinoso.
from the inside of intellicad instead the text file slt me fill it in a moment, and launch directly meshlab that shows me the object, which is very sharp. However, unfortunately, I can only do it with the text format, because of those malicious data in single precision that uses the slate track.
thanks early if a "guru" had a solution :)
 
if your version of intellicad has vba, the created text file you can convert it to binary.
 
Thanks for the answer, no I don't have it, but I still do the same thing from the dxf, to make me a double pass.
from the intellicad environment I can create a file that contains the colors, call an exe who read it, rewrite it in binary, and in turn call meshlab, but the point I would like to understand is about the lisp.
can autolisp manipulate 32-bit data (in single precision) ?
It's a curiosity, and it would be much cleaner and more elegant.
I have a dated version of intellicad which, however, fully meets my needs, and on which I have written so much about that lisp, menus and interfaces, which I do not want to change it. I'm sure I should touch up a lot of things.
different case if you find that even autolisp today can handle 32 bits.
I don't think so, but I'd like to be sure.
Thanks anyway!
 
theoretically one could do, to make him write a byte train, but to study the coding little endian I think to postpone it to a future life :)
Unless there's any routine around...
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top