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