POV-Ray : Newsgroups : povray.tools.general : Do we have a linux-friendly mesh exporter? : Re: Do we have a linux-friendly mesh exporter? Server Time
20 Sep 2021 09:25:22 EDT (-0400)
  Re: Do we have a linux-friendly mesh exporter?  
From: Bald Eagle
Date: 24 Jan 2020 13:30:00
Message: <web.5e2b36faa1683a494eec112d0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> I made a custom extension to import & export STL (as well as GTS).
> As SDL is only able to handle text (and not binary file), it was not an
> option.

I saw some search results regarding hgpovray38, but I didn't really "get" it.
Don't we have the ability to read/write binary files in SDL?
I was searching for a way to write GrADS data, and finally reminded myself that
it was possible.
http://wiki.povray.org/content/Reference:File_I/O_Directives
  uint8              - unsigned byte (0..255)
  sint8              - signed byte (-128..127)
  uint16be, uint16le - unsigned 16-bit word (0..65535)
  sint16be, sint16le - signed 16-bit word (-32768..32767)
  sint32be, sint32le - signed 32-bit word (-2^31..2^31-1)

> Problem with STL: there is 2 opposite specifications for colour, so I
> just dropped that part too, only load & save the shape.
>
> OBJ specification is text, but not made only of triangle (you can have 4
> points faces).

Well that's "easy enough" to grapple with - just use corners 1, 2 & 3, and 3, 4,
& 1 to make 2 separate triangles.

> I also made an extension to be able to read back the data of a mesh, it
> could be used to save it as mesh2 (but really, STL is faster if you can
> cope with the constraint of being in the positive corner cube)

Huh.
I got the impression from the documentation that mesh2 was "better" - so why is
STL faster?
I'm impressed that you coded something up for mesh2 - I was mulling over how to
do that, and it seemed like a lot of record-keeping to  know which triangles
were which and what ones shared vertices....

> Whatever, I use *meshlab* to convert between these formats (and perform
> also other operations, including preview).

Yes, I think I stumbled across a link to meshlab.  I'll try to install that some
time soon, as it a nice program for viewing and fixing meshes.

> Also, *makehuman* is a nice way to get mesh of human bodies if you
> intend to have a set of Greek statues.

Hmmm.  IIRC that project was abandoned some time ago - I'll look and see if I
can find the files for that.


Post a reply to this message

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