tataratat / splinepy

Library for prototyping spline geometries of arbitrary dimensions and degrees, and IGA
https://tataratat.github.io/splinepy
Other
47 stars 13 forks source link

Ft: io convert via cli #358

Closed clemens-fricke closed 8 months ago

clemens-fricke commented 8 months ago

Overview

Adds the CLI option for converting spline formats into one another.

For example export the spline defined in a json file directly to an SVG graphic.

Addressed issues

Showcase

A short / one-liner example to highlight the (new) feature

$ splinepy convert -i gus.json -o gus.svg

DRAFT: Currently some issues with the correct export of this example, but only with the GCC compiler?

Checklists

j042 commented 8 months ago

if this is just for svg, can we just name this splinepy svg -i stuff.json -o smooth_stuff.svg

clemens-fricke commented 8 months ago

if this is just for svg, can we just name this splinepy svg -i stuff.json -o smooth_stuff.svg

How important is this to you? In the background, I would only add a check that the export file extension is actually svg before going into the same convert function.

j042 commented 8 months ago

if this is just for svg, can we just name this splinepy svg -i stuff.json -o smooth_stuff.svg

How important is this to you? In the background, I would only add a check that the export file extension is actually svg before going into the same convert function.

I think it's okay as it is. export functions throws error if they can't understand the input. Thanks for this PR!