I am trying to design a complex wire model, and it is not going well.
Is there any way to insert a "#" inside a list of commands to turtle3d()
to show me exactly which segment I am working on at a given moment?
That would be very helpful. Something like this:
' path = turtle3d(["left", "ymove", 10, "arcright", r, "arcup", r,
"#", "arcyrot", r, -120, "arcleft", 2r, 40, "arcleft", r/2, 120,
"arcleft", 2r, 30], transforms=true);
No, there is no way to do that. Since turtle3d just produces a list of
points or matrices...how would that be possible?
Would it help to truncate your list of commands? I often write turtle(3d)
arguments with one command per line, which
makes it easy to comment out sections of the command list, and that can
help in debugging.
On Sat, Oct 22, 2022 at 10:45 AM jon jon@jonbondy.com wrote:
I am trying to design a complex wire model, and it is not going well.
Is there any way to insert a "#" inside a list of commands to turtle3d()
to show me exactly which segment I am working on at a given moment?
That would be very helpful. Something like this:
' path = turtle3d(["left", "ymove", 10, "arcright", r, "arcup", r,
"#", "arcyrot", r, -120, "arcleft", 2r, 40, "arcleft", r/2, 120,
"arcleft", 2r, 30], transforms=true);
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Adrian:
Now that I think of it, you are correct: there is no way to do that,
since the generation of the path using turtle3d() and the generation of
the sweep are separate.
Yes, I can truncate the list of commands, but have been finding this to
be awkward and unsatisfactory. Would there be a way to add an "exit"
entry to a path which caused the path to be terminated prematurely, to
more easily allowing programmers to move the end of the path around?
Maybe that would not add anything useful.
I further guess that there is no way for sweep() to create a single
object where one piece of it was displayed differently ('#'). Perhaps
one could create 3 paths (the "before" path, the "#" object/path, and
the "after" path) and have sweep() create the middle object with "#".
Or add a parameter "p" (for position) to sweep() so that sweep() itself
created the object as three separate objects.
Just brainstorming here. I have no faith that anything I've said is
useful or feasible.
Thanks
Jon
On 10/22/2022 10:55 AM, Adrian Mariano wrote:
No, there is no way to do that. Since turtle3d just produces a list
of points or matrices...how would that be possible?
Would it help to truncate your list of commands? I often write
turtle(3d) arguments with one command per line, which
makes it easy to comment out sections of the command list, and that
can help in debugging.
On Sat, Oct 22, 2022 at 10:45 AM jon jon@jonbondy.com wrote:
I am trying to design a complex wire model, and it is not going well.
Is there any way to insert a "#" inside a list of commands to
turtle3d()
to show me exactly which segment I am working on at a given moment?
That would be very helpful. Something like this:
' path = turtle3d(["left", "ymove", 10, "arcright", r, "arcup", r,
"#", "arcyrot", r, -120, "arcleft", 2*r, 40, "arcleft", r/2, 120,
"arcleft", 2*r, 30], transforms=true);
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
Just for context, this is what I am working on. At one point, the input
and output wires were co-axial, but now they are not, and finding out
exactly where I am going wrong has been more time consuming than I would
have liked.
include <BOSL2/std.scad>
include <BOSL2/turtle3d.scad>
include<BOSL2/skin.scad>
bh = 7; // base height
rd = 9; // rope diameter
sdd = 8; // screw driver diameter
sd = 4; // screw diameter
csd = 11.5; // counter sink diameter
csh = 2; // counter sink height
wi = 25; // x
de = 25; // y
ht = 23.5; // z
ryo = 9; // rope Y offset
rzo = bh + rd/2 + 3; // rope Z offset
wd = 3; // wire diameter
module WireHook() {
r = 0.65 * rd; //0.65 is empirical
//path = turtle3d(["up", 5, "repeat", 12,
["move",10,"arczrot",4]],transforms=true);
path = turtle3d([
"left", "ymove", 10, "arcright", r, "arcup", r, "arcyrot", r, -120,
// "arcleft", r, "arcleft", r,
"arcleft", 2r, 40, "arcleft", r/2, 110, "arcleft", 2r, 30,
"arcyrot", r, 120, "arcup", r, "arcright", r, "ymove", 10
], transforms=true);
sweep(circle(d=wd, $fn=50), path);
}
On 10/22/2022 11:04 AM, jon wrote:
Adrian:
Now that I think of it, you are correct: there is no way to do that,
since the generation of the path using turtle3d() and the generation
of the sweep are separate.
Yes, I can truncate the list of commands, but have been finding this
to be awkward and unsatisfactory. Would there be a way to add an
"exit" entry to a path which caused the path to be terminated
prematurely, to more easily allowing programmers to move the end of
the path around? Maybe that would not add anything useful.
I further guess that there is no way for sweep() to create a single
object where one piece of it was displayed differently ('#'). Perhaps
one could create 3 paths (the "before" path, the "#" object/path, and
the "after" path) and have sweep() create the middle object with "#".
Or add a parameter "p" (for position) to sweep() so that sweep()
itself created the object as three separate objects.
Just brainstorming here. I have no faith that anything I've said is
useful or feasible.
Thanks
Jon
On 10/22/2022 10:55 AM, Adrian Mariano wrote:
No, there is no way to do that. Since turtle3d just produces a list
of points or matrices...how would that be possible?
Would it help to truncate your list of commands? I often write
turtle(3d) arguments with one command per line, which
makes it easy to comment out sections of the command list, and that
can help in debugging.
On Sat, Oct 22, 2022 at 10:45 AM jon jon@jonbondy.com wrote:
I am trying to design a complex wire model, and it is not going
well.
Is there any way to insert a "#" inside a list of commands to
turtle3d()
to show me exactly which segment I am working on at a given moment?
That would be very helpful. Something like this:
' path = turtle3d(["left", "ymove", 10, "arcright", r,
"arcup", r,
"#", "arcyrot", r, -120, "arcleft", 2*r, 40, "arcleft", r/2, 120,
"arcleft", 2*r, 30], transforms=true);
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
I maybe don't know what what you're trying to do, but when I rewrote your
code like this I got a nicer looking hook where the start/end sections are
coaxial:
path = turtle3d([
"left",
"ymove", 10,
"arcright", r,
"arcup", r,
"arcyrot", r, -120,
// "arcleft", r, "arcleft", r,
"arcleft", 2r, 35, // Was 40
"arcleft", r/2, 110,
"arcleft", 2r, 35, // Was 30
"arcyrot", r, 120,
"arcup", r,
"arcright", r,
"ymove", 10
], transforms=true);
There was a glaring asymmetry where you had 40 110 30 as the 180 degree
turn in the middle.
On Sat, Oct 22, 2022 at 11:08 AM jon jon@jonbondy.com wrote:
Just for context, this is what I am working on. At one point, the input
and output wires were co-axial, but now they are not, and finding out
exactly where I am going wrong has been more time consuming than I would
have liked.
include <BOSL2/std.scad>
include <BOSL2/turtle3d.scad>
include<BOSL2/skin.scad>
bh = 7; // base height
rd = 9; // rope diameter
sdd = 8; // screw driver diameter
sd = 4; // screw diameter
csd = 11.5; // counter sink diameter
csh = 2; // counter sink height
wi = 25; // x
de = 25; // y
ht = 23.5; // z
ryo = 9; // rope Y offset
rzo = bh + rd/2 + 3; // rope Z offset
wd = 3; // wire diameter
module WireHook() {
r = 0.65 * rd; //0.65 is empirical
//path = turtle3d(["up", 5, "repeat", 12,
["move",10,"arczrot",4]],transforms=true);
path = turtle3d([
"left", "ymove", 10, "arcright", r, "arcup", r, "arcyrot", r, -120,
// "arcleft", r, "arcleft", r,
"arcleft", 2r, 40, "arcleft", r/2, 110, "arcleft", 2r, 30,
"arcyrot", r, 120, "arcup", r, "arcright", r, "ymove", 10
], transforms=true);
sweep(circle(d=wd, $fn=50), path);
}
On 10/22/2022 11:04 AM, jon wrote:
Adrian:
Now that I think of it, you are correct: there is no way to do that, since
the generation of the path using turtle3d() and the generation of the sweep
are separate.
Yes, I can truncate the list of commands, but have been finding this to be
awkward and unsatisfactory. Would there be a way to add an "exit" entry
to a path which caused the path to be terminated prematurely, to more
easily allowing programmers to move the end of the path around? Maybe that
would not add anything useful.
I further guess that there is no way for sweep() to create a single object
where one piece of it was displayed differently ('#'). Perhaps one could
create 3 paths (the "before" path, the "#" object/path, and the "after"
path) and have sweep() create the middle object with "#". Or add a
parameter "p" (for position) to sweep() so that sweep() itself created the
object as three separate objects.
Just brainstorming here. I have no faith that anything I've said is
useful or feasible.
Thanks
Jon
On 10/22/2022 10:55 AM, Adrian Mariano wrote:
No, there is no way to do that. Since turtle3d just produces a list of
points or matrices...how would that be possible?
Would it help to truncate your list of commands? I often write turtle(3d)
arguments with one command per line, which
makes it easy to comment out sections of the command list, and that can
help in debugging.
On Sat, Oct 22, 2022 at 10:45 AM jon jon@jonbondy.com wrote:
I am trying to design a complex wire model, and it is not going well.
Is there any way to insert a "#" inside a list of commands to turtle3d()
to show me exactly which segment I am working on at a given moment?
That would be very helpful. Something like this:
' path = turtle3d(["left", "ymove", 10, "arcright", r, "arcup", r,
"#", "arcyrot", r, -120, "arcleft", 2r, 40, "arcleft", r/2, 120,
"arcleft", 2r, 30], transforms=true);
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
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Thanks for debugging my code. I was flailing, and you fixed the
discrepancy. Thank you
On 10/22/2022 11:34 AM, Adrian Mariano wrote:
I maybe don't know what what you're trying to do, but when I rewrote
your code like this I got a nicer looking hook where the start/end
sections are coaxial:
path = turtle3d([
"left",
"ymove", 10,
"arcright", r,
"arcup", r,
"arcyrot", r, -120,
// "arcleft", r, "arcleft", r,
"arcleft", 2r, 35, // Was 40
"arcleft", r/2, 110,
"arcleft", 2r, 35, // Was 30
"arcyrot", r, 120,
"arcup", r,
"arcright", r,
"ymove", 10
], transforms=true);
There was a glaring asymmetry where you had 40 110 30 as the 180
degree turn in the middle.