roipoussiere / cadquery-vscode

Build parametric 2D/3D CAD models in VSCode with the CadQuery library.
https://open-vsx.org/extension/roipoussiere/cadquery
MIT License
17 stars 4 forks source link

Refresh when VS Code tab is moved #8

Closed bernhard-42 closed 2 years ago

bernhard-42 commented 2 years ago

Before

image

Then I move the CAD tab:

image

So the bottom view is empty now If I save again, it appears:

image

While the cad adapts to the size of the tab, the objects camera view is sub optimal. Maybe you could reset the camera? Can be done by calling viewer.reset().

bernhard-42 commented 2 years ago

ah, nope. reset doesn't help. This is a bug in three-cad-viewer. I did only test it with width:height ratios of about 4:3 ... See https://github.com/bernhard-42/three-cad-viewer/issues/5

bernhard-42 commented 2 years ago

@roipoussiere v1.5.9 fixes it. Now wide cad view with low height are supported as initial zoom and for viewer.reset()

roipoussiere commented 2 years ago

The last version is based on three-cad-viewer v1.5.9.

I still need to update the viewer size according to the panel size, but the camera seems good.

bernhard-42 commented 2 years ago

yes, works now