[OpenSCAD] feature request: resize

Don Bright hugh.m.bright at gmail.com
Wed Aug 10 18:21:59 CEST 2011


Hi Giles

That is awesome! I will try to do copy the minkowski-implementation to
do a 'resize'. Thank you.

I have one question -- what happens when you do a 'f5 preview' on a
Minkowski object that has a difference with other shapes? Does it show
up properly in f5 mode? I don't have access to a machine that can do
OpenCSG so I have no way to test it. Does this become a problem for
the users?

DB


On Wed, Aug 10, 2011 at 4:23 AM, Giles Bathgate
<giles.bathgate at gmail.com> wrote:
> On 10 August 2011 04:00, Don Bright <hugh.m.bright at gmail.com> wrote:
>> I guess there could be a 'hack', like if you popped out of 'preview'
>> mode the first time someone called 'resize', did all the 'render' of
>> CSG operations, then cached the result for future 'previews'. But that
>> doesnt feel right.
>
> This is what I was going to suggest, minkowski sums are actually done
> this way since there is no OpenCSG implementation for them, it renders
> using CGAL, and converts the result into a primitive to be used by
> OpenCSG.
>
> "It dosen't feel right", but I think this will be quite optimal for
> STL imports (which use CGAL anyway IIRC)
>
> so for example
>
> resize([10,1,5]) import_stl("foo.stl");
>
> Will be about the same speed as having the parameters as part of the
> import function. What will be slow is
>
> resize([10,1,5]) mycomplexpart();
>
> But only the first time, since all subsequent renderings would be cached.
>
> (Marius, could you add a comment about this, I think I have only
> skimmed over the technical details a bit.)
>
> Regards
>
> Giles
> _______________________________________________
> OpenSCAD mailing list
> OpenSCAD at rocklinux.org
> http://rocklinux.net/mailman/listinfo/openscad
>


More information about the OpenSCAD mailing list