

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 nonaffine transformation, which can't be represented by a transformation matrix.
My 3D modelling language, Curv, supports nonaffine 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
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 rewrite 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


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 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 nonaffine transformation, which can't be represented by a transformation matrix.
My 3D modelling language, Curv, supports nonaffine 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
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 rewrite 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


On 24.05.2019 13:28, leebc wrote:
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/af72c7d0790bb3d72e6bdf29c7aac1edThere 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


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


On 20190524 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/931bba4633ca344a3ffe0698b945395fThe 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. "nonaffine
transformation" of the model).
Carsten Arnholm
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


This post was updated on .
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 2manifold 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


cacb wrote
> On 20190524 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. "nonaffine
> 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 crosssection.

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

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!

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!


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 postprint heat application(particularly if PLA is used). Soften in boiling water, or apply a heat gun, or just p rint 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)
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


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 postprint 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 nonflat surface.
Carsten Arnholm
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


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 postprint 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)
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

