"Melting" models

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

"Melting" models

leebc
I came across this model of a "melted" or "wilting" gear...  (Think Dali's
clocks.)
     https://www.thingiverse.com/thing:2872162
<http://forum.openscad.org/file/t1632/a22b1cd568ea8d3a6547ed46a6a10119_preview_featured.jpg>

Can anyone think of a good way to recreate this in OpenSCAD?

Let's assume you are completely modeling in OpenSCAD so could re-write the
code for the gear generation.

Objective is to curve a flat object around a "pipe" of a certain diameter.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

kdtop
Could you multiple the object (i.e. the mesh of all the points of the object) by a transform matrix, which effects the radial transformation?

Kevin

On Fri, May 24, 2019 at 7:29 AM leebc <[hidden email]> wrote:
I came across this model of a "melted" or "wilting" gear...  (Think Dali's
clocks.)
     https://www.thingiverse.com/thing:2872162
<http://forum.openscad.org/file/t1632/a22b1cd568ea8d3a6547ed46a6a10119_preview_featured.jpg>

Can anyone think of a good way to recreate this in OpenSCAD?

Let's assume you are completely modeling in OpenSCAD so could re-write the
code for the gear generation.

Objective is to curve a flat object around a "pipe" of a certain diameter.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

doug.moen
Kevin Toppenberg says:
> Could you multiple the object (i.e. the mesh of all the points of the object) by a transform matrix, which effects the radial transformation?

I don't think so. This requires a non-affine transformation, which can't be represented by a transformation matrix.

My 3D modelling language, Curv, supports non-affine transformations, which are represented by functions that map 3D points onto other 3D points, not matrices. I've implemented several 'bend' operators that do this kind of transformation.

In OpenSCAD, it's not so easy. I bet somebody on the list has a better answer, though.

Doug Moen.

On Fri, May 24, 2019, at 9:44 AM, Kevin Toppenberg wrote:
Could you multiple the object (i.e. the mesh of all the points of the object) by a transform matrix, which effects the radial transformation?

Kevin

On Fri, May 24, 2019 at 7:29 AM leebc <[hidden email]> wrote:
I came across this model of a "melted" or "wilting" gear...  (Think Dali's
clocks.)

Can anyone think of a good way to recreate this in OpenSCAD?

Let's assume you are completely modeling in OpenSCAD so could re-write the
code for the gear generation.

Objective is to curve a flat object around a "pipe" of a certain diameter.



--

_______________________________________________
OpenSCAD mailing list
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

acwest
I've implemented bend functionality by taking slices of the original shape and placing them in position, and unioning it together. It tends to be slow though 

On Fri, 24 May 2019, 10:12 Doug Moen, <[hidden email]> wrote:
Kevin Toppenberg says:
> Could you multiple the object (i.e. the mesh of all the points of the object) by a transform matrix, which effects the radial transformation?

I don't think so. This requires a non-affine transformation, which can't be represented by a transformation matrix.

My 3D modelling language, Curv, supports non-affine transformations, which are represented by functions that map 3D points onto other 3D points, not matrices. I've implemented several 'bend' operators that do this kind of transformation.

In OpenSCAD, it's not so easy. I bet somebody on the list has a better answer, though.

Doug Moen.

On Fri, May 24, 2019, at 9:44 AM, Kevin Toppenberg wrote:
Could you multiple the object (i.e. the mesh of all the points of the object) by a transform matrix, which effects the radial transformation?

Kevin

On Fri, May 24, 2019 at 7:29 AM leebc <[hidden email]> wrote:
I came across this model of a "melted" or "wilting" gear...  (Think Dali's
clocks.)

Can anyone think of a good way to recreate this in OpenSCAD?

Let's assume you are completely modeling in OpenSCAD so could re-write the
code for the gear generation.

Objective is to curve a flat object around a "pipe" of a certain diameter.



--

_______________________________________________
OpenSCAD mailing list
_______________________________________________
OpenSCAD mailing list


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

NateTG
In reply to this post by leebc
OpenSCAD doesn't have native support for plastic transformations or for
userland geometry.  I would recommend using something else.

If you're really determined, it's possible to write a geometry engine within
OPENScad, and then implement plastic transforms by subdividing triangles,
but it's a bunch of work and OPENScad isn't well-suited to a task like that.

This is "extruded" and "bent" in OpenSCAD, but I had to scrape the geometry
for the letters from postscript.

http://forum.openscad.org/file/t2140/cylindertext.stl



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

cacb
In reply to this post by leebc
On 24.05.2019 13:28, leebc wrote:

> I came across this model of a "melted" or "wilting" gear...  (Think Dali's
> clocks.)
>       https://www.thingiverse.com/thing:2872162
> <http://forum.openscad.org/file/t1632/a22b1cd568ea8d3a6547ed46a6a10119_preview_featured.jpg>
>
> Can anyone think of a good way to recreate this in OpenSCAD?
>
> Let's assume you are completely modeling in OpenSCAD so could re-write the
> code for the gear generation.
>
> Objective is to curve a flat object around a "pipe" of a certain diameter.

There is no way in OpenSCAD to take an exiting flat object and "melt" it
into something like your example. This is because you cannot access and
transform individual coordinates in an OpenSCAD object.

In AngelCAD you can do it for an imported object as shown here
https://gist.github.com/arnholm/af72c7d0790bb3d72e6bdf29c7aac1ed

There is one requirement in addition to being able to change coordinates
of existing objects, and that is that the discretization of the object
mesh is fine enough to allow the melting/morphing. The link above shows
the difference (use the wirefame options).

Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

adrianv
I suppose it's a somewhat advanced effort, but I don't think it would be
particularly hard to write a "bent_sweep" module that would take a polygon
expressed as a series of point coordinates and a second "destination"
polygon also as a series of points.  You could project the first polygon
onto the second one and then build it up to the desired thickness (in the
normal direction), constructing the vertices and faces of the necessary
polyhedron.  



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

cacb
On 2019-05-24 23:41, adrianv wrote:

> I suppose it's a somewhat advanced effort, but I don't think it would
> be
> particularly hard to write a "bent_sweep" module that would take a
> polygon
> expressed as a series of point coordinates and a second "destination"
> polygon also as a series of points.  You could project the first
> polygon
> onto the second one and then build it up to the desired thickness (in
> the
> normal direction), constructing the vertices and faces of the necessary
> polyhedron.

A polygon in OpenSCAD is a 2d object with only (x,y) coordinates, so the
"destination" cannot exist anywhere but in the (x,y) plane. I think you
would "be on your own" having to write such from scratch using lists of
3d coordinates. Possible perhaps, but somewhat inconvenient. However,
sweeping is not the same as "melting" (or morphing rather). In a sweep
you start with a 2d shape and create a 3d object by sweeping the (rigid)
2d shape along a path to get a 3d object. OpenSCAD linear_extrude is a
special case of this. A slightly different case is
https://gist.github.com/arnholm/931bba4633ca344a3ffe0698b945395f

The melting/morphing case is quite different, it begins with an existing
valid 3d model created using any method. Usually keeping the topology of
the model fixed, the *shape* of the 3d model is modified. If the model
is represented as a polyhedron mesh, either explicitly modeled as such
or the result of mesh based boolean operations, changing the shape
translates to transforming the polyhedron vertex coordinates, using
different transformations for different vertices (i.e. "non-affine
transformation" of the model).

Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

caterpillar
This post was updated on .
In reply to this post by leebc
Here's my quick and dirty code based on  my library
<https://github.com/JustinSDK/dotSCAD>  .

include <shape_starburst.scad>;
include <bend_extrude.scad>;

gear_r = 30;
teeth_numbers = 24;
circle_numbers = 7;
inner_circle_r = 5;
thickness = 3;
angle = 60;
frags = 24;

module melted_gear() {
    double_gear_r = gear_r * 2;
    half_gear_r = gear_r / 2;
    module gear() {
        $fn = 48;
        a = 360 / (circle_numbers - 1);
       
        rotate(1) // avoid WARNING: Object may not be a valid 2-manifold and may need repair!
            difference() {
                polygon(shape_starburst(gear_r, gear_r - inner_circle_r, teeth_numbers));
                circle(inner_circle_r);
                for(i = [0:circle_numbers - 2]) {
                    rotate(a * i) translate([inner_circle_r * 3, 0, 0]) circle(inner_circle_r);
                }
            }
    }

    rz = gear_r * 180 / (angle * 3.14159);
   
    rotate(-1)
        union() {
            translate([0, -gear_r, rz])
                //rotate([0, -angle / frags / 2, 0])
                    rotate([90, 0, 0])
                        bend_extrude([gear_r, double_gear_r], thickness, angle, frags)
                            translate([0, gear_r, 0]) gear();

            linear_extrude(thickness)
                intersection() {
                    translate([-half_gear_r, 0, 0])
                        square([gear_r, double_gear_r], center = true);
                    gear();
                }
        }
}

melted_gear();



bend_extrude is not documented currently, however, it's already in the
repository.

<http://forum.openscad.org/file/t1825/melting_gear2.jpg



-----
http://openhome.cc
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

caterpillar
In reply to this post by leebc
The purpose of  bend_extrude is to replace  bend
<https://openhome.cc/eGossip/OpenSCAD/lib-bend.html>   when you have a 2D
shape. bend_extrude is faster and doesn't produce jagged edges.



-----
http://openhome.cc
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

adrianv
In reply to this post by cacb
cacb wrote

> On 2019-05-24 23:41, adrianv wrote:
>> I suppose it's a somewhat advanced effort, but I don't think it would
>> be
>> particularly hard to write a "bent_sweep" module that would take a
>> polygon
>> expressed as a series of point coordinates and a second "destination"
>> polygon also as a series of points.  You could project the first
>> polygon
>> onto the second one and then build it up to the desired thickness (in
>> the
>> normal direction), constructing the vertices and faces of the necessary
>> polyhedron.
>
> A polygon in OpenSCAD is a 2d object with only (x,y) coordinates, so the
> "destination" cannot exist anywhere but in the (x,y) plane. I think you
> would "be on your own" having to write such from scratch using lists of
> 3d coordinates. Possible perhaps, but somewhat inconvenient.

I was suggesting a strategy for producing the desired gear model, not a
fully general approach to melting.  In my conception, the gear is defined by
a 2d polygon.  The gear in the image is deformed by being wrapped around an
extrusion, so the 3d surface it is wrapped around also has a 2d description.
So you can construct the top and bottom of the "melted" gear through a
projection operation that is relatively simple.  

> The melting/morphing case is quite different, it begins with an existing
> valid 3d model created using any method. Usually keeping the topology of
> the model fixed, the *shape* of the 3d model is modified. If the model
> is represented as a polyhedron mesh, either explicitly modeled as such
> or the result of mesh based boolean operations, changing the shape
> translates to transforming the polyhedron vertex coordinates, using
> different transformations for different vertices (i.e. "non-affine
> transformation" of the model).

It seems that starting with polyhedron described by a 3d vertex set (and
face list) one could also achieve the desired result.  It basically boils
down to the question of representing the desired transformation.  The
problem, of course, is that OpenSCAD doesn't expose that information, so you
can't just do it to geometry.  You could use one of the existing sweep
modules to generate the necessary input from the 2d gear cross-section.  




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

caterpillar
In reply to this post by leebc
I made a melted clock with an animation demo.

https://www.thingiverse.com/thing:3653698





-----
http://openhome.cc
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

MichaelAtOz
Administrator
caterpillar wrote
> I made a melted clock with an animation demo.

I get:
This video does not exist.
Sorry about that.




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

* click on my MichaelAtOz label, there is a link to email me.

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!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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!
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

MichaelAtOz
Administrator
MichaelAtOz wrote
> This video does not exist.
> Sorry about that.

Looks like it don't like Pale Moon, it worked in Firefox...
Pretty nifty.



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

* click on my MichaelAtOz label, there is a link to email me.

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!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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!
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

caterpillar
In reply to this post by MichaelAtOz
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

Parkinbot
I would have expected the clock to melt over time ... ;-)



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

thehans
I think the big question is why go through the trouble of modeling plastic deformation of a printed plastic part when you can get the same slumping  effect with a little post-print heat application(particularly if PLA is used).  Soften in boiling water, or apply a heat gun, or just print in black+leave in sun (I learned this last one the hard way a few years ago when I left a Prusa i2 printer in the hatchback of a car for one Texas summer day, with black PLA used for the frame vertices)




On Sun, May 26, 2019, 8:11 AM Parkinbot <[hidden email]> wrote:
I would have expected the clock to melt over time ... ;-)



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

cacb
On 26.05.2019 16:34, Hans L wrote:
> I think the big question is why go through the trouble of modeling
> plastic deformation of a printed plastic part when you can get the same
> slumping  effect with a little post-print heat application(particularly
> if PLA is used).

The small answer is that such techniques are not just for "melting", but
more generally for morphing which has other applications, including
adapting 3d text to a non-flat surface.

Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Melting" models

doug.moen
In reply to this post by thehans
The operation that is being discussed here is often called "bend", and it bends a shape around a cylinder. It's a useful general purpose CAD operation, and it's strange that more CAD programs don't include it. A simple example is adding a bend to a pipe. I often use it for bending long skinny objects into rings.

Another "plastic deformation" that I get a lot of use out of is "twist".

Here's an old SIGGRAPH paper that makes the case for including "bend" and "twist" in CAD programs:


On Sun, May 26, 2019, at 10:35 AM, Hans L wrote:
I think the big question is why go through the trouble of modeling plastic deformation of a printed plastic part when you can get the same slumping  effect with a little post-print heat application(particularly if PLA is used).  Soften in boiling water, or apply a heat gun, or just print in black+leave in sun (I learned this last one the hard way a few years ago when I left a Prusa i2 printer in the hatchback of a car for one Texas summer day, with black PLA used for the frame vertices)




On Sun, May 26, 2019, 8:11 AM Parkinbot <[hidden email]> wrote:
I would have expected the clock to melt over time ... ;-)



--

_______________________________________________
OpenSCAD mailing list
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org