Assign statement seems neccessary

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

Assign statement seems neccessary

Neon22
I was constructing this object in OpenSCAD http://www.thingiverse.com/thing:476845/#files
I downloaded the code and got the deprecation msg so I tried to remove the assign statements.

Unfortunately the end results does not match. It appears the Assign allows a sweep to occur and simple variable assignment creates discrete objects.
Please compare these two images.
Is there a way to get the same result without using the Assign statement ?
comparison using Assign statement
Original code with Assign statement
Test-bridging_spiral-orig.scad
My attempt to remove it
Test-bridging_spiral-noassign.scad

Debug variable info is echo'd - and appears identical.
Reply | Threaded
Open this post in threaded view
|

Re: Assign statement seems neccessary

nophead
If you simply replace the assigns with assignment statements it works fine but you also made other changes and broke it by adding a semicolon after the hull on line 85.

Note there was no need to change the variable names.

On 1 July 2015 at 08:24, Neon22 <[hidden email]> wrote:
I was constructing this object in OpenSCAD
http://www.thingiverse.com/thing:476845/#files
I downloaded the code and got the deprecation msg so I tried to remove the
assign statements.

Unfortunately the end results does not match. It appears the Assign allows a
sweep to occur and simple variable assignment creates discrete objects.
Please compare these two images.
Is there a way to get the same result without using the Assign statement ?
<http://forum.openscad.org/file/n12966/OpenSCAD-bridging_spiral-Assign-statement.png>
Original code with Assign statement
Test-bridging_spiral-orig.scad
<http://forum.openscad.org/file/n12966/Test-bridging_spiral-orig.scad>
My attempt to remove it
Test-bridging_spiral-noassign.scad
<http://forum.openscad.org/file/n12966/Test-bridging_spiral-noassign.scad>

Debug variable info is echo'd - and appears identical.



--
View this message in context: http://forum.openscad.org/Assign-statement-seems-neccessary-tp12966.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
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: Assign statement seems neccessary

nophead
You also broke the hull on line 66 but that makes little visual difference. It just fill in some small gaps at the end of the spokes.

On 1 July 2015 at 10:40, nop head <[hidden email]> wrote:
If you simply replace the assigns with assignment statements it works fine but you also made other changes and broke it by adding a semicolon after the hull on line 85.

Note there was no need to change the variable names.

On 1 July 2015 at 08:24, Neon22 <[hidden email]> wrote:
I was constructing this object in OpenSCAD
http://www.thingiverse.com/thing:476845/#files
I downloaded the code and got the deprecation msg so I tried to remove the
assign statements.

Unfortunately the end results does not match. It appears the Assign allows a
sweep to occur and simple variable assignment creates discrete objects.
Please compare these two images.
Is there a way to get the same result without using the Assign statement ?
<http://forum.openscad.org/file/n12966/OpenSCAD-bridging_spiral-Assign-statement.png>
Original code with Assign statement
Test-bridging_spiral-orig.scad
<http://forum.openscad.org/file/n12966/Test-bridging_spiral-orig.scad>
My attempt to remove it
Test-bridging_spiral-noassign.scad
<http://forum.openscad.org/file/n12966/Test-bridging_spiral-noassign.scad>

Debug variable info is echo'd - and appears identical.



--
View this message in context: http://forum.openscad.org/Assign-statement-seems-neccessary-tp12966.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
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: Assign statement seems neccessary

Neon22
In reply to this post by Neon22
Thanks nophead. Looks like I'm the knobhead.
Those pesky semicolons...
The names were changed to hepl me to undestand what the code was doing (of course).

Cheers...