ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Filter Module with Openscad
@ 2023-04-26 16:43 Jeroen via ntg-context
  2023-04-26 19:03 ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Jeroen via ntg-context @ 2023-04-26 16:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jeroen


[-- Attachment #1.1: Type: text/plain, Size: 939 bytes --]

I am using OpenSCAD to create drawings with the filter module with the
following MWE:

\usemodule[filter]
\defineexternalfilter[openscad]
  [filtercommand={/context/openscad/openscad -o \externalfilteroutputfile},
   output={\externalfilterbasefile.png},
   cache=force,
   readcommand=\ReadImage]
\define[1]\ReadImage{\externalfigure[#1]}

\starttext
\startopenscad
  square(4,2);
\stopopenscad
\stoptext

This works fine. I now want to use the following options added to the
command line: --view axes,edges,scales --viewall

When I create an Openscad file test.scad, I can run it fine with the
following command line at a CLI window:

openscad.com test.scad -o test.png --view axes,edges,scales --viewall

When I add this to the filtercommand as following

[filtercommand={/context/openscad/openscad -o
\externalfilteroutputfile --view axes,edges,scales --viewall}

I cannot get it to run. Is there anything I am missing?

Thanks
Jeroen

[-- Attachment #1.2: Type: text/html, Size: 1251 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [NTG-context] Filter Module with Openscad
  2023-04-26 16:43 [NTG-context] Filter Module with Openscad Jeroen via ntg-context
@ 2023-04-26 19:03 ` Aditya Mahajan via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Aditya Mahajan via ntg-context @ 2023-04-26 19:03 UTC (permalink / raw)
  To: Jeroen via ntg-context; +Cc: Aditya Mahajan

On Wed, 26 Apr 2023, Jeroen via ntg-context wrote:

> I am using OpenSCAD to create drawings with the filter module with the
> following MWE:
> 
> \usemodule[filter]
> \defineexternalfilter[openscad]
>   [filtercommand={/context/openscad/openscad -o \externalfilteroutputfile},
>    output={\externalfilterbasefile.png},
>    cache=force,
>    readcommand=\ReadImage]
> \define[1]\ReadImage{\externalfigure[#1]}
> 
> \starttext
> \startopenscad
>   square(4,2);
> \stopopenscad
> \stoptext
> 
> This works fine. I now want to use the following options added to the
> command line: --view axes,edges,scales --viewall
> 
> When I create an Openscad file test.scad, I can run it fine with the
> following command line at a CLI window:
> 
> openscad.com test.scad -o test.png --view axes,edges,scales --viewall
> 
> When I add this to the filtercommand as following
> 
> [filtercommand={/context/openscad/openscad -o
> \externalfilteroutputfile --view axes,edges,scales --viewall}
> 
> I cannot get it to run. Is there anything I am missing?

My guess is that you need:

[filtercommand={/context/openscad/openscad -o \externalfilteroutputfile\space --view axes,edges,scales --viewall}

this is because any macro \something gobbles the space after that. 

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-26 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-26 16:43 [NTG-context] Filter Module with Openscad Jeroen via ntg-context
2023-04-26 19:03 ` Aditya Mahajan via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).