discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

turtle3d

JW
Joe Weinpert
Sun, Sep 28, 2025 9:19 PM

I'm encountering an issue while using Turtle3D to create a handle. The code
consists of two modules: a standard module and a bending module.
The standard module functions as expected, but the bending module does not
produce the desired results. I anticipated that the handle would turn left,
then right, while remaining perpendicular to the z-axis, ultimately lying
flat on the starting plane. However, this is not happening.
The only difference between the two modules is the addition of "left" and
"right" movements to the "up" arcs in the bending module. What could I be
missing?

Joe Weinpert


include <BOSL2/std.scad>
include <BOSL2/turtle3d.scad>

$fn = 64;
handle();
handleBend();

module handle(){
path = turtle3d([
"move",1,
["arc",2,"up",36,"shrink",[1,2]],
"arcdown",2,72,
["arc",2,"up",36,"grow",[1,2]],
"move",1
],
state=move([0,.75,.375]),
transforms=true
);

sweep(
ellipse( d=[.75,1.5] ),
path
);
}
//

module handleBend(){
path = turtle3d([
"move",1,
["arc",2,"up",36,"left",45,"shrink",[1,2]],
"arcdown",2,72,
["arc",2,"up",36,"right",45,"grow",[1,2]],
"move",1
],
state=move([0,.75,.375]),
transforms=true
);

sweep(
ellipse( d=[.75,1.5] ),
path
);
}
//

I'm encountering an issue while using Turtle3D to create a handle. The code consists of two modules: a standard module and a bending module. The standard module functions as expected, but the bending module does not produce the desired results. I anticipated that the handle would turn left, then right, while remaining perpendicular to the z-axis, ultimately lying flat on the starting plane. However, this is not happening. The only difference between the two modules is the addition of "left" and "right" movements to the "up" arcs in the bending module. What could I be missing? Joe Weinpert --------- include <BOSL2/std.scad> include <BOSL2/turtle3d.scad> $fn = 64; handle(); handleBend(); module handle(){ path = turtle3d([ "move",1, ["arc",2,"up",36,"shrink",[1,2]], "arcdown",2,72, ["arc",2,"up",36,"grow",[1,2]], "move",1 ], state=move([0,.75,.375]), transforms=true ); sweep( ellipse( d=[.75,1.5] ), path ); } // module handleBend(){ path = turtle3d([ "move",1, ["arc",2,"up",36,"left",45,"shrink",[1,2]], "arcdown",2,72, ["arc",2,"up",36,"right",45,"grow",[1,2]], "move",1 ], state=move([0,.75,.375]), transforms=true ); sweep( ellipse( d=[.75,1.5] ), path ); } //
AM
Adrian Mariano
Sun, Sep 28, 2025 10:14 PM

I think the problem is that when you apply rotations it also spins the
reference frame, so the direction that is "up" or "left" is not where you
think it is.  This is really hard to deal with.  I added absolute rotations
to try to provide a tool for working around this.  You could also try
"rollto" to force the reference frame back into an orientation you
understand.  I have basically no experience actually using turtle3d so I
don't have any deeper insights.

On Sun, Sep 28, 2025 at 5:20 PM Joe Weinpert via Discuss <
discuss@lists.openscad.org> wrote:

I'm encountering an issue while using Turtle3D to create a handle. The
code consists of two modules: a standard module and a bending module.
The standard module functions as expected, but the bending module does not
produce the desired results. I anticipated that the handle would turn left,
then right, while remaining perpendicular to the z-axis, ultimately lying
flat on the starting plane. However, this is not happening.
The only difference between the two modules is the addition of "left" and
"right" movements to the "up" arcs in the bending module. What could I be
missing?

Joe Weinpert


include <BOSL2/std.scad>
include <BOSL2/turtle3d.scad>

$fn = 64;
handle();
handleBend();

module handle(){
path = turtle3d([
"move",1,
["arc",2,"up",36,"shrink",[1,2]],
"arcdown",2,72,
["arc",2,"up",36,"grow",[1,2]],
"move",1
],
state=move([0,.75,.375]),
transforms=true
);

sweep(
   ellipse( d=[.75,1.5] ),
   path
);

}
//

module handleBend(){
path = turtle3d([
"move",1,
["arc",2,"up",36,"left",45,"shrink",[1,2]],
"arcdown",2,72,
["arc",2,"up",36,"right",45,"grow",[1,2]],
"move",1
],
state=move([0,.75,.375]),
transforms=true
);

sweep(
   ellipse( d=[.75,1.5] ),
   path
);

}
//


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I think the problem is that when you apply rotations it also spins the reference frame, so the direction that is "up" or "left" is not where you think it is. This is really hard to deal with. I added absolute rotations to try to provide a tool for working around this. You could also try "rollto" to force the reference frame back into an orientation you understand. I have basically no experience actually using turtle3d so I don't have any deeper insights. On Sun, Sep 28, 2025 at 5:20 PM Joe Weinpert via Discuss < discuss@lists.openscad.org> wrote: > I'm encountering an issue while using Turtle3D to create a handle. The > code consists of two modules: a standard module and a bending module. > The standard module functions as expected, but the bending module does not > produce the desired results. I anticipated that the handle would turn left, > then right, while remaining perpendicular to the z-axis, ultimately lying > flat on the starting plane. However, this is not happening. > The only difference between the two modules is the addition of "left" and > "right" movements to the "up" arcs in the bending module. What could I be > missing? > > Joe Weinpert > > --------- > > > include <BOSL2/std.scad> > include <BOSL2/turtle3d.scad> > > $fn = 64; > handle(); > handleBend(); > > module handle(){ > path = turtle3d([ > "move",1, > ["arc",2,"up",36,"shrink",[1,2]], > "arcdown",2,72, > ["arc",2,"up",36,"grow",[1,2]], > "move",1 > ], > state=move([0,.75,.375]), > transforms=true > ); > > sweep( > ellipse( d=[.75,1.5] ), > path > ); > } > // > > module handleBend(){ > path = turtle3d([ > "move",1, > ["arc",2,"up",36,"left",45,"shrink",[1,2]], > "arcdown",2,72, > ["arc",2,"up",36,"right",45,"grow",[1,2]], > "move",1 > ], > state=move([0,.75,.375]), > transforms=true > ); > > sweep( > ellipse( d=[.75,1.5] ), > path > ); > } > // > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JW
Joe Weinpert
Mon, Sep 29, 2025 1:09 PM

Thanks.  Wish there was a way to determine how much the reference frame is
being spun when combining things like "up" and "left".
I was looking at all the "rollto" sub-commands but still can't figure out
how to use them (there are no examples).
Am trying the "arctodir" next to get the frame reference back.

Joe Weinpert
www.jwstudio.art http://jwstudio.art

On Sun, Sep 28, 2025 at 6:14 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:

I think the problem is that when you apply rotations it also spins the
reference frame, so the direction that is "up" or "left" is not where you
think it is.  This is really hard to deal with.  I added absolute rotations
to try to provide a tool for working around this.  You could also try
"rollto" to force the reference frame back into an orientation you
understand.  I have basically no experience actually using turtle3d so I
don't have any deeper insights.

On Sun, Sep 28, 2025 at 5:20 PM Joe Weinpert via Discuss <
discuss@lists.openscad.org> wrote:

I'm encountering an issue while using Turtle3D to create a handle. The
code consists of two modules: a standard module and a bending module.
The standard module functions as expected, but the bending module does
not produce the desired results. I anticipated that the handle would turn
left, then right, while remaining perpendicular to the z-axis, ultimately
lying flat on the starting plane. However, this is not happening.
The only difference between the two modules is the addition of "left" and
"right" movements to the "up" arcs in the bending module. What could I be
missing?

Joe Weinpert


include <BOSL2/std.scad>
include <BOSL2/turtle3d.scad>

$fn = 64;
handle();
handleBend();

module handle(){
path = turtle3d([
"move",1,
["arc",2,"up",36,"shrink",[1,2]],
"arcdown",2,72,
["arc",2,"up",36,"grow",[1,2]],
"move",1
],
state=move([0,.75,.375]),
transforms=true
);

sweep(
   ellipse( d=[.75,1.5] ),
   path
);

}
//

module handleBend(){
path = turtle3d([
"move",1,
["arc",2,"up",36,"left",45,"shrink",[1,2]],
"arcdown",2,72,
["arc",2,"up",36,"right",45,"grow",[1,2]],
"move",1
],
state=move([0,.75,.375]),
transforms=true
);

sweep(
   ellipse( d=[.75,1.5] ),
   path
);

}
//


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Thanks. Wish there was a way to determine how much the reference frame is being spun when combining things like "up" and "left". I was looking at all the "rollto" sub-commands but still can't figure out how to use them (there are no examples). Am trying the "arctodir" next to get the frame reference back. Joe Weinpert www.jwstudio.art <http://jwstudio.art> On Sun, Sep 28, 2025 at 6:14 PM Adrian Mariano via Discuss < discuss@lists.openscad.org> wrote: > I think the problem is that when you apply rotations it also spins the > reference frame, so the direction that is "up" or "left" is not where you > think it is. This is really hard to deal with. I added absolute rotations > to try to provide a tool for working around this. You could also try > "rollto" to force the reference frame back into an orientation you > understand. I have basically no experience actually using turtle3d so I > don't have any deeper insights. > > > On Sun, Sep 28, 2025 at 5:20 PM Joe Weinpert via Discuss < > discuss@lists.openscad.org> wrote: > >> I'm encountering an issue while using Turtle3D to create a handle. The >> code consists of two modules: a standard module and a bending module. >> The standard module functions as expected, but the bending module does >> not produce the desired results. I anticipated that the handle would turn >> left, then right, while remaining perpendicular to the z-axis, ultimately >> lying flat on the starting plane. However, this is not happening. >> The only difference between the two modules is the addition of "left" and >> "right" movements to the "up" arcs in the bending module. What could I be >> missing? >> >> Joe Weinpert >> >> --------- >> >> >> include <BOSL2/std.scad> >> include <BOSL2/turtle3d.scad> >> >> $fn = 64; >> handle(); >> handleBend(); >> >> module handle(){ >> path = turtle3d([ >> "move",1, >> ["arc",2,"up",36,"shrink",[1,2]], >> "arcdown",2,72, >> ["arc",2,"up",36,"grow",[1,2]], >> "move",1 >> ], >> state=move([0,.75,.375]), >> transforms=true >> ); >> >> sweep( >> ellipse( d=[.75,1.5] ), >> path >> ); >> } >> // >> >> module handleBend(){ >> path = turtle3d([ >> "move",1, >> ["arc",2,"up",36,"left",45,"shrink",[1,2]], >> "arcdown",2,72, >> ["arc",2,"up",36,"right",45,"grow",[1,2]], >> "move",1 >> ], >> state=move([0,.75,.375]), >> transforms=true >> ); >> >> sweep( >> ellipse( d=[.75,1.5] ), >> path >> ); >> } >> // >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org