ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan via ntg-context <ntg-context@ntg.nl>
To: Jeroen via ntg-context <ntg-context@ntg.nl>
Cc: Aditya Mahajan <adityam@umich.edu>
Subject: Re: [NTG-context] Filter Module with Openscad
Date: Wed, 26 Apr 2023 15:03:18 -0400 (EDT)	[thread overview]
Message-ID: <qq4sp949-6s48-qnr0-o6ps-576pn436o0ns@hzvpu.rqh> (raw)
In-Reply-To: <CAPtmdbMoRHboGQwb+d6E+e7w7KApS-GxqgNsnOMGYOGAgVc5Fw@mail.gmail.com>

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
___________________________________________________________________________________

      reply	other threads:[~2023-04-26 19:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26 16:43 Jeroen via ntg-context
2023-04-26 19:03 ` Aditya Mahajan via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=qq4sp949-6s48-qnr0-o6ps-576pn436o0ns@hzvpu.rqh \
    --to=ntg-context@ntg.nl \
    --cc=adityam@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).