How to check if a file exist? Why not export() from code?

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

How to check if a file exist? Why not export() from code?

jpmendes
Hi,

Is it possible to check from the code if a .stl or other files exist ?
Another question:
Since we may render an object from inside a module, why is not possible or is difficult to have an export() functionality from code? Maybe export() would be possible only outside a module?

Actually it is possible to have:

module ABC() {
  import("ABC.stl");
}
 ABC();

However from the questions above, if solved, I would imagine something like this:

module ABC() export(ABC_flg,ABC.stl) render(){
  ABC_flg=true;
  if file ABC.stl exist then
     ABC_flg=false;
     import("ABC.stl");
  else
     ABC code;
   }
}

or in alternative:

module ABC() render(){
  ABC_flg=true;
  if file ABC.stl exist then
     ABC_flg=false;
     import("ABC.stl");
  else
     ABC code;
   }
}

export(ABC_flg,ABC.stl);
or even:
export(ABC_flg,ABC.stl, DEF_flg, DEF.stl, GHI_flg, GHI.stl etc...);

These would be great constructs to easily achieve fluidity.
I'm not an expert, please have mercy :)
 
Thanks.
jpmendes
Reply | Threaded
Open this post in threaded view
|

Re: How to check if a file exist? Why not export() from code?

doug.moen
The file management features you want belong in a scripting language, not in OpenSCAD.

You can write a script in an existing scripting language like bash, or perl, or python, which invokes OpenSCAD as a command each time it needs to convert a model to a single STL file: use the -o option. That's how this sort of thing is usually done. You can also communicate information from the script into OpenSCAD (like, whether it should import a partiular file) by setting OpenSCAD variables like ABC_flg, using the -D option.

On 6 December 2015 at 13:02, jpmendes <[hidden email]> wrote:
Hi,

Is it possible to check from the code if a .stl or other files exist ?
Another question:
Since we may render an object from inside a module, why is not possible or
is difficult to have an export() functionality from code? Maybe export()
would be possible only outside a module?

Actually it is possible to have:

module ABC() {
  import("ABC.stl");
}
 ABC();

However from the questions above, if solved, I would imagine something like
this:

module ABC() export(ABC_flg,ABC.stl) render(){
  ABC_flg=true;
  if file ABC.stl exist then
     ABC_flg=false;
     import("ABC.stl");
  else
     ABC code;
   }
}

or in alternative:

module ABC() render(){
  ABC_flg=true;
  if file ABC.stl exist then
     ABC_flg=false;
     import("ABC.stl");
  else
     ABC code;
   }
}

export(ABC_flg,ABC.stl);
or even:
export(ABC_flg,ABC.stl, DEF_flg, DEF.stl, GHI_flg, GHI.stl etc...);

These would be great constructs to easily achieve fluidity.
I'm not an expert, please have mercy :)

Thanks.
jpmendes



--
View this message in context: http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982.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: How to check if a file exist? Why not export() from code?

jpmendes
This post was updated on .
Hi Doug thanks for the reply.

However not all the guys who want to make composite objects using OpenSCAD are programmers. I'm not, and I think many of us aren't also. The objective is to have results faster. As I pointed out  "These would be great constructs to easily achieve fluidity."
In this way we could achieve view fluidity on the fly as the composite object in construction progresses.
I think that the objective of openSCAD is to help make real and useful things fast, for the mathematicians and theoreticians there are really an abundant number of languages where they can express themselves.
Additionally cache saving would not be needed. And it would not contend with modules designed with earlier OpenSCAD versions.

Regards
jpmendes
Reply | Threaded
Open this post in threaded view
|

Re: How to check if a file exist? Why not export() from code?

doug.moen
In reply to this post by jpmendes
There are technical issues which prevent us from implementing the specific feature you have designed. Your problem will need to be solved in some other way.

What are problem are you trying to solve, at the higher level? What do you mean by a "composite object"?

So far, I only have the impression that you want to build several different geometric objects, and export each to a different STL file. That can be done using a separate SCAD file for each object. If the problem is to share common code between the separate SCAD files, then that can be done using the 'include' or 'use' statements. But you also want to test if a specific STL file exists, and I'm not sure why.

The existing documentation for using the openscad command line interface from a scripting language is here. I'll admit that it isn't very user friendly right now, and probably doesn't address your specific use case.

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment

On 6 December 2015 at 13:02, jpmendes <[hidden email]> wrote:
Hi,

Is it possible to check from the code if a .stl or other files exist ?
Another question:
Since we may render an object from inside a module, why is not possible or
is difficult to have an export() functionality from code? Maybe export()
would be possible only outside a module?

Actually it is possible to have:

module ABC() {
  import("ABC.stl");
}
 ABC();

However from the questions above, if solved, I would imagine something like
this:

module ABC() export(ABC_flg,ABC.stl) render(){
  ABC_flg=true;
  if file ABC.stl exist then
     ABC_flg=false;
     import("ABC.stl");
  else
     ABC code;
   }
}

or in alternative:

module ABC() render(){
  ABC_flg=true;
  if file ABC.stl exist then
     ABC_flg=false;
     import("ABC.stl");
  else
     ABC code;
   }
}

export(ABC_flg,ABC.stl);
or even:
export(ABC_flg,ABC.stl, DEF_flg, DEF.stl, GHI_flg, GHI.stl etc...);

These would be great constructs to easily achieve fluidity.
I'm not an expert, please have mercy :)

Thanks.
jpmendes



--
View this message in context: http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982.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: How to check if a file exist? Why not export() from code?

jpmendes
This post was updated on .
Hi Doug,

A composite object is to me a multi part object. I'm not English native speaking, sorry.
If there are technical issues ok no problem.

Why do I would need to check if a file (.stl) exist? Because if true it would be simply imported if false the code would be compiled rendered and exported, and all would be automatic. Need to change a module? Simply delete the .stl file with the same name or change the export() flag.
   
I know it can actually be done in a non automatic way with some additional effort.

OpenSCAD lacks measurement facilities. So it is very important to me to zoom, pan and rotate a multi part object with fluidity as it is being built.
   
Thanks anyway.
jpmendes


Reply | Threaded
Open this post in threaded view
|

Re: How to check if a file exist? Why not export() from code?

nophead
If you use render() around each object you will get the almost effect you want because the geometry is calculated and then cached. From then on it renders instantaneously. It only gets recalculated if something it depends on changes. The only downside is once you quit openscad the cache is lost, so it takes time to start again from scratch. An advantage is it automatically keeps track of dependences. Under your scheme you would have to remember to delete the stl files when anything that affected them changed.

On 7 December 2015 at 15:54, jpmendes <[hidden email]> wrote:
Hi Doug,

A composite object is to me a multi part object. I'm not English native
speaking, sorry.
If there are technical issues ok no problem.

Why do I would need to check if a file (.stl) exist? Because if true it
would be simply imported if false the code would be compiled rendered and
exported, and all would be automatic. Need to change a module? Simply delete
the .stl file with the same name or change the export() flag.

I know it can actually be done in a non automatic way with some additional
effort.

OpenSCAD lacks measurement facilities. So it is very important to me to see,
pan and rotate a multi part object with fluidity as it is being built.

Thanks anyway.
jpmendes






--
View this message in context: http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15010.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: How to check if a file exist? Why not export() from code?

jpmendes
I know that. However imagine a 30 different part object! Every time you start a session you loose 2 or more hours just to see the assembled object?  Obviously I can render each module save it as an STL file. Then I can be editing a sub-part  in one OpenSCAD instance and have another instance of OpenSCAD opened consisting mainly of a list of imports, rotations and translations, just to see, place and adjust the position of the parts in the assembled set. It is possible yes but not practical from my point of view.

Maybe this should be the right way. The professional designer/builder have to obey to more strict rules  and procedures than an occasional designer/builder like me.

Thanks guys
jpmendes








 
Reply | Threaded
Open this post in threaded view
|

Re: How to check if a file exist? Why not export() from code?

Tim V. Shaporev
In reply to this post by nophead
If I understand properly, make is intended to resolve the latter issue.

Just my $0.02
Tim

On 07.12.2015 19:28, nop head wrote:

> If you use render() around each object you will get the almost effect
> you want because the geometry is calculated and then cached. From then
> on it renders instantaneously. It only gets recalculated if something it
> depends on changes. The only downside is once you quit openscad the
> cache is lost, so it takes time to start again from scratch. An
> advantage is it automatically keeps track of dependences. Under your
> scheme you would have to remember to delete the stl files when anything
> that affected them changed.
>
> On 7 December 2015 at 15:54, jpmendes <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Doug,
>
>     A composite object is to me a multi part object. I'm not English native
>     speaking, sorry.
>     If there are technical issues ok no problem.
>
>     Why do I would need to check if a file (.stl) exist? Because if true it
>     would be simply imported if false the code would be compiled
>     rendered and
>     exported, and all would be automatic. Need to change a module?
>     Simply delete
>     the .stl file with the same name or change the export() flag.
>
>     I know it can actually be done in a non automatic way with some
>     additional
>     effort.
>
>     OpenSCAD lacks measurement facilities. So it is very important to me
>     to see,
>     pan and rotate a multi part object with fluidity as it is being built.
>
>     Thanks anyway.
>     jpmendes
>
>
>
>
>
>
>     --
>     View this message in context:
>     http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15010.html
>     Sent from the OpenSCAD mailing list archive at Nabble.com.
>
>     _______________________________________________
>     OpenSCAD mailing list
>     [hidden email] <mailto:[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: How to check if a file exist? Why not export() from code?

nophead
I have a design with over 400 objects of over 100 types. I renders in about 20 minutes when first loaded. Perhaps yours are more complex.

On 7 December 2015 at 17:19, Tim V. Shaporev <[hidden email]> wrote:
If I understand properly, make is intended to resolve the latter issue.

Just my $0.02
Tim

On 07.12.2015 19:28, nop head wrote:
If you use render() around each object you will get the almost effect
you want because the geometry is calculated and then cached. From then
on it renders instantaneously. It only gets recalculated if something it
depends on changes. The only downside is once you quit openscad the
cache is lost, so it takes time to start again from scratch. An
advantage is it automatically keeps track of dependences. Under your
scheme you would have to remember to delete the stl files when anything
that affected them changed.

On 7 December 2015 at 15:54, jpmendes <[hidden email]
<mailto:[hidden email]>> wrote:

    Hi Doug,

    A composite object is to me a multi part object. I'm not English native
    speaking, sorry.
    If there are technical issues ok no problem.

    Why do I would need to check if a file (.stl) exist? Because if true it
    would be simply imported if false the code would be compiled
    rendered and
    exported, and all would be automatic. Need to change a module?
    Simply delete
    the .stl file with the same name or change the export() flag.

    I know it can actually be done in a non automatic way with some
    additional
    effort.

    OpenSCAD lacks measurement facilities. So it is very important to me
    to see,
    pan and rotate a multi part object with fluidity as it is being built.

    Thanks anyway.
    jpmendes






    --
    View this message in context:
    http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15010.html
    Sent from the OpenSCAD mailing list archive at Nabble.com.

    _______________________________________________
    OpenSCAD mailing list
    [hidden email] <mailto:[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


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

Re: How to check if a file exist? Why not export() from code?

G. Wade Johnson
In reply to this post by jpmendes
I actually solved this issue for my own projects using 'make'. But,
since you said you aren't a programmer I wasn't going to mention it.

I often do multi-part projects, sometimes in separate files.

The make programming tool was designed for exactly this problem. But,
it's yet another thing to learn.

G. Wade

On Mon, 7 Dec 2015 10:13:29 -0700 (MST)
jpmendes <[hidden email]> wrote:

> I know that. However imagine a 30 different part object! Every time
> you start a session you loose 2 or more hours just to see the
> assembled object? Obviously I can render each module save it as an
> STL file. Then I can be editing a sub-part  in one OpenSCAD instance
> and have another instance of OpenSCAD opened consisting mainly of a
> list of imports, rotations and translations, just to see, place and
> adjust the position of the parts in the assembled set. It is possible
> yes but not practical from my point of view.
>
> Maybe this should be the right way. The professional designer/builder
> have to obey to more strict rules  and procedures than an occasional
> designer/builder like me.
>
> Thanks guys
> jpmendes
>
>
>
>
>
>
>
>
>  
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15013.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


--
Against logic there is no armor like ignorance.
                                                -- Laurence J. Peter

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

Re: How to check if a file exist? Why not export() from code?

clothbot
For reference, here's the documentation related to make/Makefile/dependency support built into (command-line) OpenSCAD:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment#Makefile_example

Andrew.

G. Wade Johnson wrote
I actually solved this issue for my own projects using 'make'. But,
since you said you aren't a programmer I wasn't going to mention it.

I often do multi-part projects, sometimes in separate files.

The make programming tool was designed for exactly this problem. But,
it's yet another thing to learn.

G. Wade

On Mon, 7 Dec 2015 10:13:29 -0700 (MST)
jpmendes <[hidden email]> wrote:

> I know that. However imagine a 30 different part object! Every time
> you start a session you loose 2 or more hours just to see the
> assembled object? Obviously I can render each module save it as an
> STL file. Then I can be editing a sub-part  in one OpenSCAD instance
> and have another instance of OpenSCAD opened consisting mainly of a
> list of imports, rotations and translations, just to see, place and
> adjust the position of the parts in the assembled set. It is possible
> yes but not practical from my point of view.
>
> Maybe this should be the right way. The professional designer/builder
> have to obey to more strict rules  and procedures than an occasional
> designer/builder like me.
>
> Thanks guys
> jpmendes
>
>
>
>
>
>
>
>
>  
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15013.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


--
Against logic there is no armor like ignorance.
                                                -- Laurence J. Peter

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

Re: How to check if a file exist? Why not export() from code?

doug.moen
The 'make' approach is not very user friendly, or easy to use. Sure, developers can figure it out, but even developers have IDEs nowadays.

If I was designing a user friendly alternative to the 'make dependency' feature of OpenSCAD, I'd consider something like a variant of the render() operation, with a filename specified. OpenSCAD would cache the rendered node in the file system as an STL file, and write out a deps file with the same base name. The deps would be used to determine if the STL file is out of date, the first time it is referenced during a session.

On 8 December 2015 at 11:00, clothbot <[hidden email]> wrote:
For reference, here's the documentation related to make/Makefile/dependency
support built into (command-line) OpenSCAD:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment#Makefile_example

Andrew.


G. Wade Johnson wrote
> I actually solved this issue for my own projects using 'make'. But,
> since you said you aren't a programmer I wasn't going to mention it.
>
> I often do multi-part projects, sometimes in separate files.
>
> The make programming tool was designed for exactly this problem. But,
> it's yet another thing to learn.
>
> G. Wade
>
> On Mon, 7 Dec 2015 10:13:29 -0700 (MST)
> jpmendes &lt;

> jpmendes54@

> &gt; wrote:
>
>> I know that. However imagine a 30 different part object! Every time
>> you start a session you loose 2 or more hours just to see the
>> assembled object? Obviously I can render each module save it as an
>> STL file. Then I can be editing a sub-part  in one OpenSCAD instance
>> and have another instance of OpenSCAD opened consisting mainly of a
>> list of imports, rotations and translations, just to see, place and
>> adjust the position of the parts in the assembled set. It is possible
>> yes but not practical from my point of view.
>>
>> Maybe this should be the right way. The professional designer/builder
>> have to obey to more strict rules  and procedures than an occasional
>> designer/builder like me.
>>
>> Thanks guys
>> jpmendes
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15013.html
>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>>

> Discuss@.openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
> --
> Against logic there is no armor like ignorance.
>                                                 -- Laurence J. Peter
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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





--
View this message in context: http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15031.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: How to check if a file exist? Why not export() from code?

clothbot
Yes. See https://github.com/openscad/openscad/issues/1437

doug.moen wrote
The 'make' approach is not very user friendly, or easy to use. Sure,
developers can figure it out, but even developers have IDEs nowadays.

If I was designing a user friendly alternative to the 'make dependency'
feature of OpenSCAD, I'd consider something like a variant of the render()
operation, with a filename specified. OpenSCAD would cache the rendered
node in the file system as an STL file, and write out a deps file with the
same base name. The deps would be used to determine if the STL file is out
of date, the first time it is referenced during a session.

On 8 December 2015 at 11:00, clothbot <[hidden email]> wrote:

> For reference, here's the documentation related to make/Makefile/dependency
> support built into (command-line) OpenSCAD:
>
>
> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment#Makefile_example
>
> Andrew.
Reply | Threaded
Open this post in threaded view
|

Re: How to check if a file exist? Why not export() from code?

nophead
In reply to this post by doug.moen
Even simpler would be for OpenScad to just save its cache in a file and read it next time the same OpenScad file was opened. That would be entirely backwards compatible.

On 8 December 2015 at 18:13, doug moen <[hidden email]> wrote:
The 'make' approach is not very user friendly, or easy to use. Sure, developers can figure it out, but even developers have IDEs nowadays.

If I was designing a user friendly alternative to the 'make dependency' feature of OpenSCAD, I'd consider something like a variant of the render() operation, with a filename specified. OpenSCAD would cache the rendered node in the file system as an STL file, and write out a deps file with the same base name. The deps would be used to determine if the STL file is out of date, the first time it is referenced during a session.

On 8 December 2015 at 11:00, clothbot <[hidden email]> wrote:
For reference, here's the documentation related to make/Makefile/dependency
support built into (command-line) OpenSCAD:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment#Makefile_example

Andrew.


G. Wade Johnson wrote
> I actually solved this issue for my own projects using 'make'. But,
> since you said you aren't a programmer I wasn't going to mention it.
>
> I often do multi-part projects, sometimes in separate files.
>
> The make programming tool was designed for exactly this problem. But,
> it's yet another thing to learn.
>
> G. Wade
>
> On Mon, 7 Dec 2015 10:13:29 -0700 (MST)
> jpmendes &lt;

> jpmendes54@

> &gt; wrote:
>
>> I know that. However imagine a 30 different part object! Every time
>> you start a session you loose 2 or more hours just to see the
>> assembled object? Obviously I can render each module save it as an
>> STL file. Then I can be editing a sub-part  in one OpenSCAD instance
>> and have another instance of OpenSCAD opened consisting mainly of a
>> list of imports, rotations and translations, just to see, place and
>> adjust the position of the parts in the assembled set. It is possible
>> yes but not practical from my point of view.
>>
>> Maybe this should be the right way. The professional designer/builder
>> have to obey to more strict rules  and procedures than an occasional
>> designer/builder like me.
>>
>> Thanks guys
>> jpmendes
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15013.html
>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>>

> Discuss@.openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
> --
> Against logic there is no armor like ignorance.
>                                                 -- Laurence J. Peter
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

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





--
View this message in context: http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15031.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



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

Re: How to check if a file exist? Why not export() from code?

DrYerzinia
Yes saving the cache file is something I had been meaning to ask about.  Right now my current project takes 8 minutes to render.
Reply | Threaded
Open this post in threaded view
|

Re: How to check if a file exist? Why not export() from code?

G. Wade Johnson
In reply to this post by clothbot
On Tue, 8 Dec 2015 09:00:40 -0700 (MST)
clothbot <[hidden email]> wrote:

> For reference, here's the documentation related to
> make/Makefile/dependency support built into (command-line) OpenSCAD:
>
> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment#Makefile_example

Oh, cool. I don't remember this being here when I started with OpenSCAD.

G. Wade

> Andrew.
>
>
> G. Wade Johnson wrote
> > I actually solved this issue for my own projects using 'make'. But,
> > since you said you aren't a programmer I wasn't going to mention it.
> >
> > I often do multi-part projects, sometimes in separate files.
> >
> > The make programming tool was designed for exactly this problem.
> > But, it's yet another thing to learn.
> >
> > G. Wade
> >
> > On Mon, 7 Dec 2015 10:13:29 -0700 (MST)
> > jpmendes &lt;
>
> > jpmendes54@
>
> > &gt; wrote:
> >
> >> I know that. However imagine a 30 different part object! Every time
> >> you start a session you loose 2 or more hours just to see the
> >> assembled object? Obviously I can render each module save it as an
> >> STL file. Then I can be editing a sub-part  in one OpenSCAD
> >> instance and have another instance of OpenSCAD opened consisting
> >> mainly of a list of imports, rotations and translations, just to
> >> see, place and adjust the position of the parts in the assembled
> >> set. It is possible yes but not practical from my point of view.
> >>
> >> Maybe this should be the right way. The professional
> >> designer/builder have to obey to more strict rules  and procedures
> >> than an occasional designer/builder like me.
> >>
> >> Thanks guys
> >> jpmendes
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>  
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15013.html
> >> Sent from the OpenSCAD mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> OpenSCAD mailing list
> >>
>
> > Discuss@.openscad
>
> >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >
> >
> > --
> > Against logic there is no armor like ignorance.
> >                                                 -- Laurence J. Peter
> >
> > _______________________________________________
> > OpenSCAD mailing list
>
> > Discuss@.openscad
>
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/How-to-check-if-a-file-exist-Why-not-export-from-code-tp14982p15031.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


--
Machines take me by surprise with great frequency.   -- Alan Turing

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