Zoom to fit for openscad #569

Merged
Irev-Dev merged 2 commits from kurt/openscad-view-all into main 2021-11-05 23:46:55 +01:00
Irev-Dev commented 2021-10-21 03:53:32 +02:00 (Migrated from github.com)

This is achieved by using the --viewall flag 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.

This is achieved by using the `--viewall` flag 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.
franknoirot (Migrated from github.com) reviewed 2021-10-21 03:53:32 +02:00
Irev-Dev (Migrated from github.com) reviewed 2021-10-21 03:54:09 +02:00
Irev-Dev (Migrated from github.com) commented 2021-10-21 03:54:09 +02:00

Only send camera info back if the viewall flag was used.

Only send camera info back if the viewall flag was used.
Irev-Dev (Migrated from github.com) reviewed 2021-10-21 03:54:32 +02:00
@@ -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'
Irev-Dev (Migrated from github.com) commented 2021-10-21 03:54:32 +02:00

Bit of house keeping.

Bit of house keeping.
Irev-Dev (Migrated from github.com) reviewed 2021-10-21 03:55:13 +02:00
Irev-Dev (Migrated from github.com) commented 2021-10-21 03:55:13 +02:00

Fixes a previous issue of when downloading the openscad stl, it would load into the view at a different scale.

Fixes a previous issue of when downloading the openscad stl, it would load into the view at a different scale.
Irev-Dev (Migrated from github.com) reviewed 2021-10-21 03:55:35 +02:00
Irev-Dev (Migrated from github.com) commented 2021-10-21 03:55:35 +02:00

Can't really explain why this works.

Can't really explain why this works.
Irev-Dev (Migrated from github.com) reviewed 2021-10-21 03:56:38 +02:00
@@ -69,3 +85,4 @@
consoleMessage,
camera,
date: new Date(),
customizerParams: openScadToCadhubParams(customizerParams || []),
Irev-Dev (Migrated from github.com) commented 2021-10-21 03:56:38 +02:00

Only update the camera in state if it was returned.

Only update the camera in state if it was returned.
Irev-Dev (Migrated from github.com) reviewed 2021-10-21 03:57:17 +02:00
@@ -25,3 +25,4 @@
dispatch,
viewerSize: { width, height },
viewAll: state.objectData?.type === 'INIT',
})
Irev-Dev (Migrated from github.com) commented 2021-10-21 03:57:17 +02:00

Use the view all flag on the first render only.

Use the view all flag on the first render only.
Irev-Dev commented 2021-11-05 23:40:41 +01:00 (Migrated from github.com)

9b0cc5e also contains a bunch of social image capture fixes.

9b0cc5e also contains a bunch of social image capture fixes.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#569