discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] how easy to make .off export a function call?

M
MichaelAtOz
Tue, May 30, 2017 6:08 AM

boxcarmib wrote

It's straightforward to save an object in .off format, and then using an
external program i wrote, create an openscad program that describes the
object as a polyhedron using the points and faces from the .off data.
My question is this, and its directed to those of you familiar with the
openscad source:
How hard would it be to create a function that effectively calls the
program logic that creates the .off export and returns a two element
matrix of points and faces?
I'm thinking of a module that would work something like render() does,
providing the points and faces for whatever has been defined at the point
the function is called.
Having some programming experience I'd be interested in pursuing the
development of such a function, but I'd like an opinion from someone who
knows what's under the hood if this is just an impractical or staggeringly
complex project.

Your post is still flagged as "This post has NOT been accepted by the
mailing list yet", so nobody gets it unless they look. So I quoted it above.
You need to subscribe to the  mailing list
http://forum.openscad.org/mailing_list/MailingListOptions.jtp?forum=1  ,
and CLICK THE LINK in the registration email (check your spam folder).

Stand by for the philosophical discussion...


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/how-easy-to-make-off-export-a-function-call-tp21595p21596.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

boxcarmib wrote > It's straightforward to save an object in .off format, and then using an > external program i wrote, create an openscad program that describes the > object as a polyhedron using the points and faces from the .off data. > My question is this, and its directed to those of you familiar with the > openscad source: > How hard would it be to create a function that effectively calls the > program logic that creates the .off export and returns a two element > matrix of points and faces? > I'm thinking of a module that would work something like render() does, > providing the points and faces for whatever has been defined at the point > the function is called. > Having some programming experience I'd be interested in pursuing the > development of such a function, but I'd like an opinion from someone who > knows what's under the hood if this is just an impractical or staggeringly > complex project. Your post is still flagged as "This post has NOT been accepted by the mailing list yet", so nobody gets it unless they look. So I quoted it above. You need to subscribe to the mailing list <http://forum.openscad.org/mailing_list/MailingListOptions.jtp?forum=1> , and CLICK THE LINK in the registration email (check your spam folder). Stand by for the philosophical discussion... ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/how-easy-to-make-off-export-a-function-call-tp21595p21596.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Tue, May 30, 2017 1:04 PM

There is no resource in OpenSCAD language to  write a file. There is
neither any way to get vertex and edge data for a given model. The only
text output you may get is by echo() and it is directed to  the console
window.

There is no resource in OpenSCAD language to write a file. There is neither any way to get vertex and edge data for a given model. The only text output you may get is by echo() and it is directed to the console window.
MK
Marius Kintel
Tue, May 30, 2017 1:18 PM

On May 30, 2017, at 09:04, Ronaldo Persiano rcmpersiano@gmail.com wrote:

There is no resource in OpenSCAD language to  write a file. There is neither any way to get vertex and edge data for a given model. The only text output you may get is by echo() and it is directed to  the console window.

This could be made a UI feature though (e.g. select a node/subtree and inline it).
Here is some similar work in progress where I’m modifying the CSG export to resolve nodes like import() into a polyhedron:
https://github.com/openscad/openscad/pull/1882

-Marius

> On May 30, 2017, at 09:04, Ronaldo Persiano <rcmpersiano@gmail.com> wrote: > > There is no resource in OpenSCAD language to write a file. There is neither any way to get vertex and edge data for a given model. The only text output you may get is by echo() and it is directed to the console window. > This could be made a UI feature though (e.g. select a node/subtree and inline it). Here is some similar work in progress where I’m modifying the CSG export to resolve nodes like import() into a polyhedron: https://github.com/openscad/openscad/pull/1882 -Marius