displaying a quick view of an openscad file from the command line alone

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

displaying a quick view of an openscad file from the command line alone

Britton Kerin

Let me just start this email in the customary way:
openscan OMG OMG OMG how wonderful OMG OMG

My question is whether its possible to get the
effect of:

bash$ openscad foo.scad
[pressing F5]

from the command line alone.  I noticed the -m option
to openscand but didn't find documentation for it.

It would be nice to do this just to tighten the
edit-compile-debug cycle for openscad that tiny bit more.

Britton



Reply | Threaded
Open this post in threaded view
|

Re: displaying a quick view of an openscad file from the command line alone

kintel
Administrator
On Jan 22, 2010, at 19:23 , Britton Kerin wrote:

> bash$ openscad foo.scad
> [pressing F5]
>
> from the command line alone.

Depends what you want to achieve.
If you want an STL file, you can use the -s <stl-file> parameter.

..or do you just want to not press F5 the first time you open a model?

I'm not sure how either of these would shorten the modeling cycle, but  
please elaborate a bit more and we'll think about how to help you.

~/= Marius

--
We are Elektropeople for a better living.





Reply | Threaded
Open this post in threaded view
|

Re: displaying a quick view of an openscad file from the command line alone

Clifford Wolf
In reply to this post by Britton Kerin
Hi,

On Fri, Jan 22, 2010 at 09:23:10AM -0900, Britton Kerin wrote:
> My question is whether its possible to get the
> effect of:
>
> bash$ openscad foo.scad
> [pressing F5]
>
> ...
> It would be nice to do this just to tighten the
> edit-compile-debug cycle for openscad that tiny bit more.

I'd recommend to instead leave openscad open in the background (e.g.
eopenscad foo.scad &") and when you use an external editor simply press F4
(reload and compile) whenever you made a change to the file.

this way openscad can cache many things from one rebuild to another which
speeds up the whole process especially when you are doing bigger designs.

yours,
 - clifford

--
"Backups are for wimps. Real men upload their data to an FTP site and
have everyone else mirror it." -- Linus Torvalds

Reply | Threaded
Open this post in threaded view
|

Re: displaying a quick view of an openscad file from the command line alone

Britton Kerin


On Fri, 22 Jan 2010 23:51 +0100, "Clifford Wolf" <[hidden email]>
wrote:

> Hi,
>
> On Fri, Jan 22, 2010 at 09:23:10AM -0900, Britton Kerin wrote:
> > My question is whether its possible to get the
> > effect of:
> >
> > bash$ openscad foo.scad
> > [pressing F5]
> >
> > ...
> > It would be nice to do this just to tighten the
> > edit-compile-debug cycle for openscad that tiny bit more.
>
> I'd recommend to instead leave openscad open in the background (e.g.
> eopenscad foo.scad &") and when you use an external editor simply press
> F4
> (reload and compile) whenever you made a change to the file.
>
> this way openscad can cache many things from one rebuild to another which
> speeds up the whole process especially when you are doing bigger designs.

Makes sense.  It would still be really cool to be able to control
openscad
externally though.  After all, its mainly a compiler anyway and has
mainly
done away with the need for interactive control, why not take the last
step?  It could take a command line option to specify a named pipe and
dispatch
command events from there as from keystrokes.  I'd probably follow the
vim
model and make the commands the keystroke names as much as possible, so
users
can learn interactively and then program without having to bother to
learn any
new underlying interface.  

Some might consider this a bit insane but consider the existence of
vim's
netbeans, mozillas vimperator and Its All Text plugins, etc., they are
pretty
popular.  I took a look and I could probably add this if it wouldn't be
regarded as too nutty for inclusion.  

Britton