bernhard-42 / vscode-ocp-cad-viewer

A viewer for OCP based Code-CAD (CadQuery, build123d) integrated into VS Code
Apache License 2.0
80 stars 9 forks source link

Axis-indicator only shown partly or completely gone #22

Closed Paul8043 closed 7 months ago

Paul8043 commented 1 year ago

There are a few rare situations where the axis-indicator (in the lower left-corner) is only shown partly or is gone completely. This scenario can be created by the following sequence of actions:

  1. start ocp-cad-viewer
  2. turn off grid
  3. turn off Group_0
  4. turn on Axes
  5. pan Axes down
  6. press iso-view-button (axis-indicator is only shown partly)
  7. press all other view buttons (axis-indicator shown partly or gone completely)
  8. press reset-view (will recover the full axis-indicator)

How much of the axis-indicator disappears depends on the panning-operation.

after turning Axes ON: axes-original-position after panning Axes down: axes-panned-down after pressing iso-view: after-iso-view after pressing front-view: after-front-view after pressing back-view: after-back-view after pressing top-view: after-top-view after pressing bottom-view: after-bottom-view after pressing left-view: after-left-view after pressing right-view: after-right-view after pressing reset-view: (will recover the full axis-indicator) after-reset-view

bernhard-42 commented 1 year ago

Yes, this was a bug and it should be fixed in the upstream viewer component. You could try it with the examples of https://bernhard-42.github.io/three-cad-viewer/example.html and your issue should not happen any more. A new version of OCP CAD Viewer with the updated viewer will be released in the coming days

bernhard-42 commented 1 year ago

And thanks for raising it with so many details. Really appreciate it

Paul8043 commented 1 year ago

I have tried your three-cad-viewer/example.html. The axis-indicator works perfectly. And I have tried all examples, very interesting, especially dir-box and orient-box. Is it possible to get Build123d-code for these examples? Thanks for adding PIN view as PNG image, this is a functionality I have missed for a long time. Is there an UN-PIN or back-button to return to the previous page?

bernhard-42 commented 1 year ago

PIN view as PNG image is not integrated into VS Code, since it doesn't make sense to show a PNG. This is only used in the Jupyter extension, where the viewer can be per cell. And even there, unpin means recalculate the object or in the example browser refresh the browser

Paul8043 commented 1 year ago

PIN view as PNG image is not integrated into VS Code, since it doesn't make sense to show a PNG.

Clearly, it should not be displayed as a PNG, but a possibility to store the rendered model as a pure PNG-file that would be very valuable. If I remember correctly, OpenSCAD and CQ-Editor have this feature!

bernhard-42 commented 7 months ago

Fixed in 2.0.13