Added test tabs, got closing and switching working
This commit is contained in:
12
app/web/src/helpers/cadPackages/cadQuery/userGuide.md
Normal file
12
app/web/src/helpers/cadPackages/cadQuery/userGuide.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
"Written with": Python
|
||||
"Kernal type": BREP
|
||||
---
|
||||
# CadQuery
|
||||
|
||||
CadQuery is an intuitive, easy-to-use Python library for building parametric 3D CAD models. It has several goals:
|
||||
|
||||
- Build models with scripts that are as close as possible to how you’d describe the object to a human, using a standard, already established programming language
|
||||
- Create parametric models that can be very easily customized by end users
|
||||
- Output high quality CAD formats like STEP and AMF in addition to traditional STL
|
||||
- Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser
|
||||
7
app/web/src/helpers/cadPackages/jsCad/userGuide.md
Normal file
7
app/web/src/helpers/cadPackages/jsCad/userGuide.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"Written with": JavaScript
|
||||
"Kernal type": BREP
|
||||
---
|
||||
# JSCAD
|
||||
|
||||
JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with Javascript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
|
||||
7
app/web/src/helpers/cadPackages/openScad/userGuide.md
Normal file
7
app/web/src/helpers/cadPackages/openScad/userGuide.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"Written with": C+-like
|
||||
"Kernal type": BREP
|
||||
---
|
||||
# OpenSCAD
|
||||
|
||||
OpenSCAD is a solid 3D modeler that enables the creation of parametric models using its scripting language. Models are created by utilizing a technique called constructive solid geometry. According to this technique, simple objects can be transformed and combined in order to create almost any complex model.
|
||||
@@ -95,10 +95,18 @@ interface XYZ {
|
||||
z: number
|
||||
}
|
||||
|
||||
interface EditorModel {
|
||||
type: 'code' | 'guide'
|
||||
label: string
|
||||
content?: string
|
||||
}
|
||||
|
||||
export interface State {
|
||||
ideType: 'INIT' | CadPackageType
|
||||
consoleMessages: { type: 'message' | 'error'; message: string; time: Date }[]
|
||||
code: string
|
||||
models: EditorModel[]
|
||||
currentModel: number
|
||||
objectData: {
|
||||
type: 'INIT' | ArtifactTypes
|
||||
data: any
|
||||
@@ -136,6 +144,11 @@ export const initialState: State = {
|
||||
{ type: 'message', message: 'Initialising', time: new Date() },
|
||||
],
|
||||
code,
|
||||
models: [
|
||||
{ type: 'code', label: 'Code', },
|
||||
{ type: 'guide', label: 'Test', content: '# Testing!' },
|
||||
],
|
||||
currentModel: 0,
|
||||
objectData: {
|
||||
type: 'INIT',
|
||||
data: null,
|
||||
@@ -269,6 +282,47 @@ const reducer = (state: State, { type, payload }): State => {
|
||||
...state,
|
||||
sideTray: payload,
|
||||
}
|
||||
case 'switchEditorModel':
|
||||
return {
|
||||
...state,
|
||||
currentModel: payload,
|
||||
}
|
||||
case 'addEditorModel':
|
||||
return {
|
||||
...state,
|
||||
models: [
|
||||
...state.models,
|
||||
payload,
|
||||
]
|
||||
}
|
||||
case 'removeEditorModel':
|
||||
return {
|
||||
...state,
|
||||
models: [
|
||||
...state.models.slice(0, payload),
|
||||
...state.models.slice(payload + 1),
|
||||
],
|
||||
currentModel: (payload === 0) ? 0 : payload - 1,
|
||||
}
|
||||
case 'updateEditorModel': {
|
||||
let newModels = [...state.models]
|
||||
newModels[state.currentModel].content = payload
|
||||
return {
|
||||
...state,
|
||||
models: newModels,
|
||||
}
|
||||
}
|
||||
case 'reorderEditorModels': {
|
||||
let newModels = [
|
||||
...state.models.slice(0, state.currentModel),
|
||||
...state.models.slice(state.currentModel + 1)
|
||||
].splice(payload, 0, state.models[state.currentModel])
|
||||
return {
|
||||
...state,
|
||||
models: newModels,
|
||||
currentModel: payload,
|
||||
}
|
||||
}
|
||||
default:
|
||||
return state
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user