Zoom to fit for openscad #569
Reference in New Issue
Block a user
Delete Branch "kurt/openscad-view-all"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is achieved by using the
--viewallflag in the OpenSCAD cli and also collection the openSCAD camera information so that the three.js camera can be synced in after the fact.Similar to the camera syncing in the other direction, I'm not very certain why the maths I've done works which make writing read-able code difficult.
Only send camera info back if the viewall flag was used.
@@ -7,3 +7,3 @@import FatalErrorPage from 'src/pages/FatalErrorPage'import { createMuiTheme } from '@material-ui/core/styles'import { createTheme } from '@material-ui/core/styles'import { ThemeProvider } from '@material-ui/styles'Bit of house keeping.
Fixes a previous issue of when downloading the openscad stl, it would load into the view at a different scale.
Can't really explain why this works.
@@ -69,3 +85,4 @@consoleMessage,camera,date: new Date(),customizerParams: openScadToCadhubParams(customizerParams || []),Only update the camera in state if it was returned.
@@ -25,3 +25,4 @@dispatch,viewerSize: { width, height },viewAll: state.objectData?.type === 'INIT',})Use the view all flag on the first render only.
9b0cc5ealso contains a bunch of social image capture fixes.