General hints for efficiency?

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

General hints for efficiency?

Manuel
Since I tend to end up with models that take ages to render and quite often
fail to do so at all because of RAM running out, I assume I'm doing
something wrong. Are there any general hints on how to write efficient
OpenSCAD code? I didn't find much in the manual.



--
Sent from: http://forum.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: General hints for efficiency?

codifies
look at the "special" variables (in the manual) such as $fn and turn
them right down while developing your model, you can always turn them up
later for a final render - and often even with seemingly low settings
the exported STL can be "good enough"


On 21/12/17 16:30, Manuel wrote:

> Since I tend to end up with models that take ages to render and quite often
> fail to do so at all because of RAM running out, I assume I'm doing
> something wrong. Are there any general hints on how to write efficient
> OpenSCAD code? I didn't find much in the manual.
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> 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: General hints for efficiency?

Jamie Bainbridge
With current nightly, you can do this to make it happen automatically:

$fn = $preview ? 12 : 360;



On 22 December 2017 at 03:01, Chris Camacho <[hidden email]> wrote:

> look at the "special" variables (in the manual) such as $fn and turn them
> right down while developing your model, you can always turn them up later
> for a final render - and often even with seemingly low settings the exported
> STL can be "good enough"
>
>
> On 21/12/17 16:30, Manuel wrote:
>>
>> Since I tend to end up with models that take ages to render and quite
>> often
>> fail to do so at all because of RAM running out, I assume I'm doing
>> something wrong. Are there any general hints on how to write efficient
>> OpenSCAD code? I didn't find much in the manual.
>>
>>
>>
>> --
>> Sent from: http://forum.openscad.org/
>>
>> _______________________________________________
>> 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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

TLC123
In reply to this post by Manuel
Use 2d subsystems when ever possible.
Use star * to hide anything you're not working on at the moment.



--
Sent from: http://forum.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: General hints for efficiency?

Gadgetmind
In reply to this post by codifies
On 2017-12-21 17:01, Chris Camacho wrote:
> look at the "special" variables (in the manual) such as $fn and turn
> them right down while developing your model, you can always turn them
> up later for a final render

I do this extensively and always tend to do final renders from a make
file that passes in variables to control detail and which part to
create. Many of my designs have tens or even hundreds of separate parts
than need rendering to STLs and printing and a make file is the only way
to keep this sane.

I also turn off a lot of detail when working on unrelated parts,
particularly any surface detail like text cutouts on surfaces.

And perhaps controversially, I used the CSD features of OpenSCAD rather
sparingly and most of my geometry is generated by
functions/iterators/splines/etc., then transformed using matrices, and
finally skinned with triangles. I then mainly use CSD to "slice" my
object into different parts for printing, though there's always a lot of
unioning going on in the background.

BTW I pretty much never use minkowski and even find hull to be worth
avoiding if at all possible.

Regards

Ian



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

jdawgaz
I do a lot of CAD stuff.
I do the best I can when I measure stuff, like where holes ought to be placed.
But I always end up tweaking until it is perfect.

Rather than print the entire thing, while I am tweaking a smaller part of it, I use intersection with a cube to only render exactly what I am working on at the moment.

I save a lot of time, and filament while tweaking.

Then when I am satisfied with every part of the design, I bite the bullet and do the entire design.

Also, if the design I am working on, is capable of being done in parts (that can be glued together later, I use the same technique, to print each part separately.

Jerry


--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Fri, Dec 22, 2017 at 2:46 AM, Gadgetmind <[hidden email]> wrote:
On 2017-12-21 17:01, Chris Camacho wrote:
look at the "special" variables (in the manual) such as $fn and turn them right down while developing your model, you can always turn them up later for a final render

I do this extensively and always tend to do final renders from a make file that passes in variables to control detail and which part to create. Many of my designs have tens or even hundreds of separate parts than need rendering to STLs and printing and a make file is the only way to keep this sane.

I also turn off a lot of detail when working on unrelated parts, particularly any surface detail like text cutouts on surfaces.

And perhaps controversially, I used the CSD features of OpenSCAD rather sparingly and most of my geometry is generated by functions/iterators/splines/etc., then transformed using matrices, and finally skinned with triangles. I then mainly use CSD to "slice" my object into different parts for printing, though there's always a lot of unioning going on in the background.

BTW I pretty much never use minkowski and even find hull to be worth avoiding if at all possible.

Regards

Ian




_______________________________________________
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: General hints for efficiency?

Gadgetmind
On 22/12/17 14:20, Jerry Davis wrote:
> Also, if the design I am working on, is capable of being done in parts
> (that can be glued together later, I use the same technique, to print
> each part separately.

Ditto, but often because parts will be different colours or would
require supports otherwise.

I tend to design in 1.75mm holes between mating parts so filament can be
used to join them when prototyping and it also acts as a guide when
finally glueing.

See my Thunderbird 1 on Thingiverse (or work in progress Fireflash) to
get the idea.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

JordanBrown
On 12/22/2017 10:49 AM, Gadgetmind wrote:
On 22/12/17 14:20, Jerry Davis wrote:
Also, if the design I am working on, is capable of being done in parts (that can be glued together later, I use the same technique, to print each part separately.

Ditto, but often because parts will be different colours or would require supports otherwise.

I've been doing that more, but my reason is that it lets me built thin parts and still have them be strong, by keeping them in XY.




_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

BruceXling
In reply to this post by Gadgetmind


Gadgetmind wrote
> On 22/12/17 14:20, Jerry Davis wrote:
> I tend to design in 1.75mm holes between mating parts so filament can be
> used to join them when prototyping and it also acts as a guide when
> finally glueing.___________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Could I please ask what glue is best used with PLA and ABS?



--
Sent from: http://forum.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: General hints for efficiency?

nophead
ABS can be solvent welded with acetone or solvent adhesive that contains MEK. That gives a full strength weld after the solvent has completely evaporated.

On 22 December 2017 at 21:40, BruceXling <[hidden email]> wrote:


Gadgetmind wrote
> On 22/12/17 14:20, Jerry Davis wrote:
> I tend to design in 1.75mm holes between mating parts so filament can be
> used to join them when prototyping and it also acts as a guide when
> finally glueing.___________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Could I please ask what glue is best used with PLA and ABS?



--
Sent from: http://forum.openscad.org/

_______________________________________________
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: General hints for efficiency?

JordanBrown
In reply to this post by BruceXling
On 12/22/2017 1:40 PM, BruceXling wrote:
Could I please ask what glue is best used with PLA and ABS?

The advice that I've been given for PLA is a cyanoacrylate (CA) glue, also known as a superglue.

This is the stuff that I use:  http://www.bsi-inc.com/hobby/insta_cure_plus.html
It appears to be available at Amazon.  I buy it (rebranded) from my local hobby shop.  I use it for model rockets (primarily cardboard and balsa), for PLA, and for general household fixing.
BSI seems to recommend the pink MAXI-CURE stuff for plastics; I haven't tried it.  (Buy some solvent too:  http://bsi-inc.com/hobby/un_cure.html )

Wikipedia says that you can weld PLA with dicholoromethane.  An Amazon search shows a plausible glue that lists dichloromethane as an ingredient:   https://www.amazon.com/SCIGRIP-10315-Acrylic-Cement-Low-VOC/dp/B003HNFLMY .  It doesn't mention PLA, but does mention bonding PVC, ABS, and several other plastics.  That's a pretty big tube for my kind of work, and the 5-6 minute work time is longer than I'd like - the CA gives me maybe 20 seconds, and that's good.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

David B. Gustavson
I bought some tetrahydrofuran because it's supposed to work with PLA, but I don't find it useful. It behaves nothing like ABS does with acetone. As a result I mainly work with ABS.
However, I did not try heating the tetrahydrofuran, which might make a difference. Seems a bit scary.

Dave Gustavson

On Fri, Dec 22, 2017, at 7:27 PM, Jordan Brown wrote:
On 12/22/2017 1:40 PM, BruceXling wrote:
Could I please ask what glue is best used with PLA and ABS?

The advice that I've been given for PLA is a cyanoacrylate (CA) glue, also known as a superglue.

This is the stuff that I use:  http://www.bsi-inc.com/hobby/insta_cure_plus.html
It appears to be available at Amazon.  I buy it (rebranded) from my local hobby shop.  I use it for model rockets (primarily cardboard and balsa), for PLA, and for general household fixing.
BSI seems to recommend the pink MAXI-CURE stuff for plastics; I haven't tried it.  (Buy some solvent too:  http://bsi-inc.com/hobby/un_cure.html )

Wikipedia says that you can weld PLA with dicholoromethane.  An Amazon search shows a plausible glue that lists dichloromethane as an ingredient:   https://www.amazon.com/SCIGRIP-10315-Acrylic-Cement-Low-VOC/dp/B003HNFLMY .  It doesn't mention PLA, but does mention bonding PVC, ABS, and several other plastics.  That's a pretty big tube for my kind of work, and the 5-6 minute work time is longer than I'd like - the CA gives me maybe 20 seconds, and that's good.


_______________________________________________
OpenSCAD mailing list


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

nophead
Ethyl acetate is a much less scary solvent for PLA. I haven't tried bonding with it but it does dissolve PLA but perhaps not the pigments and other additives.

On 23 December 2017 at 03:46, David Gustavson <[hidden email]> wrote:
I bought some tetrahydrofuran because it's supposed to work with PLA, but I don't find it useful. It behaves nothing like ABS does with acetone. As a result I mainly work with ABS.
However, I did not try heating the tetrahydrofuran, which might make a difference. Seems a bit scary.

Dave Gustavson


On Fri, Dec 22, 2017, at 7:27 PM, Jordan Brown wrote:
On 12/22/2017 1:40 PM, BruceXling wrote:
Could I please ask what glue is best used with PLA and ABS?

The advice that I've been given for PLA is a cyanoacrylate (CA) glue, also known as a superglue.

This is the stuff that I use:  http://www.bsi-inc.com/hobby/insta_cure_plus.html
It appears to be available at Amazon.  I buy it (rebranded) from my local hobby shop.  I use it for model rockets (primarily cardboard and balsa), for PLA, and for general household fixing.
BSI seems to recommend the pink MAXI-CURE stuff for plastics; I haven't tried it.  (Buy some solvent too:  http://bsi-inc.com/hobby/un_cure.html )

Wikipedia says that you can weld PLA with dicholoromethane.  An Amazon search shows a plausible glue that lists dichloromethane as an ingredient:   https://www.amazon.com/SCIGRIP-10315-Acrylic-Cement-Low-VOC/dp/B003HNFLMY .  It doesn't mention PLA, but does mention bonding PVC, ABS, and several other plastics.  That's a pretty big tube for my kind of work, and the 5-6 minute work time is longer than I'd like - the CA gives me maybe 20 seconds, and that's good.


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

Neon22

carb cleaner also dissolves PLA - and makes it soft and pliable for quite along time too. Its mainly the Toluene I think. Causes a 20% increase in volume until it evaporates...
- https://www.thingiverse.com/thing:987604


On 12/23/2017 9:51 PM, nop head wrote:
Ethyl acetate is a much less scary solvent for PLA. I haven't tried bonding with it but it does dissolve PLA but perhaps not the pigments and other additives.

On 23 December 2017 at 03:46, David Gustavson <[hidden email]> wrote:
I bought some tetrahydrofuran because it's supposed to work with PLA, but I don't find it useful. It behaves nothing like ABS does with acetone. As a result I mainly work with ABS.
However, I did not try heating the tetrahydrofuran, which might make a difference. Seems a bit scary.

Dave Gustavson


On Fri, Dec 22, 2017, at 7:27 PM, Jordan Brown wrote:
On 12/22/2017 1:40 PM, BruceXling wrote:
Could I please ask what glue is best used with PLA and ABS?

The advice that I've been given for PLA is a cyanoacrylate (CA) glue, also known as a superglue.

This is the stuff that I use:  http://www.bsi-inc.com/hobby/insta_cure_plus.html
It appears to be available at Amazon.  I buy it (rebranded) from my local hobby shop.  I use it for model rockets (primarily cardboard and balsa), for PLA, and for general household fixing.
BSI seems to recommend the pink MAXI-CURE stuff for plastics; I haven't tried it.  (Buy some solvent too:  http://bsi-inc.com/hobby/un_cure.html )

Wikipedia says that you can weld PLA with dicholoromethane.  An Amazon search shows a plausible glue that lists dichloromethane as an ingredient:   https://www.amazon.com/SCIGRIP-10315-Acrylic-Cement-Low-VOC/dp/B003HNFLMY .  It doesn't mention PLA, but does mention bonding PVC, ABS, and several other plastics.  That's a pretty big tube for my kind of work, and the 5-6 minute work time is longer than I'd like - the CA gives me maybe 20 seconds, and that's good.




_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

RobWLakes

I hope you guys are consulting something like the Merck Index on the safety of this stuff you are playing with.  Or at least managing precautions like fume cabinets etc. Having worked in a university research lab during the cavalier 1970's I was glad afterwards I did not end up with a long career in that line of work.  Too many chemicals, too many unknowns.

Rob


On 23/12/17 21:36, Mark Schafer wrote:

carb cleaner also dissolves PLA - and makes it soft and pliable for quite along time too. Its mainly the Toluene I think. Causes a 20% increase in volume until it evaporates...
- https://www.thingiverse.com/thing:987604


On 12/23/2017 9:51 PM, nop head wrote:
Ethyl acetate is a much less scary solvent for PLA. I haven't tried bonding with it but it does dissolve PLA but perhaps not the pigments and other additives.

On 23 December 2017 at 03:46, David Gustavson <[hidden email]> wrote:
I bought some tetrahydrofuran because it's supposed to work with PLA, but I don't find it useful. It behaves nothing like ABS does with acetone. As a result I mainly work with ABS.
However, I did not try heating the tetrahydrofuran, which might make a difference. Seems a bit scary.

Dave Gustavson


On Fri, Dec 22, 2017, at 7:27 PM, Jordan Brown wrote:
On 12/22/2017 1:40 PM, BruceXling wrote:
Could I please ask what glue is best used with PLA and ABS?

The advice that I've been given for PLA is a cyanoacrylate (CA) glue, also known as a superglue.

This is the stuff that I use:  http://www.bsi-inc.com/hobby/insta_cure_plus.html
It appears to be available at Amazon.  I buy it (rebranded) from my local hobby shop.  I use it for model rockets (primarily cardboard and balsa), for PLA, and for general household fixing.
BSI seems to recommend the pink MAXI-CURE stuff for plastics; I haven't tried it.  (Buy some solvent too:  http://bsi-inc.com/hobby/un_cure.html )

Wikipedia says that you can weld PLA with dicholoromethane.  An Amazon search shows a plausible glue that lists dichloromethane as an ingredient:   https://www.amazon.com/SCIGRIP-10315-Acrylic-Cement-Low-VOC/dp/B003HNFLMY .  It doesn't mention PLA, but does mention bonding PVC, ABS, and several other plastics.  That's a pretty big tube for my kind of work, and the 5-6 minute work time is longer than I'd like - the CA gives me maybe 20 seconds, and that's good.





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

--

Rob Ward
Lake Tyers Beach, 3909
Lake Tyers Beach Website
Ubuntu Mate - A great OS


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Rob W
Lake Tyers Beach,
Victoria, Australia
Reply | Threaded
Open this post in threaded view
|

Re: General hints for efficiency?

Gadgetmind
In reply to this post by BruceXling
On 22/12/17 21:40, BruceXling wrote:
> Could I please ask what glue is best used with PLA and ABS?

Just get normal Plastic Weld, which is methylene chloride
(dichloromethane). It's safer than many of the others mentioned, easy to
apply with a brush, gives you a little working time to adjust position,
and the joint gets strong very quickly unless you applied too much.

https://www.amazon.co.uk/Plastic-Weld-Cement/dp/B0053WXLVU

As mentioned by others, acetone works with ABS, but so does Plastic Weld
and I find it doesn't cause the "bloom" that acetone can give.

I do use cyanoacrylate too but usually if I think I might need to part
the pieces later. It tends to give a strong but brittle joint and a
sharp tap can often get it apart.



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