KittyCAD / cli

The Zoo command line tool.
MIT License
16 stars 2 forks source link

Proposal for `kittycad file view` command #211

Closed franknoirot closed 1 year ago

franknoirot commented 1 year ago

When trying out the CLI for the first time, I wanted to check if file conversions worked but I don't have some of the software that some of those file types need to open. So I ended up having the AutoDesk Online File Viewer open while I worked.

Since we will have pixel streaming possible from the engine with the work within KittyCAD/engine, I was wondering if it would be worthwhile for our users to have a way to view 3D models, for debugging or otherwise, within the terminal itself without too much effort. I think it fits our retro-with-superpowers brand.

example usages

The UX of the viewer would be TBD, but maybe as an MVP a sensible default camera position is chosen, and no camera controls are given to the user. Eventually we could support keyboard combinations to pan, zoom, and orbit.

org-projects-app[bot] commented 1 year ago

org-projects-app[bot] added this issue to KittyCode Project.

franknoirot commented 1 year ago

I am ignorant of the technical details of this that would make it feasible or unfeasible, and whether it would be better for us if the engine ran in the cloud or locally on the host machine for this purpose, so I'm just throwing this out for discussion.

I will say that I think this pairs nicely with another command that I think would be very useful for CI pipelines where visual debugging and sanity checks are necessary, a kittycad file snapshot command:

kittycad file convert suzanne.obj suzanne.step
  | kittycad file snapshot --camera-x 20 --camera-zoom .8 --camera-fov 110 --src-format step --output-format jpg
pierremtb commented 1 year ago

@franknoirot Stumbling on this now, I feel like this would also be super helpful to the Github Chrome extension? Would unlock major perf improvements and much larger file diffs or viewing

franknoirot commented 1 year ago

Oh right @pierremtb you would be able to bypass ThreeJS and most client-side JS! You'd probably hit a /view endpoint instead of a CLI command though right?

pierremtb commented 1 year ago

@franknoirot Yeah! All the mem intensive stuff basically. Combined diffs would have to require more work on the backend but would make a lot of sense too

jessfraz commented 1 year ago

once we have import in engine this is pretty easy with the same stuff as https://github.com/KittyCAD/cli/pull/312