diff --git a/app/api/db/schema.prisma b/app/api/db/schema.prisma index 163f4da..9ec2844 100644 --- a/app/api/db/schema.prisma +++ b/app/api/db/schema.prisma @@ -37,8 +37,8 @@ model User { enum CadPackage { openscad cadquery - jscad // TODO #422, add jscad to db schema when were ready to enable saving of jscad projects - curv + jscad + // curv // TODO uncomment when ready for users to save curv projects } model Project { diff --git a/app/web/src/components/CaptureButton/CaptureButton.tsx b/app/web/src/components/CaptureButton/CaptureButton.tsx index 598a0d3..aa2736f 100644 --- a/app/web/src/components/CaptureButton/CaptureButton.tsx +++ b/app/web/src/components/CaptureButton/CaptureButton.tsx @@ -25,6 +25,7 @@ const CaptureButtonViewer = ({ const threeInstance = React.useRef(null) const [dataType, dataTypeSetter] = useState(state?.objectData?.type) const [artifact, artifactSetter] = useState(state?.objectData?.data) + const [ideType] = useState(state?.ideType) const [isLoading, isLoadingSetter] = useState(false) const [camera, cameraSetter] = useState(null) const getThreeInstance = (_threeInstance) => { @@ -70,6 +71,7 @@ const CaptureButtonViewer = ({ isLoading={isLoading} camera={camera} isMinimal + ideType={ideType} /> ) } diff --git a/app/web/src/components/EditorMenu/helpers.ts b/app/web/src/components/EditorMenu/helpers.ts index 466a58a..039c5ee 100644 --- a/app/web/src/components/EditorMenu/helpers.ts +++ b/app/web/src/components/EditorMenu/helpers.ts @@ -69,7 +69,7 @@ export const makeStlDownloadHandler = } else { thunkDispatch((dispatch, getState) => { const state = getState() - const specialCadProcess = ideType === 'openscad' && 'stl' + const specialCadProcess = (ideType === 'openscad' || ideType === 'curv') && 'stl' dispatch({ type: 'setLoading' }) requestRender({ state, diff --git a/app/web/src/components/IdeViewer/IdeViewer.tsx b/app/web/src/components/IdeViewer/IdeViewer.tsx index 51ea4a4..287f126 100644 --- a/app/web/src/components/IdeViewer/IdeViewer.tsx +++ b/app/web/src/components/IdeViewer/IdeViewer.tsx @@ -10,6 +10,7 @@ const IdeViewer = ({ const { state, thunkDispatch } = useIdeContext() const dataType = state.objectData?.type const artifact = state.objectData?.data + const ideType = state.ideType const onInit = (threeInstance) => { thunkDispatch({ type: 'setThreeInstance', payload: threeInstance }) @@ -44,6 +45,7 @@ const IdeViewer = ({ onCameraChange={onCameraChange} isLoading={state.isLoading} camera={state?.camera} + ideType={ideType} /> ) } diff --git a/app/web/src/components/IdeViewer/PureIdeViewer.tsx b/app/web/src/components/IdeViewer/PureIdeViewer.tsx index 39b79d3..3f03d85 100644 --- a/app/web/src/components/IdeViewer/PureIdeViewer.tsx +++ b/app/web/src/components/IdeViewer/PureIdeViewer.tsx @@ -169,6 +169,7 @@ export function PureIdeViewer({ isMinimal = false, scadRatio = 1, camera, + ideType }: { dataType: 'INIT' | ArtifactTypes artifact: any @@ -178,6 +179,7 @@ export function PureIdeViewer({ isMinimal?: boolean scadRatio?: number camera?: State['camera'] + ideType?: State['ideType'] }) { const [isDragging, setIsDragging] = useState(false) const [image, setImage] = useState() @@ -216,6 +218,8 @@ export function PureIdeViewer({ )}
{