[GMG-Devel] OpenSCAD media type

Rodrigo Rodrigues da Silva rsilva at metamaquina.com.br
Fri Nov 14 13:10:07 EST 2014


On Fri, 14 Nov 2014, Christopher Allan Webber wrote:

> Rodrigo Rodrigues da Silva writes:
> 
> > On Thu, 13 Nov 2014, Christopher Allan Webber wrote:
> >
> > Sandboxed, not turing complete, only worries I can think of would be
> > someone exploiting slow functions to kill processor capacity.
> 
> Someone could do that already with the STL plugin by providing an
> egregiously complex model.  It's a real concern, but maybe we should
> make it clear that certain plugins are more dangerous if you really
> don't trust your users.

It's a concern for every plugin if the files are big enough and it
should be possible to control this at a higher level of abstraction,
maybe through celery? IMHO it deserves an issue report if there isn't
one yet.

> >> Nonetheless, this seems like it's a cool tool.
> >
> > Thanks! I've done some extra work, will commit soon.
> 
> Great!
> 
> (PS, do you think there is overlap here with the STL tool?  Do you have
> any ideas on how we might present these tools together?  It might make
> sense not to, or it might make sense to... perhaps I should get Aeva's
> (the original implementor's) input as well.)

Yes, there's definitely an overlap with the STL plugin. As soon as the
STL file is generated by OpenSCAD it could be passed on to the stl
plugin pipeline. Currently I am rendering both STL and PNG from
OpenSCAD because it was easier to implement. I am not sure which is
best, OpenSCAD or an external renderer.

We could abstract rendering out of the stl plugin, that is, have
alternative 3D renderes plugged through an interface. POV Ray makes
really nice renders. OpenSCAD makes nice renders in its own way. I
intend to support other 3D formats in the future, like PLY, and maybe
we'll need other renderers for that matter as well.

Parts of the STL view could be generalized too - I just copy/pasted
what I needed.

As what regards to SCAD media rendering, there are basically two
situations: the medium is just one part, then we can just use the nice
blender-themed render; or the scad medium is an assembly with many
parts, and the author has put color on different parts to
differentiate them and we want to present this information. The thing
is that there is no way to pass on this color information to the STL
model, so one can only have color information through the OpenSCAD
preview.

It would be nice to get Aeva's input.

BTW, right now I am working on an interface which presents parameters
to the user pretty much like Makerbot Customizer. The trick is how to
have the 3D model rendered again every time a parameter changes.

-- 
Rodrigo Rodrigues da Silva
Metamáquina


More information about the devel mailing list