Hey there,I'm trying to create a program which lets you create dynamic
surfaces with various inputs.
http://forum.openscad.org/file/t2032/screen1.png
The program works by going through a for loop for both rows and cols, and
for each shape giving it various modifiers like color, translates, and
rotation. Currently I'm trying to allow "gradual rotation" of modules, so
that they curve outwards or inwards from the center of the shape. The issue
I'm having is I cannot figure out how to get them to rotate in place. If I
rotate the modules before they are translated it looks like this:
http://forum.openscad.org/file/t2032/screen2.png
If I rotate the modules after they are translated it looks like this:
http://forum.openscad.org/file/t2032/screen3.png
Both of these are incorrect. I would like the modules to rotate in place.
The second image shows that something weird is happening with the rotation,
where the modules to the left are not being rotated the same as the modules
on the right. The values given to the rotation are correct, and are
(-20,-10,0,10,20). Here is the code that I'm using to call the module: The
line in question is "rotate([gradXRotate,0,0])". Ignore the other rotates as
they're used for another part of the program.
http://forum.openscad.org/file/t2032/screen4.png
If I could get some help with this, that'd be great, i've been stuck on this
problem for a long time. If you need any more information about how the rest
of the program works, feel free to ask. Thanks!
--
Sent from: http://forum.openscad.org/
Rotation is always around the origin. To rotate around a point on an object
translate your object so that point is at the origin, rotate it and then
translate it back to where you want it.
On 8 October 2017 at 04:44, thesurveyer acidplaystf2@gmail.com wrote:
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org