Fix CascadeStudio integration #99
@@ -30,6 +30,12 @@ yarn rw db up
|
||||
yarn rw db seed
|
||||
```
|
||||
|
||||
Move some files to the public directory
|
||||
```
|
||||
yarn move-cad-worker
|
||||
```
|
||||
The above step should be repeated whenever you modify anything in the git submodule `web/src/cascade/*`
|
||||
|
||||
### Fire up dev
|
||||
```terminal
|
||||
yarn rw dev
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
|
|
||||
import { useMutation, useFlash } from '@redwoodjs/web'
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
import { useAuth } from '@redwoodjs/auth'
|
||||
import { Link, routes, navigate } from '@redwoodjs/router'
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
import { initialize } from 'src/cascade/js/MainPage/CascadeMain'
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
import CascadeController from 'src/helpers/cascadeController'
|
||||
import IdeToolbar from 'src/components/IdeToolbar'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
const DELETE_PART_MUTATION = gql`
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
mutation DeletePartMutation($id: Int!) {
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
deletePart(id: $id) {
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
id
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
`
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
const domNode = document.createElement('div').setAttribute('id', 'sickId')
|
||||
|
||||
const IdeCascadeStudio = ({ part, saveCode, loading, error }) => {
|
||||
@@ -20,6 +11,9 @@ const IdeCascadeStudio = ({ part, saveCode, loading, error }) => {
|
||||
|
clean up clean up
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
const { currentUser } = useAuth()
|
||||
const canEdit = currentUser?.sub === part?.user?.id
|
||||
useEffect(() => {
|
||||
|
Add a description to this useEffect, something along the lines of. Cascade studio attatches to a div outside the react app, and so we are "opening" and "closing" it for the ide part of the app by displaying none or block. Which is why this useEffect returns a clean up function that hides the div again. Add a description to this useEffect, something along the lines of.
Cascade studio attatches to a div outside the react app, and so we are "opening" and "closing" it for the ide part of the app by displaying none or block. Which is why this useEffect returns a clean up function that hides the div again.
|
||||
// Cascade studio attaches "cascade-container" a div outside the react app in 'web/src/index.html', and so we are
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
// "opening" and "closing" it for the ide part of the app by displaying none or block. Which is why this useEffect
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
// returns a clean up function that hides the div again.
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
const onCodeChange = (code) => setCode(code)
|
||||
CascadeController.initialise(onCodeChange, part.code, domNode)
|
||||
const element = document.getElementById('cascade-container')
|
||||
@@ -27,35 +21,11 @@ const IdeCascadeStudio = ({ part, saveCode, loading, error }) => {
|
||||
|
clean up clean up
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
return () => {
|
||||
element.setAttribute('style', 'display: none; overflow: hidden; height: calc(100vh - 8rem)') // eslint-disable-line
|
||||
}
|
||||
}, [])
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
}, [part.code])
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
const isChanges = code !== part.code
|
||||
const { addMessage } = useFlash()
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
const [deletePart] = useMutation(DELETE_PART_MUTATION, {
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onCompleted: () => {
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
// navigate(routes.parts())
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
addMessage('Part deleted.', { classes: 'rw-flash-success' })
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
},
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
})
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
const onDeleteClick = (id) => {
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
if (confirm('Are you sure you want to delete part ' + id + '?')) {
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
deletePart({ variables: { id } })
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
|
||||
return (
|
||||
<>
|
||||
<nav className="rw-button-group hidden">
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
{loading && 'Loading...'}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
{isChanges && !loading && (
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<button
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onClick={() => saveCode({ code }, part.id)}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
className="rw-button rw-button-blue"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Save Changes
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</button>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
)}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</nav>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<div>
|
||||
<IdeToolbar
|
||||
canEdit={canEdit}
|
||||
@@ -74,83 +44,6 @@ const IdeCascadeStudio = ({ part, saveCode, loading, error }) => {
|
||||
|
clean up clean up
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
}}
|
||||
onExport={(type) => threejsViewport[`saveShape${type}`]()}
|
||||
/>
|
||||
<div id="topnav" className="topnav hidden">
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a href="https://github.com/zalo/CascadeStudio">
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Cascade Studio 0.0.6
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
href="#"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
id="main-proj-button"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
title="Sets this project to save in local storage."
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onClick={() => makeMainProject()}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Make Main Project
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
href="#"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
title="Save Project to .json"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onClick={() => saveProject()}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Save Project
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<label htmlFor="project-file" title="Load Project from .json">
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Load Project
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<input
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
id="project-file"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
name="project-file"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
type="file"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
accept=".json"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
style={{ display: 'none' }}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onInput={() => loadProject()}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
/>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</label>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeSTEP()}>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Save STEP
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeSTL()}>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Save STL
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeOBJ()}>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Save OBJ
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<label
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
htmlFor="files"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
title="Import STEP, IGES, or (ASCII) STL from File"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Import STEP/IGES/STL
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<input
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
id="files"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
name="files"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
type="file"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
accept=".iges,.step,.igs,.stp,.stl"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
multiple
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
style={{ display: 'none' }}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onInput={() => loadFiles()}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
/>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</label>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
href="#"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
title="Clears the external step/iges/stl files stored in the project."
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onClick={() => clearExternalFiles()}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Clear Imported Files
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
<a
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
href=""
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
title="Resets the project and localstorage."
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
onClick={() => {
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
window.localStorage.clear()
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
window.history.replaceState({}, 'Cascade Studio', '?')
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
}}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
Reset Project
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</a>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</div>
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
{/* <div
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
id="cascade-container"
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
style={{ height: 'auto' }}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
// dangerouslySetInnerHTML={domNode}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
></div> */}
|
||||
|
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
|
clean up clean up
clean up clean up
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
delete this nav element. I added hidden class but intended to remove it entirely. delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
Likewise has a hidden class. This div should be removed. Likewise has a hidden class. This div should be removed.
|
||||
@@ -1,7 +1,6 @@
|
||||
|
remove commented code. remove commented code.
remove commented code. remove commented code.
|
||||
import { useMutation, useFlash } from '@redwoodjs/web'
|
||||
import { navigate, routes } from '@redwoodjs/router'
|
||||
import IdeCascadeStudio from 'src/components/IdeCascadeStudio'
|
||||
// import Part from 'src/components/Part'a
|
||||
|
remove commented code. remove commented code.
|
||||
|
||||
export const QUERY = gql`
|
||||
query FIND_PART_BY_USENAME_TITLE($partTitle: String!, $userName: String!) {
|
||||
@@ -46,7 +45,6 @@ export const Success = ({ part, refetch }) => {
|
||||
|
remove commented code. remove commented code.
remove commented code. remove commented code.
|
||||
const { addMessage } = useFlash()
|
||||
const [updatePart, { loading, error }] = useMutation(UPDATE_PART_MUTATION, {
|
||||
onCompleted: () => {
|
||||
// navigate(routes.part({id: updatePart.id}))
|
||||
|
remove commented code. remove commented code.
|
||||
addMessage('Part updated.', { classes: 'rw-flash-success' })
|
||||
},
|
||||
})
|
||||
|
||||
|
remove commented code. remove commented code.
remove commented code. remove commented code.
|
||||
clean up
clean up
delete this nav element. I added hidden class but intended to remove it entirely.
delete this nav element. I added hidden class but intended to remove it entirely.
Likewise has a hidden class. This div should be removed.
Likewise has a hidden class. This div should be removed.