Compare commits

...

6 Commits

Author SHA1 Message Date
4b2c745db5 Fix error: unknown sketch function circle (#6012) 2025-03-26 14:04:59 -04:00
bb983021b1 Feature: Traditional menu actions in desktop application (#5892)
* chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu

* chore: skeleton typing for communication between nodes and web side

* chore: more skeleton for the different roles within the menu options, need more type safety

* chore: adding more skeleton and templates of what the menus could be

* chore: implemented first pass for helpRole links

* fix: syntax issue stopped the build step

* feature: loading different menus based on your page

* feature: Home page file role implemented

* chore: handling the build workflow for the signin page

* fix: moving edit actionst to the edit menu

* chore: adding preferences to the file role

* chore: redoing help roles based on the question mark widget

* fix: auto fmt

* chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts!

* chore: oddly specific toggle API for disabling MenuItems from JS. No rules!

* fix: do not implement a custom label disable thingy, use id on menu and use the native APIga

* fix: auto fmt

* fix: adding some typechecks and auto fmt fixes

* fix: trying to fix custom type?

* fix: nvm we back, the lsp on my editor borked for a second

* fix: adding one more level to the custom type for the labels

* chore: cleaning up type definitions to read easier

* fix: resolving yarn lint errors

* chore: adding file sign out

* chore: adding more file bar actions

* chore: ready for PR draft

* fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed

* fix: linking the OG source

* fix: set application menu to null to avoid default electron menu

* chore: trying to add more typescript

* chore: BIG workflow changes... better typing, less IPC junk

* fix: remapping the icp functions to the cb option select...

* chore: all og events are rehooked up with new workflow pattern

* feat: adding more options to the native bar!

* fix: todo

* chore: cleaning up some menus and adding more

* fix: desktop vs browser and lint errors

* fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals...

* fix: PR clean up

* fix: more PR cleanup

* A snapshot a day keeps the bugs away! 📷🐛

* fix: added the new help menu to the default sign in and modeling page

* fix: disabled two menu actions within sign in page since they will not do anything.

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* fix: mergining main, auto fixes

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* fix: fixed ipc renderer off/remove listener bug

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* fix: report a bug to refresha and report a bug

* fix: new type for webContents send payload that does not brick TS

* fix: removing import file from url since it is not working in the command palette for manual user input

* fix: removing old comment

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* chore: adding some E2E tests.

* chore: added E2E tests for each file menu

* fix: auto fixes

* chore: adding more edit role E2E tests

* chore: e2e test

* chore: adding help role e2e test

* A snapshot a day keeps the bugs away! 📷🐛

* chore: e2e test for all the menu options you can interact with in the frontend

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-26 13:03:44 -05:00
d27b8871bc Set bot user info to amend commits (#6011) 2025-03-26 17:12:20 +00:00
1753047d87 Feature: Release named views to all users (#5814)
* chore: cleanup to get named views released!

* fix: fixed gizmo, client side camera sync and remove DEV flag

* yarp

* chore: implementing E2E tests for creating a named view

* fix: cleaning up and commenting E2E tests for named views

* fix: we did it bois, the skip ceral i zation bricked my E2E test :(

* fix: auto formatter

* fix: snapshot uuid matching because rust will randomly generate thme

* fix: auto fmt

* fix: trying to resolve typescript issues

* fix: handling NamedView vs CameraViewState type checking

* fix: no idea I just mapped export to 3d export because we have no 2d export yet...

* fix: random file I wrote because my editor was too slow

* fix: git merge did not do what I wanted

* A snapshot a day keeps the bugs away! 📷🐛

* fix: linter errors

* A snapshot a day keeps the bugs away! 📷🐛

---------

Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
2025-03-26 16:12:35 +00:00
fa16fcedff update all kcl-samples w/ format (#5999) 2025-03-26 11:53:34 -04:00
0677474097 Bump KCL in prep for release (#6010) 2025-03-26 15:52:32 +00:00
237 changed files with 27359 additions and 25319 deletions

View File

@ -28,14 +28,18 @@ jobs:
- name: Sync with main - name: Sync with main
run: | run: |
# checkout our branch # Create the branch
git checkout all-e2e || git checkout -b all-e2e git checkout all-e2e || git checkout -b all-e2e
# fetch origin
# Reset to main
git fetch origin git fetch origin
# reset to main
git reset --hard origin/main git reset --hard origin/main
# get a new SHA to prevent overwriting the commit status on main
# Get a new SHA to prevent overwriting the commit status on main
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit --amend --message="[all-e2e] $(git log --max-count=1 --pretty=%B)" git commit --amend --message="[all-e2e] $(git log --max-count=1 --pretty=%B)"
# force push it
# Overwrite the branch
git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git
git push --force origin all-e2e git push --force origin all-e2e

View File

@ -0,0 +1,292 @@
import { test, expect } from './zoo-test'
import { PROJECT_SETTINGS_FILE_NAME } from 'lib/constants'
import * as fsp from 'fs/promises'
import { join } from 'path'
import {
createProject,
tomlToPerProjectSettings,
perProjectsettingsToToml,
} from './test-utils'
import { NamedView } from '@rust/kcl-lib/bindings/NamedView'
// Helper function to determine if the file path on disk exists
// Specifically this is used to check if project.toml exists on disk
const fileExists = async (path: string) => {
return !!(await fsp
.stat(path)
.then((_) => true)
.catch((_) => false))
}
// Here are a few uuids.
// When created named views rust will auto generate uuids and they will
// never match the snapshots. Overwrite them in memory to these
// values to have them match the snapshots.
const uuid1: string = '0656fb1a-9640-473e-b334-591dc70c0138'
const uuid2: string = 'c810cf04-c6cc-4a4a-8b11-17bf445dcab7'
const uuid3: string = 'cfecbfee-48a6-4561-b96d-ffbe5678bb7d'
// Look up the named view by name and then rewrite it with the same uuid each time
const nameToUuid: Map<string, string> = new Map()
nameToUuid.set('uuid1', uuid1)
nameToUuid.set('uuid2', uuid2)
nameToUuid.set('uuid3', uuid3)
/**
* Given the project.toml string, overwrite the named views to be the constant uuid
* values to match the snapshots. The uuids are randomly generated
*/
function tomlStringOverWriteNamedViewUuids(toml: string): string {
const settings = tomlToPerProjectSettings(toml)
const namedViews = settings.settings?.app?.named_views
if (namedViews) {
const entries = Object.entries(namedViews)
const remappedNamedViews: { [key: string]: NamedView } = {}
entries.forEach(([_, value]) => {
if (value) {
// {name:'uuid1'} -> uuid1 lookup
const staticUuid = nameToUuid.get(value.name)
if (staticUuid) {
remappedNamedViews[staticUuid] = value
}
}
})
if (settings && settings.settings && settings.settings.app) {
settings.settings.app.named_views = remappedNamedViews
}
}
return perProjectsettingsToToml(settings)
}
test.describe('Named view tests', () => {
test('Verify project.toml is not created', async ({ page }, testInfo) => {
// Create project and load it
const projectName = 'named-views'
await createProject({ name: projectName, page })
// Generate file paths for project.toml
const projectDirName = testInfo.outputPath('electron-test-projects-dir')
const tempProjectSettingsFilePath = join(
projectDirName,
projectName,
PROJECT_SETTINGS_FILE_NAME
)
// project.toml should not exist on initial project creation
let exists = await fileExists(tempProjectSettingsFilePath)
expect(exists).toBe(false)
})
test('Verify named view gets created', async ({
cmdBar,
scene,
page,
}, testInfo) => {
const projectName = 'named-views'
const myNamedView = 'uuid1'
// Create and load project
await createProject({ name: projectName, page })
await scene.waitForExecutionDone()
// Create named view
const projectDirName = testInfo.outputPath('electron-test-projects-dir')
await cmdBar.openCmdBar()
await cmdBar.chooseCommand('create named view')
await cmdBar.argumentInput.fill(myNamedView)
await cmdBar.progressCmdBar(false)
// Generate paths for the project.toml
const tempProjectSettingsFilePath = join(
projectDirName,
projectName,
PROJECT_SETTINGS_FILE_NAME
)
// Expect project.toml to be generated on disk since a named view was created
await expect(async () => {
let exists = await fileExists(tempProjectSettingsFilePath)
expect(exists).toBe(true)
}).toPass()
// Read project.toml into memory
let tomlString = await fsp.readFile(tempProjectSettingsFilePath, 'utf-8')
// Rewrite the uuids in the named views to match snapshot otherwise they will be randomly generated from rust and break
tomlString = tomlStringOverWriteNamedViewUuids(tomlString)
// Write the entire tomlString to a snapshot.
// There are many key/value pairs to check this is a safer match.
expect(tomlString).toMatchSnapshot('verify-named-view-gets-created')
})
test('Verify named view gets deleted', async ({
cmdBar,
scene,
page,
}, testInfo) => {
const projectName = 'named-views'
const myNamedView1 = 'uuid1'
const myNamedView2 = 'uuid2'
// Create project and go into the project
await createProject({ name: projectName, page })
await scene.waitForExecutionDone()
// Create a new named view
await cmdBar.openCmdBar()
await cmdBar.chooseCommand('create named view')
await cmdBar.argumentInput.fill(myNamedView1)
await cmdBar.progressCmdBar(false)
// Generate file paths for project.toml
const projectDirName = testInfo.outputPath('electron-test-projects-dir')
const tempProjectSettingsFilePath = join(
projectDirName,
projectName,
PROJECT_SETTINGS_FILE_NAME
)
// Except the project.toml to be written to disk since a named view was created
await expect(async () => {
let exists = await fileExists(tempProjectSettingsFilePath)
expect(exists).toBe(true)
}).toPass()
// Read project.toml into memory
let tomlString = await fsp.readFile(tempProjectSettingsFilePath, 'utf-8')
// Rewrite the uuids in the named views to match snapshot otherwise they will be randomly generated from rust and break
tomlString = tomlStringOverWriteNamedViewUuids(tomlString)
// Write the entire tomlString to a snapshot.
// There are many key/value pairs to check this is a safer match.
expect(tomlString).toMatchSnapshot('verify-named-view-gets-created')
// Delete a named view
await cmdBar.openCmdBar()
await cmdBar.chooseCommand('delete named view')
cmdBar.selectOption({ name: myNamedView2 })
await cmdBar.progressCmdBar(false)
// Read project.toml into memory again since we deleted a named view
tomlString = await fsp.readFile(tempProjectSettingsFilePath, 'utf-8')
// Rewrite the uuids in the named views to match snapshot otherwise they will be randomly generated from rust and break
tomlString = tomlStringOverWriteNamedViewUuids(tomlString)
// // Write the entire tomlString to a snapshot.
// // There are many key/value pairs to check this is a safer match.
expect(tomlString).toMatchSnapshot('verify-named-view-gets-deleted')
})
test('Verify named view gets loaded', async ({
cmdBar,
scene,
page,
}, testInfo) => {
const projectName = 'named-views'
const myNamedView = 'uuid1'
// Create project and go into the project
await createProject({ name: projectName, page })
await scene.waitForExecutionDone()
// Create a new named view
await cmdBar.openCmdBar()
await cmdBar.chooseCommand('create named view')
await cmdBar.argumentInput.fill(myNamedView)
await cmdBar.progressCmdBar(false)
// Generate file paths for project.toml
const projectDirName = testInfo.outputPath('electron-test-projects-dir')
const tempProjectSettingsFilePath = join(
projectDirName,
projectName,
PROJECT_SETTINGS_FILE_NAME
)
// Except the project.toml to be written to disk since a named view was created
await expect(async () => {
let exists = await fileExists(tempProjectSettingsFilePath)
expect(exists).toBe(true)
}).toPass()
// Read project.toml into memory
let tomlString = await fsp.readFile(tempProjectSettingsFilePath, 'utf-8')
// Rewrite the uuids in the named views to match snapshot otherwise they will be randomly generated from rust and break
tomlString = tomlStringOverWriteNamedViewUuids(tomlString)
// Write the entire tomlString to a snapshot.
// There are many key/value pairs to check this is a safer match.
expect(tomlString).toMatchSnapshot('verify-named-view-gets-created')
// Create a load a named view
await cmdBar.openCmdBar()
await cmdBar.chooseCommand('load named view')
await cmdBar.argumentInput.fill(myNamedView)
await cmdBar.progressCmdBar(false)
// Check the toast appeared
await expect(
page.getByText(`Named view ${myNamedView} loaded.`)
).toBeVisible()
})
test('Verify two named views get created', async ({
cmdBar,
scene,
page,
}, testInfo) => {
const projectName = 'named-views'
const myNamedView1 = 'uuid1'
const myNamedView2 = 'uuid2'
// Create and load project
await createProject({ name: projectName, page })
await scene.waitForExecutionDone()
// Create named view
const projectDirName = testInfo.outputPath('electron-test-projects-dir')
await cmdBar.openCmdBar()
await cmdBar.chooseCommand('create named view')
await cmdBar.argumentInput.fill(myNamedView1)
await cmdBar.progressCmdBar(false)
await page.waitForTimeout(1000)
const orbitMouseStart = { x: 800, y: 130 }
const orbitMouseEnd = { x: 0, y: 130 }
await page.mouse.move(orbitMouseStart.x, orbitMouseStart.y)
await page.mouse.down({ button: 'middle' })
await page.mouse.move(orbitMouseEnd.x, orbitMouseEnd.y, {
steps: 3,
})
await page.mouse.up({ button: 'middle' })
await page.waitForTimeout(1000)
await cmdBar.openCmdBar()
await cmdBar.chooseCommand('create named view')
await cmdBar.argumentInput.fill(myNamedView2)
await cmdBar.progressCmdBar(false)
// Wait a moment for the project.toml to get written to disk with the new view point
await page.waitForTimeout(1000)
// Generate paths for the project.toml
const tempProjectSettingsFilePath = join(
projectDirName,
projectName,
PROJECT_SETTINGS_FILE_NAME
)
// Expect project.toml to be generated on disk since a named view was created
await expect(async () => {
let exists = await fileExists(tempProjectSettingsFilePath)
expect(exists).toBe(true)
}).toPass()
// Read project.toml into memory
let tomlString = await fsp.readFile(tempProjectSettingsFilePath, 'utf-8')
// Rewrite the uuids in the named views to match snapshot otherwise they will be randomly generated from rust and break
tomlString = tomlStringOverWriteNamedViewUuids(tomlString)
// Write the entire tomlString to a snapshot.
// There are many key/value pairs to check this is a safer match.
expect(tomlString).toMatchSnapshot('verify-two-named-view-gets-created')
})
})

View File

@ -0,0 +1,16 @@
[settings]
modeling = { }
text_editor = { }
command_bar = { }
[settings.app.named_views.0656fb1a-9640-473e-b334-591dc70c0138]
name = "uuid1"
eye_offset = 1_378.0059
fov_y = 45
is_ortho = false
ortho_scale_enabled = true
ortho_scale_factor = 1.6
pivot_position = [ 0, 0, 0 ]
pivot_rotation = [ 0.5380994, 0.0, 0.0, 0.8428814 ]
world_coord_system = "right_handed_up_z"
version = 1

View File

@ -0,0 +1,16 @@
[settings]
modeling = { }
text_editor = { }
command_bar = { }
[settings.app.named_views.0656fb1a-9640-473e-b334-591dc70c0138]
name = "uuid1"
eye_offset = 1_378.0059
fov_y = 45
is_ortho = false
ortho_scale_enabled = true
ortho_scale_factor = 1.6
pivot_position = [ 0, 0, 0 ]
pivot_rotation = [ 0.5380994, 0.0, 0.0, 0.8428814 ]
world_coord_system = "right_handed_up_z"
version = 1

View File

@ -0,0 +1,28 @@
[settings]
modeling = { }
text_editor = { }
command_bar = { }
[settings.app.named_views.0656fb1a-9640-473e-b334-591dc70c0138]
name = "uuid1"
eye_offset = 1_378.0059
fov_y = 45
is_ortho = false
ortho_scale_enabled = true
ortho_scale_factor = 1.6
pivot_position = [ 0, 0, 0 ]
pivot_rotation = [ 0.5380994, 0.0, 0.0, 0.8428814 ]
world_coord_system = "right_handed_up_z"
version = 1
[settings.app.named_views.c810cf04-c6cc-4a4a-8b11-17bf445dcab7]
name = "uuid2"
eye_offset = 1_378.0059
fov_y = 45
is_ortho = false
ortho_scale_enabled = true
ortho_scale_factor = 1.6
pivot_position = [ 1_826.5239, 0.0, 0.0 ]
pivot_rotation = [ 0.5380994, 0.0, 0.0, 0.8428814 ]
world_coord_system = "right_handed_up_z"
version = 1

View File

@ -0,0 +1,312 @@
import { test, expect } from './zoo-test'
/**
* Not all menu actions are tested. Some are default electron menu actions.
* Test file menu actions that trigger something in the frontend
*/
test.describe('Native file menu', { tag: ['@electron'] }, () => {
test.describe('Home page', () => {
test.describe('File role', () => {
test('File.Create project', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const newProject =
app.applicationMenu.getMenuItemById('File.New project')
if (!newProject) fail()
newProject.click()
})
// Check that the command bar is opened
await expect(cmdBar.cmdBarElement).toBeVisible()
// Check the placeholder project name exists
const actualArgument = await cmdBar.cmdBarElement
.getByTestId('cmd-bar-arg-value')
.inputValue()
const expectedArgument = 'project-$nnn'
expect(actualArgument).toBe(expectedArgument)
})
test('File.Open project', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const openProject =
app.applicationMenu.getMenuItemById('File.Open project')
if (!openProject) fail()
openProject.click()
})
// Check that the command bar is opened
await expect(cmdBar.cmdBarElement).toBeVisible()
// Check the placeholder project name exists
const actual = await cmdBar.cmdBarElement
.getByTestId('command-name')
.textContent()
const expected = 'Open project'
expect(actual).toBe(expected)
})
test('File.Preferences.User settings', async ({
tronApp,
cmdBar,
page,
}) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const userSettings = app.applicationMenu.getMenuItemById(
'File.Preferences.User settings'
)
if (!userSettings) fail()
userSettings.click()
})
const settings = page.getByTestId('settings-dialog-panel')
await expect(settings).toBeVisible()
// You are viewing the user tab
const actualText = settings.getByText(
'The overall appearance of the app'
)
await expect(actualText).toBeVisible()
})
test('File.Preferences.Keybindings', async ({
tronApp,
cmdBar,
page,
}) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const keybindings = app.applicationMenu.getMenuItemById(
'File.Preferences.Keybindings'
)
if (!keybindings) fail()
keybindings.click()
})
const settings = page.getByTestId('settings-dialog-panel')
await expect(settings).toBeVisible()
// You are viewing the keybindings tab
const enterSketchMode = settings.locator('#enter-sketch-mode')
await expect(enterSketchMode).toBeVisible()
})
test('File.Preferences.User default units', async ({
tronApp,
cmdBar,
page,
}) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'File.Preferences.User default units'
)
if (!menu) fail()
menu.click()
})
const settings = page.getByTestId('settings-dialog-panel')
await expect(settings).toBeVisible()
const defaultUnit = settings.locator('#defaultUnit')
await expect(defaultUnit).toBeVisible()
})
test('File.Preferences.Theme', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'File.Preferences.Theme'
)
if (!menu) fail()
menu.click()
})
// Check that the command bar is opened
await expect(cmdBar.cmdBarElement).toBeVisible()
// Check the placeholder project name exists
const actual = await cmdBar.cmdBarElement
.getByTestId('command-name')
.textContent()
const expected = 'Settings · app · theme'
expect(actual).toBe(expected)
})
test('File.Preferences.Theme color', async ({
tronApp,
cmdBar,
page,
}) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'File.Preferences.Theme color'
)
if (!menu) fail()
menu.click()
})
const settings = page.getByTestId('settings-dialog-panel')
await expect(settings).toBeVisible()
const defaultUnit = settings.locator('#themeColor')
await expect(defaultUnit).toBeVisible()
})
test('File.Preferences.Sign out', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById('File.Sign out')
if (!menu) fail()
// FIXME: Add back when you can actually sign out
// menu.click()
})
// FIXME: When signing out during E2E the page is not bound correctly.
// It cannot find the button
// const signIn = page.getByTestId('sign-in-button')
// await expect(signIn).toBeVisible()
})
})
test.describe('Edit role', () => {
test('Edit.Rename project', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'Edit.Rename project'
)
if (!menu) fail()
menu.click()
})
// Check the placeholder project name exists
const actual = await cmdBar.cmdBarElement
.getByTestId('command-name')
.textContent()
const expected = 'Rename project'
expect(actual).toBe(expected)
})
test('Edit.Delete project', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'Edit.Delete project'
)
if (!menu) fail()
menu.click()
})
// Check the placeholder project name exists
const actual = await cmdBar.cmdBarElement
.getByTestId('command-name')
.textContent()
const expected = 'Delete project'
expect(actual).toBe(expected)
})
test('Edit.Change project directory', async ({
tronApp,
cmdBar,
page,
}) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'Edit.Change project directory'
)
if (!menu) fail()
menu.click()
})
const settings = page.getByTestId('settings-dialog-panel')
await expect(settings).toBeVisible()
const projectDirectory = settings.locator('#projectDirectory')
await expect(projectDirectory).toBeVisible()
})
})
test.describe('View role', () => {
test('View.Command Palette...', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'View.Command Palette...'
)
if (!menu) fail()
menu.click()
})
// Check the placeholder project name exists
const actual = cmdBar.cmdBarElement.getByTestId('cmd-bar-search')
await expect(actual).toBeVisible()
})
})
test.describe('Help role', () => {
test('Help.Show all commands', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'Help.Show all commands'
)
if (!menu) fail()
menu.click()
})
// Check the placeholder project name exists
const actual = cmdBar.cmdBarElement.getByTestId('cmd-bar-search')
await expect(actual).toBeVisible()
})
test('Help.KCL code samples', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'Help.KCL code samples'
)
if (!menu) fail()
})
})
test('Help.Refresh and report a bug', async ({
tronApp,
cmdBar,
page,
}) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'Help.Refresh and report a bug'
)
if (!menu) fail()
menu.click()
})
// Core dump and refresh magic number timeout
await page.waitForTimeout(7000)
const actual = page.getByText(
'No Projects found, ready to make your first one?'
)
await expect(actual).toBeVisible()
})
test('Help.Reset onboarding', async ({ tronApp, cmdBar, page }) => {
if (!tronApp) fail()
// Run electron snippet to find the Menu!
await tronApp.electron.evaluate(async ({ app }) => {
if (!app || !app.applicationMenu) fail()
const menu = app.applicationMenu.getMenuItemById(
'Help.Reset onboarding'
)
if (!menu) fail()
menu.click()
})
const actual = page.getByText(
`This is a hardware design tool that lets you edit visually, with code, or both. It's powered by the KittyCAD Design API, the first API created for anyone to build hardware design tools.`
)
await expect(actual).toBeVisible()
})
})
})
})

View File

@ -26,6 +26,7 @@ import { isArray } from 'lib/utils'
import { reportRejection } from 'lib/trap' import { reportRejection } from 'lib/trap'
import { DeepPartial } from 'lib/types' import { DeepPartial } from 'lib/types'
import { Configuration } from 'lang/wasm' import { Configuration } from 'lang/wasm'
import { ProjectConfiguration } from '@rust/kcl-lib/bindings/ProjectConfiguration'
const toNormalizedCode = (text: string) => { const toNormalizedCode = (text: string) => {
return text.replace(/\s+/g, '') return text.replace(/\s+/g, '')
@ -761,7 +762,7 @@ export interface Paths {
} }
export const doExport = async ( export const doExport = async (
output: Models['OutputFormat_type'], output: Models['OutputFormat3d_type'],
rootDir: string, rootDir: string,
page: Page, page: Page,
exportFrom: 'dropdown' | 'sidebarButton' | 'commandBar' = 'dropdown' exportFrom: 'dropdown' | 'sidebarButton' | 'commandBar' = 'dropdown'
@ -1125,3 +1126,15 @@ export function settingsToToml(settings: DeepPartial<Configuration>) {
export function tomlToSettings(toml: string): DeepPartial<Configuration> { export function tomlToSettings(toml: string): DeepPartial<Configuration> {
return TOML.parse(toml) return TOML.parse(toml)
} }
export function tomlToPerProjectSettings(
toml: string
): DeepPartial<ProjectConfiguration> {
return TOML.parse(toml)
}
export function perProjectsettingsToToml(
settings: DeepPartial<ProjectConfiguration>
) {
return TOML.stringify(settings as any)
}

20
interface.d.ts vendored
View File

@ -3,6 +3,18 @@ import fsSync from 'node:fs'
import path from 'path' import path from 'path'
import { dialog, shell } from 'electron' import { dialog, shell } from 'electron'
import { MachinesListing } from 'components/MachineManagerProvider' import { MachinesListing } from 'components/MachineManagerProvider'
import type { Channel } from 'src/menu/channels'
import { Menu, WebContents } from 'electron'
import { ZooLabel, ZooMenuEvents } from 'menu/roles'
import type { MenuActionIPC } from 'menu/rules'
import type { WebContentSendPayload } from 'menu/channels'
// Extend the interface with additional custom properties
declare module 'electron' {
interface Menu {
label?: ZooLabel
}
}
type EnvFn = (value?: string) => string type EnvFn = (value?: string) => string
@ -94,6 +106,14 @@ export interface IElectronAPI {
appCheckForUpdates: () => Promise<unknown> appCheckForUpdates: () => Promise<unknown>
getArgvParsed: () => any getArgvParsed: () => any
getAppTestProperty: (propertyName: string) => any getAppTestProperty: (propertyName: string) => any
// Helper functions to create application Menus
createHomePageMenu: () => Promise<any>
createModelingPageMenu: () => Promise<any>
createFallbackMenu: () => Promise<any>
enableMenu(menuId: string): Promise<any>
disableMenu(menuId: string): Promise<any>
menuOn: (callback: (payload: WebContentSendPayload) => void) => any
} }
declare global { declare global {

View File

@ -26,7 +26,7 @@
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"@headlessui/react": "^1.7.19", "@headlessui/react": "^1.7.19",
"@headlessui/tailwindcss": "^0.2.0", "@headlessui/tailwindcss": "^0.2.0",
"@kittycad/lib": "2.0.17", "@kittycad/lib": "2.0.21",
"@lezer/highlight": "^1.2.1", "@lezer/highlight": "^1.2.1",
"@lezer/lr": "^1.4.1", "@lezer/lr": "^1.4.1",
"@react-hook/resize-observer": "^2.0.1", "@react-hook/resize-observer": "^2.0.1",

View File

@ -7,7 +7,7 @@
// Define function // Define function
fn rail8020(originStart, railHeight, railLength) { fn rail8020(originStart, railHeight, railLength) {
// Sketch side 1 of profile // Sketch side 1 of profile
sketch001 = startSketchOn('-XZ') sketch001 = startSketchOn(-XZ)
|> startProfileAt([ |> startProfileAt([
originStart[0], originStart[0],
0.1 * railHeight + originStart[1] 0.1 * railHeight + originStart[1]
@ -194,7 +194,7 @@ fn rail8020(originStart, railHeight, railLength) {
.5 * railHeight + originStart[0], .5 * railHeight + originStart[0],
.5 * railHeight + originStart[1] .5 * railHeight + originStart[1]
], ],
radius = .205 * railHeight / 2 radius = .205 * railHeight / 2,
), %) ), %)
|> extrude(length = railLength) |> extrude(length = railLength)
|> fillet( |> fillet(
@ -216,7 +216,7 @@ fn rail8020(originStart, railHeight, railLength) {
getNextAdjacentEdge(edge28), getNextAdjacentEdge(edge28),
getNextAdjacentEdge(edge29), getNextAdjacentEdge(edge29),
getNextAdjacentEdge(edge30) getNextAdjacentEdge(edge30)
] ],
) )
|> fillet( |> fillet(
radius = 0.03, radius = 0.03,
@ -237,7 +237,7 @@ fn rail8020(originStart, railHeight, railLength) {
getNextAdjacentEdge(edge26), getNextAdjacentEdge(edge26),
getNextAdjacentEdge(edge31), getNextAdjacentEdge(edge31),
getNextAdjacentEdge(edge32) getNextAdjacentEdge(edge32)
] ],
) )
return sketch001 return sketch001
} }

View File

@ -15,57 +15,37 @@ padding = 1.5
bearingDia = 3 bearingDia = 3
// (Needs to be updated). Sketch the block and extrude up to where the counterbore diameter starts. // (Needs to be updated). Sketch the block and extrude up to where the counterbore diameter starts.
extrude001 = startSketchOn('XY') extrude001 = startSketchOn(XY)
|> startProfileAt([-width / 2, -length / 2], %) |> startProfileAt([-width / 2, -length / 2], %)
|> line(endAbsolute = [width / 2, -length / 2]) |> line(endAbsolute = [width / 2, -length / 2])
|> line(endAbsolute = [width / 2, length / 2]) |> line(endAbsolute = [width / 2, length / 2])
|> line(endAbsolute = [-width / 2, length / 2]) |> line(endAbsolute = [-width / 2, length / 2])
|> close() |> close()
|> extrude(length = height) |> extrude(length = height)
extrude002 = startSketchOn(extrude001, 'end') extrude002 = startSketchOn(extrude001, 'end')
|> circle( |> circle(
center = [ center = [
-(width / 2 - (padding / 2)), -(width / 2 - (padding / 2)),
-(length / 2 - (padding / 2)) -(length / 2 - (padding / 2))
], ],
radius = cbDia / 2, radius = cbDia / 2,
) )
|> patternLinear2d( |> patternLinear2d(instances = 2, distance = length - padding, axis = [0, 1])
instances = 2, |> patternLinear2d(instances = 2, distance = width - padding, axis = [1, 0])
distance = length - padding,
axis = [0, 1],
)
|> patternLinear2d(
instances = 2,
distance = width - padding,
axis = [1, 0],
)
|> extrude(%, length = -cbDepth) |> extrude(%, length = -cbDepth)
extrude003 = startSketchOn(extrude001, 'start') extrude003 = startSketchOn(extrude001, 'start')
|> circle( |> circle(
center = [ center = [
-(width / 2 - (padding / 2)), -(width / 2 - (padding / 2)),
-(length / 2 - (padding / 2)) -(length / 2 - (padding / 2))
], ],
radius = holeDia / 2, radius = holeDia / 2,
) )
|> patternLinear2d( |> patternLinear2d(instances = 2, distance = length - padding, axis = [0, 1])
instances = 2, |> patternLinear2d(instances = 2, distance = width - padding, axis = [1, 0])
distance = length - padding,
axis = [0, 1],
)
|> patternLinear2d(
instances = 2,
distance = width - padding,
axis = [1, 0],
)
|> extrude(length = -height + cbDepth) |> extrude(length = -height + cbDepth)
extrude004 = startSketchOn(extrude001, 'end') extrude004 = startSketchOn(extrude001, 'end')
|> circle( |> circle(center = [0, 0], radius = bearingDia / 2)
center = [0, 0], |> extrude(length = -height)
radius = bearingDia/2,
)
|> extrude(length = -height)

View File

@ -17,21 +17,15 @@ chainThickness = sphereDia / 8
linkDiameter = sphereDia / 4 linkDiameter = sphereDia / 4
// Sketch the inside bearing piece // Sketch the inside bearing piece
insideWallSketch = startSketchOn(offsetPlane("XY", offset = -overallThickness / 2)) insideWallSketch = startSketchOn(offsetPlane(XY, offset = -overallThickness / 2))
|> circle( |> circle(center = [0, 0], radius = shaftDia / 2 + wallThickness)
center = [0, 0], |> hole(circle(center = [0, 0], radius = shaftDia / 2), %)
radius = shaftDia / 2 + wallThickness
)
|> hole(circle(
center = [0, 0],
radius = shaftDia / 2
), %)
// Extrude the inside bearing piece // Extrude the inside bearing piece
insideWall = extrude(insideWallSketch, length = overallThickness) insideWall = extrude(insideWallSketch, length = overallThickness)
// Create the sketch of one of the balls // Create the sketch of one of the balls
ballsSketch = startSketchOn("XY") ballsSketch = startSketchOn(XY)
|> startProfileAt([shaftDia / 2 + wallThickness, 0.001], %) |> startProfileAt([shaftDia / 2 + wallThickness, 0.001], %)
|> arc({ |> arc({
angleEnd = 0, angleEnd = 0,
@ -47,11 +41,11 @@ balls = revolve(ballsSketch, axis = "X")
axis = [0, 0, 1], axis = [0, 0, 1],
center = [0, 0, 0], center = [0, 0, 0],
instances = nBalls, instances = nBalls,
rotateDuplicates = true rotateDuplicates = true,
) )
// Create the sketch for the chain around the balls // Create the sketch for the chain around the balls
chainSketch = startSketchOn("XY") chainSketch = startSketchOn(XY)
|> startProfileAt([ |> startProfileAt([
shaftDia / 2 + wallThickness + sphereDia / 2 - (chainWidth / 2), shaftDia / 2 + wallThickness + sphereDia / 2 - (chainWidth / 2),
0.125 * sin(toRadians(60)) 0.125 * sin(toRadians(60))
@ -72,17 +66,17 @@ chainHead = revolve(chainSketch, axis = "X")
axis = [0, 0, 1], axis = [0, 0, 1],
center = [0, 0, 0], center = [0, 0, 0],
instances = nBalls, instances = nBalls,
rotateDuplicates = true rotateDuplicates = true,
) )
// Create the sketch for the links in between the chains // Create the sketch for the links in between the chains
linkSketch = startSketchOn("XZ") linkSketch = startSketchOn(XZ)
|> circle( |> circle(
center = [ center = [
shaftDia / 2 + wallThickness + sphereDia / 2, shaftDia / 2 + wallThickness + sphereDia / 2,
0 0
], ],
radius = linkDiameter / 2 radius = linkDiameter / 2,
) )
// Revolve the link sketch // Revolve the link sketch
@ -92,19 +86,13 @@ linkRevolve = revolve(linkSketch, axis = 'Y', angle = 360 / nBalls)
axis = [0, 0, 1], axis = [0, 0, 1],
center = [0, 0, 0], center = [0, 0, 0],
instances = nBalls, instances = nBalls,
rotateDuplicates = true rotateDuplicates = true,
) )
// Create the sketch for the outside walls // Create the sketch for the outside walls
outsideWallSketch = startSketchOn(offsetPlane("XY", offset = -overallThickness / 2)) outsideWallSketch = startSketchOn(offsetPlane(XY, offset = -overallThickness / 2))
|> circle( |> circle(center = [0, 0], radius = outsideDiameter / 2)
center = [0, 0], |> hole(circle(center = [0, 0], radius = shaftDia / 2 + wallThickness + sphereDia), %)
radius = outsideDiameter / 2
)
|> hole(circle(
center = [0, 0],
radius = shaftDia / 2 + wallThickness + sphereDia
), %)
outsideWall = extrude(outsideWallSketch, length = overallThickness) outsideWall = extrude(outsideWallSketch, length = overallThickness)

View File

@ -130,7 +130,7 @@ fn armRestProfile(plane, offset) {
export fn armRest(plane, offset) { export fn armRest(plane, offset) {
path = armRestPath( offsetPlane(plane, offset = offset)) path = armRestPath( offsetPlane(plane, offset = offset))
profile = armRestProfile( offsetPlane("-XZ", offset = 20), offset) profile = armRestProfile( offsetPlane(-XZ, offset = 20), offset)
sweep(profile, path = path) sweep(profile, path = path)
return 0 return 0
} }

View File

@ -16,19 +16,19 @@ import backSlats from "bench-parts.kcl"
import armRest from "bench-parts.kcl" import armRest from "bench-parts.kcl"
// Create the dividers, these hold the seat and back slats // Create the dividers, these hold the seat and back slats
divider("YZ") divider(YZ)
divider(offsetPlane("-YZ", offset = benchLength / 2)) divider(offsetPlane(-YZ, offset = benchLength / 2))
divider(offsetPlane("YZ", offset = benchLength / 2)) divider(offsetPlane(YZ, offset = benchLength / 2))
// Create the connectors to join the dividers // Create the connectors to join the dividers
connector(offsetPlane("YZ", offset = -benchLength / 2), benchLength) connector(offsetPlane(YZ, offset = -benchLength / 2), benchLength)
// Create the seat slats // Create the seat slats
seatSlats(offsetPlane("YZ", offset = -benchLength / 2 - dividerThickness / 2), benchLength + dividerThickness) seatSlats(offsetPlane(YZ, offset = -benchLength / 2 - (dividerThickness / 2)), benchLength + dividerThickness)
// Create the back slats // Create the back slats
backSlats(offsetPlane("YZ", offset = -benchLength / 2 - dividerThickness / 2), benchLength + dividerThickness) backSlats(offsetPlane(YZ, offset = -benchLength / 2 - (dividerThickness / 2)), benchLength + dividerThickness)
// Create the arm rests // Create the arm rests
armRest("-YZ", benchLength / 2) armRest(-YZ, benchLength / 2)
armRest("-YZ", -benchLength / 2) armRest(-YZ, -benchLength / 2)

View File

@ -1,7 +1,6 @@
// Shelf Bracket // Shelf Bracket
// This is a bracket that holds a shelf. It is made of aluminum and is designed to hold a force of 300 lbs. The bracket is 6 inches wide and the force is applied at the end of the shelf, 12 inches from the wall. The bracket has a factor of safety of 1.2. The legs of the bracket are 5 inches and 2 inches long. The thickness of the bracket is calculated from the constraints provided. // This is a bracket that holds a shelf. It is made of aluminum and is designed to hold a force of 300 lbs. The bracket is 6 inches wide and the force is applied at the end of the shelf, 12 inches from the wall. The bracket has a factor of safety of 1.2. The legs of the bracket are 5 inches and 2 inches long. The thickness of the bracket is calculated from the constraints provided.
// Define constants // Define constants
sigmaAllow = 35000 // psi (6061-T6 aluminum) sigmaAllow = 35000 // psi (6061-T6 aluminum)
width = 6 // inch width = 6 // inch
@ -12,14 +11,16 @@ wallMountL = 2 // inches
shelfDepth = 12 // Shelf is 12 inches in depth from the wall shelfDepth = 12 // Shelf is 12 inches in depth from the wall
moment = shelfDepth * p // assume the force is applied at the end of the shelf to be conservative (lb-in) moment = shelfDepth * p // assume the force is applied at the end of the shelf to be conservative (lb-in)
// Calculate required thickness of bracket // Calculate required thickness of bracket
thickness = sqrt(moment * factorOfSafety * 6 / (sigmaAllow * width)) // this is the calculation of two brackets holding up the shelf (inches) thickness = sqrt(moment * factorOfSafety * 6 / (sigmaAllow * width)) // this is the calculation of two brackets holding up the shelf (inches)
filletRadius = .25 filletRadius = .25
extFilletRadius = filletRadius + thickness extFilletRadius = filletRadius + thickness
mountingHoleDiameter = 0.5 mountingHoleDiameter = 0.5
sketch001 = startSketchOn('XZ') sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = shelfMountL - thickness, tag = $seg01) |> xLine(length = shelfMountL - thickness, tag = $seg01)
|> yLine(length = thickness, tag = $seg02) |> yLine(length = thickness, tag = $seg02)
@ -29,48 +30,18 @@ sketch001 = startSketchOn('XZ')
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg06) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg06)
|> close() |> close()
|> extrude(%, length = width) |> extrude(%, length = width)
|> fillet( |> fillet(radius = extFilletRadius, tags = [getNextAdjacentEdge(seg03)])
radius = extFilletRadius, |> fillet(radius = filletRadius, tags = [getNextAdjacentEdge(seg06)])
tags = [getNextAdjacentEdge(seg03)], |> fillet(radius = filletRadius, tags = [seg02, getOppositeEdge(seg02)])
) |> fillet(radius = filletRadius, tags = [seg05, getOppositeEdge(seg05)])
|> fillet(
radius = filletRadius,
tags = [getNextAdjacentEdge(seg06)],
)
|> fillet(
radius = filletRadius,
tags = [seg02, getOppositeEdge(seg02)],
)
|> fillet(
radius = filletRadius,
tags = [seg05, getOppositeEdge(seg05)],
)
sketch002 = startSketchOn(sketch001, seg03) sketch002 = startSketchOn(sketch001, seg03)
|> circle( |> circle(center = [-1.25, 1], radius = mountingHoleDiameter / 2)
center = [-1.25, 1], |> patternLinear2d(instances = 2, distance = 2.5, axis = [-1, 0])
radius = mountingHoleDiameter / 2, |> patternLinear2d(instances = 2, distance = 4, axis = [0, 1])
) |> extrude(%, length = -thickness - .01)
|> patternLinear2d(
instances = 2,
distance = 2.5,
axis = [-1, 0],
)
|> patternLinear2d(
instances = 2,
distance = 4,
axis = [0, 1],
)
|> extrude(%, length = -thickness-.01)
sketch003 = startSketchOn(sketch001, seg04) sketch003 = startSketchOn(sketch001, seg04)
|> circle( |> circle(center = [1, -1], radius = mountingHoleDiameter / 2)
center = [1, -1], |> patternLinear2d(instances = 2, distance = 4, axis = [1, 0])
radius = mountingHoleDiameter / 2, |> extrude(%, length = -thickness - 0.1)
)
|> patternLinear2d(
instances = 2,
distance = 4,
axis = [1, 0],
)
|> extrude(%, length = -thickness-0.1)

View File

@ -1,16 +1,14 @@
// Brake Caliper // Brake Caliper
// Brake calipers are used to squeeze the brake pads against the rotor, causing larger and larger amounts of friction depending on how hard the brakes are pressed. // Brake calipers are used to squeeze the brake pads against the rotor, causing larger and larger amounts of friction depending on how hard the brakes are pressed.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import Constants // Import Constants
import caliperTolerance, caliperPadLength, caliperThickness, caliperOuterEdgeRadius, caliperInnerEdgeRadius, rotorDiameter, rotorTotalThickness, yAxisOffset from "globals.kcl" import caliperTolerance, caliperPadLength, caliperThickness, caliperOuterEdgeRadius, caliperInnerEdgeRadius, rotorDiameter, rotorTotalThickness, yAxisOffset from "globals.kcl"
// Sketch the brake caliper profile // Sketch the brake caliper profile
brakeCaliperSketch = startSketchOn('XY') brakeCaliperSketch = startSketchOn(XY)
|> startProfileAt([ |> startProfileAt([
rotorDiameter / 2 + caliperTolerance, rotorDiameter / 2 + caliperTolerance,
0 0

View File

@ -1,39 +1,28 @@
// Wheel rotor // Wheel rotor
// A component of a disc brake system. It provides a surface for brake pads to press against, generating the friction needed to slow or stop the vehicle. // A component of a disc brake system. It provides a surface for brake pads to press against, generating the friction needed to slow or stop the vehicle.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import Constants // Import Constants
import rotorDiameter, rotorInnerDiameter, rotorSinglePlateThickness, rotorInnerDiameterThickness, lugHolePatternDia, lugSpacing, rotorTotalThickness, spacerPatternDiameter, spacerDiameter, spacerLength, spacerCount, wheelDiameter, lugCount, yAxisOffset, drillAndSlotCount from "globals.kcl" import rotorDiameter, rotorInnerDiameter, rotorSinglePlateThickness, rotorInnerDiameterThickness, lugHolePatternDia, lugSpacing, rotorTotalThickness, spacerPatternDiameter, spacerDiameter, spacerLength, spacerCount, wheelDiameter, lugCount, yAxisOffset, drillAndSlotCount from "globals.kcl"
rotorSketch = startSketchOn('XZ') rotorSketch = startSketchOn(XZ)
|> circle( |> circle(center = [0, 0], radius = rotorDiameter / 2)
center = [0, 0],
radius = rotorDiameter / 2
)
rotor = extrude(rotorSketch, length = rotorSinglePlateThickness) rotor = extrude(rotorSketch, length = rotorSinglePlateThickness)
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90) |> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
rotorBumpSketch = startSketchOn(rotor, 'end') rotorBumpSketch = startSketchOn(rotor, 'end')
|> circle( |> circle(center = [0, 0], radius = rotorInnerDiameter / 2)
center = [0, 0],
radius = rotorInnerDiameter / 2
)
rotorBump = extrude(rotorBumpSketch, length = rotorInnerDiameterThickness) rotorBump = extrude(rotorBumpSketch, length = rotorInnerDiameterThickness)
lugHoles = startSketchOn(rotorBump, 'end') lugHoles = startSketchOn(rotorBump, 'end')
|> circle( |> circle(center = [-lugSpacing / 2, 0], radius = 0.315)
center = [-lugSpacing / 2, 0],
radius = 0.315
)
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = lugCount, instances = lugCount,
rotateDuplicates = true rotateDuplicates = true,
) )
|> extrude(%, length = -(rotorInnerDiameterThickness + rotorSinglePlateThickness)) |> extrude(%, length = -(rotorInnerDiameterThickness + rotorSinglePlateThickness))
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90) |> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
@ -44,35 +33,26 @@ centerSpacer = startSketchOn(rotor, 'start')
|> extrude(%, length = spacerLength) |> extrude(%, length = spacerLength)
secondaryRotorSketch = startSketchOn(centerSpacer, 'end') secondaryRotorSketch = startSketchOn(centerSpacer, 'end')
|> circle( |> circle(center = [0, 0], radius = rotorDiameter / 2)
center = [0, 0],
radius = rotorDiameter / 2
)
secondRotor = extrude(secondaryRotorSketch, length = rotorSinglePlateThickness) secondRotor = extrude(secondaryRotorSketch, length = rotorSinglePlateThickness)
lugHoles2 = startSketchOn(secondRotor, 'end') lugHoles2 = startSketchOn(secondRotor, 'end')
|> circle( |> circle(center = [-lugSpacing / 2, 0], radius = 0.315)
center = [-lugSpacing / 2, 0],
radius = 0.315
)
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = lugCount, instances = lugCount,
rotateDuplicates = true rotateDuplicates = true,
) )
|> extrude(length = -rotorSinglePlateThickness) |> extrude(length = -rotorSinglePlateThickness)
spacerSketch = startSketchOn(rotor, 'start') spacerSketch = startSketchOn(rotor, 'start')
|> circle( |> circle(center = [spacerPatternDiameter / 2, 0], radius = spacerDiameter)
center = [spacerPatternDiameter / 2, 0],
radius = spacerDiameter
)
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = spacerCount, instances = spacerCount,
rotateDuplicates = true rotateDuplicates = true,
) )
spacers = extrude(spacerSketch, length = spacerLength) spacers = extrude(spacerSketch, length = spacerLength)
@ -87,7 +67,7 @@ rotorSlottedSketch = startSketchOn(rotor, 'START')
center = [0, 0], center = [0, 0],
instances = drillAndSlotCount, instances = drillAndSlotCount,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
rotorSlotted = extrude(rotorSlottedSketch, length = -rotorSinglePlateThickness / 2) rotorSlotted = extrude(rotorSlottedSketch, length = -rotorSinglePlateThickness / 2)
@ -102,7 +82,7 @@ secondRotorSlottedSketch = startSketchOn(secondRotor, 'END')
center = [0, 0], center = [0, 0],
instances = drillAndSlotCount, instances = drillAndSlotCount,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude(secondRotorSlottedSketch, length = -rotorSinglePlateThickness / 2) extrude(secondRotorSlottedSketch, length = -rotorSinglePlateThickness / 2)

View File

@ -1,21 +1,22 @@
// Tire // Tire
// A tire is a critical component of a vehicle that provides the necessary traction and grip between the car and the road. It supports the vehicle's weight and absorbs shocks from road irregularities. // A tire is a critical component of a vehicle that provides the necessary traction and grip between the car and the road. It supports the vehicle's weight and absorbs shocks from road irregularities.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import Constants // Import Constants
import tireInnerDiameter, tireOuterDiameter, tireDepth, bendRadius, tireTreadWidth, tireTreadDepth, tireTreadOffset from "globals.kcl" import tireInnerDiameter, tireOuterDiameter, tireDepth, bendRadius, tireTreadWidth, tireTreadDepth, tireTreadOffset from "globals.kcl"
// Create the sketch of the tire // Create the sketch of the tire
tireSketch = startSketchOn("XY") tireSketch = startSketchOn(XY)
|> startProfileAt([tireInnerDiameter / 2, tireDepth / 2], %) |> startProfileAt([tireInnerDiameter / 2, tireDepth / 2], %)
|> line(endAbsolute = [ |> line(
tireOuterDiameter / 2 - bendRadius, endAbsolute = [
tireDepth / 2 tireOuterDiameter / 2 - bendRadius,
], tag = $edge1) tireDepth / 2
],
tag = $edge1,
)
|> tangentialArc({ offset = -90, radius = bendRadius }, %) |> tangentialArc({ offset = -90, radius = bendRadius }, %)
|> line(endAbsolute = [ |> line(endAbsolute = [
tireOuterDiameter / 2, tireOuterDiameter / 2,

View File

@ -1,69 +1,49 @@
// Car Wheel // Car Wheel
// A sports car wheel with a circular lug pattern and spokes. // A sports car wheel with a circular lug pattern and spokes.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import Constants // Import Constants
import lugCount, lugSpacing, offset, backSpacing, wheelWidth, wheelDiameter, spokeCount, spokeGap, spokeAngle, spokeThickness from "globals.kcl" import lugCount, lugSpacing, offset, backSpacing, wheelWidth, wheelDiameter, spokeCount, spokeGap, spokeAngle, spokeThickness from "globals.kcl"
// Create the wheel center // Create the wheel center
lugBase = startSketchOn('XZ') lugBase = startSketchOn(XZ)
|> circle( |> circle(center = [0, 0], radius = (lugSpacing + 1.5) / 2)
center = [0, 0], |> hole(circle(center = [0, 0], radius = (lugSpacing - 1.5) / 2), %)
radius = (lugSpacing + 1.5) / 2
)
|> hole(circle(
center = [0, 0],
radius = (lugSpacing - 1.5) / 2
), %)
|> extrude(length = wheelWidth / 20) |> extrude(length = wheelWidth / 20)
// Extend the wheel center and bore holes to accomidate the lug heads // Extend the wheel center and bore holes to accomidate the lug heads
lugExtrusion = startSketchOn(lugBase, 'END') lugExtrusion = startSketchOn(lugBase, 'END')
|> circle( |> circle(center = [0, 0], radius = (lugSpacing + 1.5) / 2)
center = [0, 0], |> hole(circle(center = [0, 0], radius = (lugSpacing - 1.5) / 2), %)
radius = (lugSpacing + 1.5) / 2
)
|> hole(circle(
center = [0, 0],
radius = (lugSpacing - 1.5) / 2
), %)
|> extrude(length = wheelWidth / 10) |> extrude(length = wheelWidth / 10)
// Create the circular pattern for the lugs // Create the circular pattern for the lugs
lugClearance = startSketchOn(lugExtrusion, 'END') lugClearance = startSketchOn(lugExtrusion, 'END')
|> circle( |> circle(center = [lugSpacing / 2, 0], radius = 1.2 / 2)
center = [lugSpacing / 2, 0],
radius = 1.2 / 2
)
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = lugCount, instances = lugCount,
rotateDuplicates = true rotateDuplicates = true,
) )
|> extrude(length = -wheelWidth / 10) |> extrude(length = -wheelWidth / 10)
// Create the circular pattern for the lug holes // Create the circular pattern for the lug holes
lugHoles = startSketchOn(lugBase, 'END') lugHoles = startSketchOn(lugBase, 'END')
|> circle( |> circle(center = [lugSpacing / 2, 0], radius = 16 * mm() / 2)
center = [lugSpacing / 2, 0],
radius = 16 * mm() / 2
)
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = lugCount, instances = lugCount,
rotateDuplicates = true rotateDuplicates = true,
) )
|> extrude(length = -wheelWidth / 20) |> extrude(length = -wheelWidth / 20)
|> appearance(color = "#ffffff", metalness = 0, roughness = 0) |> appearance(color = "#ffffff", metalness = 0, roughness = 0)
// Add detail to the wheel center by revolving curved edge profiles // Add detail to the wheel center by revolving curved edge profiles
wheelCenterInner = startSketchOn('XY') wheelCenterInner = startSketchOn(XY)
|> startProfileAt([(lugSpacing - 1.5) / 2, 0], %) |> startProfileAt([(lugSpacing - 1.5) / 2, 0], %)
|> yLine(length = -wheelWidth / 10 - (wheelWidth / 20)) |> yLine(length = -wheelWidth / 10 - (wheelWidth / 20))
|> bezierCurve({ |> bezierCurve({
@ -77,7 +57,7 @@ wheelCenterInner = startSketchOn('XY')
|> revolve(axis = 'y') |> revolve(axis = 'y')
|> appearance(color = "#ffffff", metalness = 0, roughness = 0) |> appearance(color = "#ffffff", metalness = 0, roughness = 0)
wheelCenterOuter = startSketchOn('XY') wheelCenterOuter = startSketchOn(XY)
|> startProfileAt([(lugSpacing + 1.5) / 2, 0], %) |> startProfileAt([(lugSpacing + 1.5) / 2, 0], %)
|> yLine(length = -wheelWidth / 10 - (wheelWidth / 20)) |> yLine(length = -wheelWidth / 10 - (wheelWidth / 20))
|> bezierCurve({ |> bezierCurve({
@ -145,7 +125,7 @@ fn spoke(spokeGap, spokeAngle, spokeThickness) {
center = [0, -2000, 0], center = [0, -2000, 0],
instances = spokeCount, instances = spokeCount,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
|> appearance(color = "#ffffff", metalness = 0, roughness = 0) |> appearance(color = "#ffffff", metalness = 0, roughness = 0)
return spokePattern return spokePattern
@ -155,7 +135,7 @@ spoke(spokeGap, spokeAngle, spokeThickness)
spoke(-spokeGap, -spokeAngle, -spokeThickness) spoke(-spokeGap, -spokeAngle, -spokeThickness)
// Define and revolve wheel exterior // Define and revolve wheel exterior
startSketchOn('XY') startSketchOn(XY)
|> startProfileAt([ |> startProfileAt([
wheelDiameter / 2, wheelDiameter / 2,
-wheelWidth + backSpacing + offset -wheelWidth + backSpacing + offset

View File

@ -20,7 +20,7 @@ export lugDiameter = 24 * mm()
export lugHeadLength = lugDiameter * .5 export lugHeadLength = lugDiameter * .5
export lugThreadDiameter = lugDiameter / 2 * .85 export lugThreadDiameter = lugDiameter / 2 * .85
export lugLength = 30 * mm() export lugLength = 30 * mm()
export lugThreadDepth = lugLength - 12.7 * mm() export lugThreadDepth = lugLength - (12.7 * mm())
// Car Rotor // Car Rotor
export rotorDiameter = 12 export rotorDiameter = 12
@ -50,4 +50,4 @@ export caliperTolerance = 0.050
export caliperPadLength = 1.6 export caliperPadLength = 1.6
export caliperThickness = 0.39 export caliperThickness = 0.39
export caliperOuterEdgeRadius = 0.39 export caliperOuterEdgeRadius = 0.39
export caliperInnerEdgeRadius = 0.12 export caliperInnerEdgeRadius = 0.12

View File

@ -1,11 +1,9 @@
// Lug Nut // Lug Nut
// lug Nuts are essential components used to create secure connections, whether for electrical purposes, like terminating wires or grounding, or for mechanical purposes, such as providing mounting points or reinforcing structural joints. // lug Nuts are essential components used to create secure connections, whether for electrical purposes, like terminating wires or grounding, or for mechanical purposes, such as providing mounting points or reinforcing structural joints.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import Constants // Import Constants
import lugDiameter, lugHeadLength, lugThreadDiameter, lugLength, lugThreadDepth, lugSpacing from "globals.kcl" import lugDiameter, lugHeadLength, lugThreadDiameter, lugLength, lugThreadDepth, lugSpacing from "globals.kcl"

View File

@ -4,24 +4,24 @@
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
import 'car-wheel.kcl' as carWheel import "car-wheel.kcl" as carWheel
import 'car-rotor.kcl' as carRotor import "car-rotor.kcl" as carRotor
import "brake-caliper.kcl" as brakeCaliper import "brake-caliper.kcl" as brakeCaliper
import 'lug-nut.kcl' as lugNut import "lug-nut.kcl" as lugNut
import 'car-tire.kcl' as carTire import "car-tire.kcl" as carTire
import lugCount from 'globals.kcl' import lugCount from "globals.kcl"
carRotor carRotor
|> translate(translate = [0, 0.5, 0]) |> translate(translate = [0, 0.5, 0])
carWheel carWheel
lugNut lugNut
|> patternCircular3d( |> patternCircular3d(
arcDegrees = 360, arcDegrees = 360,
axis = [0, 1, 0], axis = [0, 1, 0],
center = [0, 0, 0], center = [0, 0, 0],
instances = lugCount, instances = lugCount,
rotateDuplicates = false rotateDuplicates = false,
) )
brakeCaliper brakeCaliper
|> translate(translate = [0, 0.5, 0]) |> translate(translate = [0, 0.5, 0])
carTire carTire

View File

@ -6,42 +6,42 @@
// Globals referenced in drawRectangle // Globals referenced in drawRectangle
size = 100 size = 100
halfSize = size/2 halfSize = size / 2
extrudeLength = 1.0 extrudeLength = 1.0
metalConstant = 50 metalConstant = 50
roughnessConstant = 50 roughnessConstant = 50
// Create planes for 6 sides of a cube // Create planes for 6 sides of a cube
bluePlane = offsetPlane('XY', offset = halfSize) bluePlane = offsetPlane(XY, offset = halfSize)
yellowPlane = offsetPlane('XY', offset = -halfSize) yellowPlane = offsetPlane(XY, offset = -halfSize)
greenPlane = offsetPlane('XZ', offset = -halfSize) greenPlane = offsetPlane(XZ, offset = -halfSize)
purplePlane = offsetPlane('-XZ', offset = -halfSize) purplePlane = offsetPlane(-XZ, offset = -halfSize)
redPlane = offsetPlane('YZ', offset = halfSize - extrudeLength) redPlane = offsetPlane(YZ, offset = halfSize - extrudeLength)
tealPlane = offsetPlane('YZ', offset = -halfSize) tealPlane = offsetPlane(YZ, offset = -halfSize)
// Sketch a rectangle centered at the origin of the profile // Sketch a rectangle centered at the origin of the profile
fn sketchRectangle (profile, color) { fn sketchRectangle(profile, color) {
return profile return profile
|> startProfileAt([-halfSize, halfSize], %) |> startProfileAt([-halfSize, halfSize], %)
|> angledLine([0, size], %, $rectangleSegmentA001) |> angledLine([0, size], %, $rectangleSegmentA001)
|> angledLine([ |> angledLine([
segAng(rectangleSegmentA001) - 90, segAng(rectangleSegmentA001) - 90,
size size
], %, $rectangleSegmentB001) ], %, $rectangleSegmentB001)
|> angledLine([ |> angledLine([
segAng(rectangleSegmentA001), segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001) -segLen(rectangleSegmentA001)
], %, $rectangleSegmentC001) ], %, $rectangleSegmentC001)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
|> extrude(%, length = extrudeLength) |> extrude(%, length = extrudeLength)
|> appearance(color = color, metalness = metalConstant, roughness = roughnessConstant) |> appearance(color = color, metalness = metalConstant, roughness = roughnessConstant)
} }
// Sketch each side of the cube // Sketch each side of the cube
sketchRectangle(bluePlane,'#0000FF') sketchRectangle(bluePlane, '#0000FF')
sketchRectangle(yellowPlane,'#FFFF00') sketchRectangle(yellowPlane, '#FFFF00')
sketchRectangle(greenPlane,'#00FF00') sketchRectangle(greenPlane, '#00FF00')
sketchRectangle(redPlane,'#FF0000') sketchRectangle(redPlane, '#FF0000')
sketchRectangle(tealPlane,'#00FFFF') sketchRectangle(tealPlane, '#00FFFF')
sketchRectangle(purplePlane,'#FF00FF') sketchRectangle(purplePlane, '#FF00FF')

View File

@ -4,12 +4,11 @@
// Set Units // Set Units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
fn cycloidalGear(gearPitch, gearHeight, holeDiameter, helixAngle) { fn cycloidalGear(gearPitch, gearHeight, holeDiameter, helixAngle) {
// Create a function to draw the gear profile as a sketch. Rotate each profile about the gear's axis by an helix angle proportional to the total gear height // Create a function to draw the gear profile as a sketch. Rotate each profile about the gear's axis by an helix angle proportional to the total gear height
fn gearSketch(gHeight) { fn gearSketch(gHeight) {
helixAngleP = helixAngle * gHeight / gearHeight helixAngleP = helixAngle * gHeight / gearHeight
gearProfile = startSketchOn(offsetPlane("XY", offset = gHeight)) gearProfile = startSketchOn(offsetPlane(XY, offset = gHeight))
|> startProfileAt([ |> startProfileAt([
gearPitch * 1.55 * cos(toRadians(helixAngleP)) + gearPitch * sin(toRadians(-helixAngleP)), gearPitch * 1.55 * cos(toRadians(helixAngleP)) + gearPitch * sin(toRadians(-helixAngleP)),
gearPitch * 1.55 * sin(toRadians(helixAngleP)) + gearPitch * cos(toRadians(-helixAngleP)) gearPitch * 1.55 * sin(toRadians(helixAngleP)) + gearPitch * cos(toRadians(-helixAngleP))
@ -31,10 +30,7 @@ fn cycloidalGear(gearPitch, gearHeight, holeDiameter, helixAngle) {
|> tangentialArc({ radius = gearPitch, offset = -180 }, %) |> tangentialArc({ radius = gearPitch, offset = -180 }, %)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %) |> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> close(%) |> close(%)
|> hole(circle( |> hole(circle(center = [0, 0], radius = holeDiameter / 2), %)
center = [0, 0],
radius = holeDiameter / 2
), %)
return gearProfile return gearProfile
} }

View File

@ -39,7 +39,7 @@ plane = {
} }
// Create a regular pentagon inscribed in a circle of radius pentR // Create a regular pentagon inscribed in a circle of radius pentR
bottomFace = startSketchOn('XY') bottomFace = startSketchOn(XY)
|> polygon({ |> polygon({
radius = pentR, radius = pentR,
numSides = 5, numSides = 5,
@ -66,7 +66,7 @@ bottomBowl = patternCircular3d(
axis = [0, 0, 1], axis = [0, 0, 1],
center = [0, 0, 0], center = [0, 0, 0],
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
// pattern the bottom to create the top face // pattern the bottom to create the top face
@ -76,7 +76,7 @@ patternCircular3d(
axis = [0, 1, 0], axis = [0, 1, 0],
center = [0, 0, inscR], center = [0, 0, inscR],
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
// pattern the bottom angled faces to create the top // pattern the bottom angled faces to create the top
@ -86,5 +86,5 @@ patternCircular3d(
axis = [0, 1, 0], axis = [0, 1, 0],
center = [0, 0, inscR], center = [0, 0, inscR],
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )

View File

@ -11,7 +11,7 @@ wallThickness = 3
holeDia = 4 holeDia = 4
// Model a box with base enclosure dimensions // Model a box with base enclosure dimensions
sketch001 = startSketchOn('XY') sketch001 = startSketchOn(XY)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine([0, width], %, $rectangleSegmentA001) |> angledLine([0, width], %, $rectangleSegmentA001)
|> angledLine([ |> angledLine([
@ -32,14 +32,11 @@ extrude001 = extrude(sketch001, length = height)
getNextAdjacentEdge(rectangleSegmentB001), getNextAdjacentEdge(rectangleSegmentB001),
getNextAdjacentEdge(rectangleSegmentC001), getNextAdjacentEdge(rectangleSegmentC001),
getNextAdjacentEdge(rectangleSegmentD001) getNextAdjacentEdge(rectangleSegmentD001)
] ],
) )
// Apply a shell to the enclosure base to create the internal storage // Apply a shell to the enclosure base to create the internal storage
|> shell( |> shell(faces = ["end"], thickness = wallThickness)
faces = ["end"],
thickness = wallThickness
)
// Define a function to create the internal structure to secure a fastener at each corner // Define a function to create the internal structure to secure a fastener at each corner
fn function001(originStart) { fn function001(originStart) {
@ -55,14 +52,8 @@ fn function001(originStart) {
// Create a pillar with a fasterner hole at the center // Create a pillar with a fasterner hole at the center
sketch002 = startSketchOn(plane001) sketch002 = startSketchOn(plane001)
|> circle( |> circle(center = [originStart[0], originStart[1]], radius = holeDia + wallThickness)
center = [originStart[0], originStart[1]], |> hole(circle(center = [originStart[0], originStart[1]], radius = holeDia), %)
radius = holeDia + wallThickness
)
|> hole(circle(
center = [originStart[0], originStart[1]],
radius = holeDia
), %)
extrude002 = extrude(sketch002, length = height - wallThickness) extrude002 = extrude(sketch002, length = height - wallThickness)
return extrude002 return extrude002
@ -87,7 +78,7 @@ function001([
]) ])
// Define lid position and outer surface // Define lid position and outer surface
sketch003 = startSketchOn('XY') sketch003 = startSketchOn(XY)
|> startProfileAt([width * 1.2, 0], %) |> startProfileAt([width * 1.2, 0], %)
|> angledLine([0, width], %, $rectangleSegmentA002) |> angledLine([0, width], %, $rectangleSegmentA002)
|> angledLine([ |> angledLine([
@ -105,28 +96,28 @@ sketch003 = startSketchOn('XY')
width * 1.2 + wallThickness * 3 + holeDia, width * 1.2 + wallThickness * 3 + holeDia,
wallThickness * 3 + holeDia wallThickness * 3 + holeDia
], ],
radius = holeDia radius = holeDia,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
width * 1.2 + wallThickness * 3 + holeDia, width * 1.2 + wallThickness * 3 + holeDia,
length - (wallThickness * 3 + holeDia) length - (wallThickness * 3 + holeDia)
], ],
radius = holeDia radius = holeDia,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
width * 2.2 - (wallThickness * 3 + holeDia), width * 2.2 - (wallThickness * 3 + holeDia),
wallThickness * 3 + holeDia wallThickness * 3 + holeDia
], ],
radius = holeDia radius = holeDia,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
width * 2.2 - (wallThickness * 3 + holeDia), width * 2.2 - (wallThickness * 3 + holeDia),
length - (wallThickness * 3 + holeDia) length - (wallThickness * 3 + holeDia)
], ],
radius = holeDia radius = holeDia,
), %) ), %)
extrude003 = extrude(sketch003, length = wallThickness) extrude003 = extrude(sketch003, length = wallThickness)
|> fillet( |> fillet(
@ -136,7 +127,7 @@ extrude003 = extrude(sketch003, length = wallThickness)
getNextAdjacentEdge(rectangleSegmentB002), getNextAdjacentEdge(rectangleSegmentB002),
getNextAdjacentEdge(rectangleSegmentC002), getNextAdjacentEdge(rectangleSegmentC002),
getNextAdjacentEdge(rectangleSegmentD002) getNextAdjacentEdge(rectangleSegmentD002)
] ],
) )
// Define lid inner and sealing surfaces // Define lid inner and sealing surfaces
@ -161,28 +152,28 @@ sketch004 = startSketchOn(extrude003, 'END')
width * 1.2 + wallThickness * 3 + holeDia, width * 1.2 + wallThickness * 3 + holeDia,
wallThickness * 3 + holeDia wallThickness * 3 + holeDia
], ],
radius = holeDia + wallThickness radius = holeDia + wallThickness,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
width * 1.2 + wallThickness * 3 + holeDia, width * 1.2 + wallThickness * 3 + holeDia,
length - (wallThickness * 3 + holeDia) length - (wallThickness * 3 + holeDia)
], ],
radius = holeDia + wallThickness radius = holeDia + wallThickness,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
width * 2.2 - (wallThickness * 3 + holeDia), width * 2.2 - (wallThickness * 3 + holeDia),
wallThickness * 3 + holeDia wallThickness * 3 + holeDia
], ],
radius = holeDia + wallThickness radius = holeDia + wallThickness,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
width * 2.2 - (wallThickness * 3 + holeDia), width * 2.2 - (wallThickness * 3 + holeDia),
length - (wallThickness * 3 + holeDia) length - (wallThickness * 3 + holeDia)
], ],
radius = holeDia + wallThickness radius = holeDia + wallThickness,
), %) ), %)
extrude004 = extrude(sketch004, length = wallThickness) extrude004 = extrude(sketch004, length = wallThickness)
|> fillet( |> fillet(
@ -192,5 +183,5 @@ extrude004 = extrude(sketch004, length = wallThickness)
getNextAdjacentEdge(rectangleSegmentB003), getNextAdjacentEdge(rectangleSegmentB003),
getNextAdjacentEdge(rectangleSegmentC003), getNextAdjacentEdge(rectangleSegmentC003),
getNextAdjacentEdge(rectangleSegmentD003) getNextAdjacentEdge(rectangleSegmentD003)
] ],
) )

View File

@ -45,15 +45,9 @@ fn primaryTube(n, angle001, length001, length002, length003) {
}, %) }, %)
// Create the cross section of each tube and sweep them // Create the cross section of each tube and sweep them
sweepProfile = startSketchOn('XY') sweepProfile = startSketchOn(XY)
|> circle( |> circle(center = [pos001, 0], radius = primaryTubeDiameter / 2)
center = [pos001, 0], |> hole(circle(center = [pos001, 0], radius = primaryTubeDiameter / 2 - wallThickness), %)
radius = primaryTubeDiameter / 2
)
|> hole(circle(
center = [pos001, 0],
radius = primaryTubeDiameter / 2 - wallThickness
), %)
|> sweep(path = sweepPath) |> sweep(path = sweepPath)
return { } return { }
@ -66,7 +60,7 @@ primaryTube(2, 24.3, 5, 5, 3)
primaryTube(3, 25.2, 5, 5, 3) primaryTube(3, 25.2, 5, 5, 3)
// Create the mounting flange for the header // Create the mounting flange for the header
flangeSketch = startSketchOn('XY') flangeSketch = startSketchOn(XY)
|> startProfileAt([3 + 1.3, -1.25], %) |> startProfileAt([3 + 1.3, -1.25], %)
|> xLine(length = -2.6, tag = $seg01) |> xLine(length = -2.6, tag = $seg01)
|> tangentialArc({ radius = .3, offset = -40 }, %) |> tangentialArc({ radius = .3, offset = -40 }, %)
@ -87,22 +81,10 @@ flangeSketch = startSketchOn('XY')
|> close() |> close()
// Create openings in the flange to accommodate each tube // Create openings in the flange to accommodate each tube
|> hole(circle( |> hole(circle(center = [0, 0], radius = primaryTubeDiameter / 2 - wallThickness), %)
center = [0, 0], |> hole(circle(center = [2, 0], radius = primaryTubeDiameter / 2 - wallThickness), %)
radius = primaryTubeDiameter / 2 - wallThickness |> hole(circle(center = [4, 0], radius = primaryTubeDiameter / 2 - wallThickness), %)
), %) |> hole(circle(center = [6, 0], radius = primaryTubeDiameter / 2 - wallThickness), %)
|> hole(circle(
center = [2, 0],
radius = primaryTubeDiameter / 2 - wallThickness
), %)
|> hole(circle(
center = [4, 0],
radius = primaryTubeDiameter / 2 - wallThickness
), %)
|> hole(circle(
center = [6, 0],
radius = primaryTubeDiameter / 2 - wallThickness
), %)
// Add mounting holes to the flange // Add mounting holes to the flange
|> hole(circle( |> hole(circle(
@ -110,28 +92,28 @@ flangeSketch = startSketchOn('XY')
-primaryTubeDiameter * .6, -primaryTubeDiameter * .6,
-primaryTubeDiameter * .6 -primaryTubeDiameter * .6
], ],
radius = 0.25 / 2 radius = 0.25 / 2,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
primaryTubeDiameter * .6, primaryTubeDiameter * .6,
primaryTubeDiameter * .6 primaryTubeDiameter * .6
], ],
radius = 0.25 / 2 radius = 0.25 / 2,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
3 * 2 - (primaryTubeDiameter * .6), 3 * 2 - (primaryTubeDiameter * .6),
primaryTubeDiameter * .6 primaryTubeDiameter * .6
], ],
radius = 0.25 / 2 radius = 0.25 / 2,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
3 * 2 + primaryTubeDiameter * .6, 3 * 2 + primaryTubeDiameter * .6,
-primaryTubeDiameter * .6 -primaryTubeDiameter * .6
], ],
radius = 0.25 / 2 radius = 0.25 / 2,
), %) ), %)
// Extrude the flange and fillet the edges // Extrude the flange and fillet the edges
@ -141,12 +123,12 @@ flangeSketch = startSketchOn('XY')
tags = [ tags = [
getNextAdjacentEdge(seg04), getNextAdjacentEdge(seg04),
getNextAdjacentEdge(seg07) getNextAdjacentEdge(seg07)
] ],
) )
|> fillet( |> fillet(
radius = .25, radius = .25,
tags = [ tags = [
getNextAdjacentEdge(seg03), getNextAdjacentEdge(seg03),
getNextAdjacentEdge(seg08) getNextAdjacentEdge(seg08)
] ],
) )

View File

@ -21,44 +21,32 @@ nHoles = 4
assertGreaterThan(nHoles, 1, "nHoles must be greater than 1") assertGreaterThan(nHoles, 1, "nHoles must be greater than 1")
// Create the circular pattern for the mounting holes // Create the circular pattern for the mounting holes
circles = startSketchOn('XY') circles = startSketchOn(XY)
|> circle( |> circle(center = [mountingHolePlacementDiameter / 2, 0], radius = mountingHoleDia / 2)
center = [mountingHolePlacementDiameter / 2, 0],
radius = mountingHoleDia / 2
)
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = nHoles, instances = nHoles,
rotateDuplicates = true rotateDuplicates = true,
) )
// Create the base of the flange and add the mounting holes // Create the base of the flange and add the mounting holes
flangeBase = startSketchOn('XY') flangeBase = startSketchOn(XY)
|> circle( |> circle(center = [0, 0], radius = baseDia / 2)
center = [0, 0],
radius = baseDia / 2
)
|> hole(circles, %) |> hole(circles, %)
|> extrude(length = baseThickness) |> extrude(length = baseThickness)
// Create the extrusion on the top of the flange base // Create the extrusion on the top of the flange base
topExtrusion = startSketchOn(flangeBase, 'end') topExtrusion = startSketchOn(flangeBase, 'end')
|> circle( |> circle(center = [0, 0], radius = topTotalDiameter / 2)
center = [0, 0],
radius = topTotalDiameter / 2
)
|> extrude(length = topTotalThickness) |> extrude(length = topTotalThickness)
// Create the extrusion on the bottom of the flange base // Create the extrusion on the bottom of the flange base
bottomExtrusion = startSketchOn(flangeBase, 'start') bottomExtrusion = startSketchOn(flangeBase, 'start')
|> circle( |> circle(center = [0, 0], radius = bottomTotalDiameter / 2)
center = [0, 0],
radius = bottomTotalDiameter / 2
)
|> extrude(length = bottomThickness) |> extrude(length = bottomThickness)
// Cut a hole through the entire body // Cut a hole through the entire body
pipeHole = startSketchOn(topExtrusion, 'end') pipeHole = startSketchOn(topExtrusion, 'end')
|> circle(center = [0, 0], radius = pipeDia/2) |> circle(center = [0, 0], radius = pipeDia / 2)
|> extrude(%, length = -(topTotalThickness + baseThickness + bottomThickness)) |> extrude(%, length = -(topTotalThickness + baseThickness + bottomThickness))

View File

@ -62,7 +62,7 @@ bracketBody = bs
getPreviousAdjacentEdge(bs.tags.edge2), getPreviousAdjacentEdge(bs.tags.edge2),
getPreviousAdjacentEdge(bs.tags.edge3), getPreviousAdjacentEdge(bs.tags.edge3),
getPreviousAdjacentEdge(bs.tags.edge6) getPreviousAdjacentEdge(bs.tags.edge6)
] ],
) )
// define the tab plane // define the tab plane
@ -87,7 +87,7 @@ tabsR = startSketchOn(tabPlane)
width / 2 + thk + tabWidth / 2, width / 2 + thk + tabWidth / 2,
length / 2 + thk - (tabLength / (3 / 2)) length / 2 + thk - (tabLength / (3 / 2))
], ],
radius = holeDiam / 2 radius = holeDiam / 2,
), %) ), %)
|> extrude(length = -tabThk) |> extrude(length = -tabThk)
|> fillet( |> fillet(
@ -95,13 +95,9 @@ tabsR = startSketchOn(tabPlane)
tags = [ tags = [
getNextAdjacentEdge(edge11), getNextAdjacentEdge(edge11),
getNextAdjacentEdge(edge12) getNextAdjacentEdge(edge12)
] ],
)
|> patternLinear3d(
axis = [0, -1, 0],
instances = 2,
distance = length + 2 * thk - (tabLength * 4 / 3)
) )
|> patternLinear3d(axis = [0, -1, 0], instances = 2, distance = length + 2 * thk - (tabLength * 4 / 3))
// build the tabs of the mounting bracket (left side) // build the tabs of the mounting bracket (left side)
tabsL = startSketchOn(tabPlane) tabsL = startSketchOn(tabPlane)
@ -115,7 +111,7 @@ tabsL = startSketchOn(tabPlane)
-width / 2 - thk - (tabWidth / 2), -width / 2 - thk - (tabWidth / 2),
length / 2 + thk - (tabLength / (3 / 2)) length / 2 + thk - (tabLength / (3 / 2))
], ],
radius = holeDiam / 2 radius = holeDiam / 2,
), %) ), %)
|> extrude(length = -tabThk) |> extrude(length = -tabThk)
|> fillet( |> fillet(
@ -123,13 +119,9 @@ tabsL = startSketchOn(tabPlane)
tags = [ tags = [
getNextAdjacentEdge(edge21), getNextAdjacentEdge(edge21),
getNextAdjacentEdge(edge22) getNextAdjacentEdge(edge22)
] ],
)
|> patternLinear3d(
axis = [0, -1, 0],
instances = 2,
distance = length + 2 * thk - (tabLength * 4 / 3)
) )
|> patternLinear3d(axis = [0, -1, 0], instances = 2, distance = length + 2 * thk - (tabLength * 4 / 3))
// define a plane for retention bumps // define a plane for retention bumps
retPlane = { retPlane = {

View File

@ -44,7 +44,7 @@ fn slot(sketch1, start, end, width) {
} }
// create a sketch on the "XY" plane // create a sketch on the "XY" plane
sketch000 = startSketchOn('XY') sketch000 = startSketchOn(XY)
// create a profile of the flipper // create a profile of the flipper
flipperProfile = startProfileAt([-flipperLength, -32.0], sketch000) flipperProfile = startProfileAt([-flipperLength, -32.0], sketch000)
@ -83,11 +83,11 @@ fillet(
tags = [ tags = [
getNextAdjacentEdge(backEdge), getNextAdjacentEdge(backEdge),
getPreviousAdjacentEdge(backEdge) getPreviousAdjacentEdge(backEdge)
] ],
) )
// create a sketch on the "XZ" plane offset by half the thickness // create a sketch on the "XZ" plane offset by half the thickness
sketch001 = startSketchOn(offsetPlane("XZ", offset = -handleWidth / 2)) sketch001 = startSketchOn(offsetPlane(XZ, offset = -handleWidth / 2))
// create a profile of the spatula handle // create a profile of the spatula handle
handleProfile = startProfileAt([0.0, flipperThickness], sketch001) handleProfile = startProfileAt([0.0, flipperThickness], sketch001)
@ -109,7 +109,7 @@ fillet(
tags = [ tags = [
getNextAdjacentEdge(handleBottomEdge), getNextAdjacentEdge(handleBottomEdge),
getNextAdjacentEdge(handleTopEdge) getNextAdjacentEdge(handleTopEdge)
] ],
) )
// define a plane which is at the end of the handle // define a plane which is at the end of the handle
@ -163,4 +163,4 @@ sketch003 = startSketchOn(grip, gripEdgeTop)
gripHoleProfile = slot(sketch003, [0, 200], [0, 210], gripSlotWidth) gripHoleProfile = slot(sketch003, [0, 200], [0, 210], gripSlotWidth)
// cut a hole in the grip // cut a hole in the grip
extrude(gripHoleProfile, length = -gripWidth-20) extrude(gripHoleProfile, length = -gripWidth - 20)

View File

@ -10,7 +10,7 @@ carafeHeight = 7.32
handleThickness = 0.65 handleThickness = 0.65
// Upper ring of the metal structure // Upper ring of the metal structure
sketch001 = startSketchOn('XZ') sketch001 = startSketchOn(XZ)
|> startProfileAt([carafeDiameter / 2, 5.7], %) |> startProfileAt([carafeDiameter / 2, 5.7], %)
|> angledLine([0, 0.1], %, $rectangleSegmentA001) |> angledLine([0, 0.1], %, $rectangleSegmentA001)
|> angledLine([ |> angledLine([
@ -91,15 +91,12 @@ sketch002 = startSketchOn(plane001)
center = [0, 0, 0], center = [0, 0, 0],
instances = 4, instances = 4,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
// Cross plate // Cross plate
sketch003 = startSketchOn(offsetPlane('XY', offset = 1)) sketch003 = startSketchOn(offsetPlane(XY, offset = 1))
|> circle( |> circle(center = [0, 0], radius = carafeDiameter / 2 - 0.15)
center = [0, 0],
radius = carafeDiameter / 2 - 0.15
)
extrude001 = extrude(sketch003, length = 0.050) extrude001 = extrude(sketch003, length = 0.050)
@ -117,13 +114,13 @@ sketch004 = startSketchOn(extrude001, 'END')
center = [0, 0], center = [0, 0],
instances = 3, instances = 3,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude002 = extrude(sketch004, length = -0.050) extrude002 = extrude(sketch004, length = -0.050)
// Filter screen // Filter screen
sketch005 = startSketchOn('XZ') sketch005 = startSketchOn(XZ)
|> startProfileAt([0.15, 1.11], %) |> startProfileAt([0.15, 1.11], %)
|> xLine(endAbsolute = carafeDiameter / 2 - 0.2) |> xLine(endAbsolute = carafeDiameter / 2 - 0.2)
|> angledLineToX({ |> angledLineToX({
@ -138,7 +135,7 @@ sketch005 = startSketchOn('XZ')
|> revolve(axis = 'y') |> revolve(axis = 'y')
// Plunger and stem // Plunger and stem
sketch006 = startSketchOn('XZ') sketch006 = startSketchOn(XZ)
|> startProfileAt([0.1, 1], %) |> startProfileAt([0.1, 1], %)
|> line(end = [0.1, 0]) |> line(end = [0.1, 0])
|> angledLineToX({ angle = 10, to = 0.05 }, %) |> angledLineToX({ angle = 10, to = 0.05 }, %)
@ -151,11 +148,8 @@ sketch006 = startSketchOn('XZ')
|> revolve(axis = 'y') |> revolve(axis = 'y')
// Spiral plate // Spiral plate
sketch007 = startSketchOn(offsetPlane('XY', offset = 1.12)) sketch007 = startSketchOn(offsetPlane(XY, offset = 1.12))
|> circle( |> circle(center = [0, 0], radius = carafeDiameter / 2 - 0.24)
center = [0, 0],
radius = carafeDiameter / 2 - 0.24
)
|> hole(circle(center = [0, 0], radius = .15), %) |> hole(circle(center = [0, 0], radius = .15), %)
extrude003 = extrude(sketch007, length = 0.050) extrude003 = extrude(sketch007, length = 0.050)
@ -167,7 +161,7 @@ sketch008 = startSketchOn(extrude003, 'END')
center = [0, 0], center = [0, 0],
instances = 8, instances = 8,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude004 = extrude(sketch008, length = -0.050) extrude004 = extrude(sketch008, length = -0.050)
@ -179,24 +173,21 @@ sketch009 = startSketchOn(extrude003, 'END')
center = [0, 0], center = [0, 0],
instances = 4, instances = 4,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude005 = extrude(sketch009, length = -0.050) extrude005 = extrude(sketch009, length = -0.050)
// Extrude a glass carafe body // Extrude a glass carafe body
sketch010 = startSketchOn("XY") sketch010 = startSketchOn(XY)
|> circle( |> circle(center = [0, 0], radius = carafeDiameter / 2)
center = [0, 0],
radius = carafeDiameter / 2
)
// Perform a shell operation to hollow the carafe body with the top face removed // Perform a shell operation to hollow the carafe body with the top face removed
extrude006 = extrude(sketch010, length = carafeHeight) extrude006 = extrude(sketch010, length = carafeHeight)
|> shell(faces = ["end"], thickness = .07) |> shell(faces = ["end"], thickness = .07)
// Draw and revolve the lid // Draw and revolve the lid
sketch011 = startSketchOn('XZ') sketch011 = startSketchOn(XZ)
|> startProfileAt([0.2, carafeHeight - 0.7], %) |> startProfileAt([0.2, carafeHeight - 0.7], %)
|> xLine(length = carafeDiameter / 2 - 0.3) |> xLine(length = carafeDiameter / 2 - 0.3)
|> yLine(length = 0.7) |> yLine(length = 0.7)
@ -213,7 +204,7 @@ sketch011 = startSketchOn('XZ')
|> revolve(axis = 'y') |> revolve(axis = 'y')
// Draw and extrude handle // Draw and extrude handle
sketch012 = startSketchOn(offsetPlane('XZ', offset = handleThickness / 2)) sketch012 = startSketchOn(offsetPlane(XZ, offset = handleThickness / 2))
|> startProfileAt([2.3, 6.4], %) |> startProfileAt([2.3, 6.4], %)
|> line(end = [0.56, 0]) |> line(end = [0.56, 0])
|> tangentialArcTo([4.1, 5.26], %) |> tangentialArcTo([4.1, 5.26], %)

View File

@ -12,7 +12,7 @@ height = 12
minHeight = 10.875 minHeight = 10.875
// Create the body of the rack // Create the body of the rack
rackBody = startSketchOn('XY') rackBody = startSketchOn(XY)
|> startProfileAt([-length / 2, 0], %) |> startProfileAt([-length / 2, 0], %)
|> line(end = [length, 0]) |> line(end = [length, 0])
|> line(end = [0, minHeight]) |> line(end = [0, minHeight])
@ -22,7 +22,7 @@ rackBody = startSketchOn('XY')
// Create a function for sketch of a single tooth // Create a function for sketch of a single tooth
fn tooth() { fn tooth() {
toothSketch = startSketchOn('XY') toothSketch = startSketchOn(XY)
|> startProfileAt([-length / 2 + 0.567672, minHeight], %) |> startProfileAt([-length / 2 + 0.567672, minHeight], %)
|> tangentialArcToRelative([0.157636, 0.110378], %) |> tangentialArcToRelative([0.157636, 0.110378], %)
|> line(end = [0.329118, 0.904244]) |> line(end = [0.329118, 0.904244])
@ -38,14 +38,10 @@ fn tooth() {
// Pattern the single tooth over the length of the rack body // Pattern the single tooth over the length of the rack body
teeth = tooth() teeth = tooth()
|> patternLinear3d( |> patternLinear3d(axis = [10, 0, 0], distance = 1.570796, instances = 63)
axis = [10, 0, 0],
distance = 1.570796,
instances = 63
)
// Sketch and extrude the first end cap. This is a partial tooth // Sketch and extrude the first end cap. This is a partial tooth
endCapTooth = startSketchOn('XY') endCapTooth = startSketchOn(XY)
|> startProfileAt([-length / 2, 11.849525], %) |> startProfileAt([-length / 2, 11.849525], %)
|> line(end = [0.314524, -0.864147]) |> line(end = [0.314524, -0.864147])
|> tangentialArcToRelative([0.157636, -0.110378], %) |> tangentialArcToRelative([0.157636, -0.110378], %)
@ -54,7 +50,7 @@ endCapTooth = startSketchOn('XY')
|> extrude(length = width) |> extrude(length = width)
// Sketch and extrude the second end cap. This is a partial tooth // Sketch and extrude the second end cap. This is a partial tooth
endCapTooth2 = startSketchOn('XY') endCapTooth2 = startSketchOn(XY)
|> startProfileAt([length / 2, 11.849525], %) |> startProfileAt([length / 2, 11.849525], %)
|> line(end = [-0.314524, -0.864147]) |> line(end = [-0.314524, -0.864147])
|> tangentialArcToRelative([-0.157636, -0.110378], %) |> tangentialArcToRelative([-0.157636, -0.110378], %)

View File

@ -17,35 +17,32 @@ gearHeight = 3
// Interpolate points along the involute curve // Interpolate points along the involute curve
cmo = 101 cmo = 101
rs = map([0..cmo], fn (i) { rs = map([0..cmo], fn(i) {
return baseDiameter / 2 + i / cmo * (tipDiameter - baseDiameter) / 2 return baseDiameter / 2 + i / cmo * (tipDiameter - baseDiameter) / 2
}) })
// Calculate operating pressure angle // Calculate operating pressure angle
angles = map(rs, fn (r) { angles = map(rs, fn(r) {
return toDegrees( acos(baseDiameter / 2 / r)) return toDegrees( acos(baseDiameter / 2 / r))
}) })
// Calculate the involute function // Calculate the involute function
invas = map(angles, fn (a) { invas = map(angles, fn(a) {
return tan(toRadians(a)) - toRadians(a) return tan(toRadians(a)) - toRadians(a)
}) })
// Map the involute curve // Map the involute curve
xs = map([0..cmo], fn (i) { xs = map([0..cmo], fn(i) {
return rs[i] * cos(invas[i]) return rs[i] * cos(invas[i])
}) })
ys = map([0..cmo], fn (i) { ys = map([0..cmo], fn(i) {
return rs[i] * sin(invas[i]) return rs[i] * sin(invas[i])
}) })
// Extrude the gear body // Extrude the gear body
body = startSketchOn('XY') body = startSketchOn(XY)
|> circle( |> circle(center = [0, 0], radius = baseDiameter / 2)
center = [0, 0],
radius = baseDiameter / 2
)
|> extrude(length = gearHeight) |> extrude(length = gearHeight)
toothAngle = 360 / nTeeth / 1.5 toothAngle = 360 / nTeeth / 1.5
@ -63,7 +60,7 @@ fn rightInvolute(i, sg) {
} }
// Draw gear teeth // Draw gear teeth
start = startSketchOn('XY') start = startSketchOn(XY)
|> startProfileAt([xs[101], ys[101]], %) |> startProfileAt([xs[101], ys[101]], %)
teeth = reduce([0..100], start, leftInvolute) teeth = reduce([0..100], start, leftInvolute)
|> arc({ |> arc({
@ -79,7 +76,7 @@ teeth = reduce([0..100], start, leftInvolute)
center = [0, 0, 0], center = [0, 0, 0],
instances = nTeeth, instances = nTeeth,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
// Define the constants of the keyway and the bore hole // Define the constants of the keyway and the bore hole

View File

@ -34,7 +34,7 @@ fn face(plane) {
} }
// extrude a single side of the bin // extrude a single side of the bin
singleSide = extrude(face(offsetPlane("YZ", offset = cornerRadius)), length = binLength - (cornerRadius * 2), ) singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern // create the other sides of the bin by using a circular pattern
sides = patternCircular3d( sides = patternCircular3d(
@ -43,7 +43,7 @@ sides = patternCircular3d(
axis = [0, 0, 1], axis = [0, 0, 1],
center = [binLength / 2, binLength / 2, 0], center = [binLength / 2, binLength / 2, 0],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
// define an axis axis000 // define an axis axis000
@ -55,7 +55,7 @@ axis000 = {
} }
// create a single corner of the bin // create a single corner of the bin
singleCorner = revolve(face(offsetPlane("YZ", offset = cornerRadius)), angle = -90, axis = axis000) singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius)), angle = -90, axis = axis000)
// create the corners of the bin // create the corners of the bin
corners = patternCircular3d( corners = patternCircular3d(
@ -64,7 +64,7 @@ corners = patternCircular3d(
axis = [0, 0, 1], axis = [0, 0, 1],
center = [binLength / 2, binLength / 2, 0], center = [binLength / 2, binLength / 2, 0],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
// create the baseplate by patterning sides // create the baseplate by patterning sides
@ -72,26 +72,18 @@ basePlateSides = patternLinear3d(
sides, sides,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength distance = binLength,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// create the corners of the baseplate by patterning the corners // create the corners of the baseplate by patterning the corners
basePlateCorners = patternLinear3d( basePlateCorners = patternLinear3d(
corners, corners,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength distance = binLength,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// create the center cutout for the magnet profile // create the center cutout for the magnet profile
fn magnetCenterCutout(plane) { fn magnetCenterCutout(plane) {
@ -149,20 +141,17 @@ fn magnetBase(plane) {
} }
// create sketch profile sketch000Profile002 // create sketch profile sketch000Profile002
magnetsSketch = startSketchOn('XY') magnetsSketch = startSketchOn(XY)
|> circle( |> circle(center = [cornerRadius * 2, cornerRadius * 2], radius = magOuterDiam / 2)
center = [cornerRadius * 2, cornerRadius * 2],
radius = magOuterDiam / 2
)
|> patternCircular2d( |> patternCircular2d(
center = [binLength / 2, binLength / 2], center = [binLength / 2, binLength / 2],
instances = 4, instances = 4,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
// create a profile with holes for the magnets // create a profile with holes for the magnets
magnetProfile = magnetBase("XY") magnetProfile = magnetBase(XY)
|> hole(magnetsSketch, %) |> hole(magnetsSketch, %)
// create an extrusion of the magnet cutout with holes // create an extrusion of the magnet cutout with holes
@ -177,11 +166,11 @@ magnetHolesExtrudeFillets = fillet(
getPreviousAdjacentEdge(magnetHolesExtrude.sketch.tags.line001), getPreviousAdjacentEdge(magnetHolesExtrude.sketch.tags.line001),
getNextAdjacentEdge(magnetHolesExtrude.sketch.tags.line003), getNextAdjacentEdge(magnetHolesExtrude.sketch.tags.line003),
getPreviousAdjacentEdge(magnetHolesExtrude.sketch.tags.line003) getPreviousAdjacentEdge(magnetHolesExtrude.sketch.tags.line003)
] ],
) )
// create a profile without the holes for the magnets // create a profile without the holes for the magnets
magnetProfileNoMagnets = magnetBase(offsetPlane("XY", offset = -magDepth)) magnetProfileNoMagnets = magnetBase(offsetPlane(XY, offset = -magDepth))
// create an extrusion of the magnet cutout without holes // create an extrusion of the magnet cutout without holes
magnetCutoutExtrude = extrude(magnetProfileNoMagnets, length = -magDepth) magnetCutoutExtrude = extrude(magnetProfileNoMagnets, length = -magDepth)
@ -195,7 +184,7 @@ magnetCutoutExtrudeFillets = fillet(
getPreviousAdjacentEdge(magnetCutoutExtrude.sketch.tags.line001), getPreviousAdjacentEdge(magnetCutoutExtrude.sketch.tags.line001),
getNextAdjacentEdge(magnetCutoutExtrude.sketch.tags.line003), getNextAdjacentEdge(magnetCutoutExtrude.sketch.tags.line003),
getPreviousAdjacentEdge(magnetCutoutExtrude.sketch.tags.line003) getPreviousAdjacentEdge(magnetCutoutExtrude.sketch.tags.line003)
] ],
) )
// pattern the magnet cutouts with holes // pattern the magnet cutouts with holes
@ -203,23 +192,15 @@ patternLinear3d(
magnetHolesExtrudeFillets, magnetHolesExtrudeFillets,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength distance = binLength,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// pattern the magnet cutouts without holes // pattern the magnet cutouts without holes
patternLinear3d( patternLinear3d(
magnetCutoutExtrudeFillets, magnetCutoutExtrudeFillets,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength distance = binLength,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)

View File

@ -31,7 +31,7 @@ fn face(plane) {
} }
// extrude a single side of the bin // extrude a single side of the bin
singleSide = extrude(face(offsetPlane("YZ", offset = cornerRadius)), length = binLength - (cornerRadius * 2)) singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern // create the other sides of the bin by using a circular pattern
sides = patternCircular3d( sides = patternCircular3d(
@ -40,7 +40,7 @@ sides = patternCircular3d(
axis = [0, 0, 1], axis = [0, 0, 1],
center = [binLength / 2, binLength / 2, 0], center = [binLength / 2, binLength / 2, 0],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
// define an axis axis000 // define an axis axis000
@ -52,7 +52,7 @@ axis000 = {
} }
// create a single corner of the bin // create a single corner of the bin
singleCorner = revolve(face(offsetPlane("YZ", offset = cornerRadius)), angle = -90, axis = axis000) singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius)), angle = -90, axis = axis000)
// create the corners of the bin // create the corners of the bin
corners = patternCircular3d( corners = patternCircular3d(
@ -61,7 +61,7 @@ corners = patternCircular3d(
axis = [0, 0, 1], axis = [0, 0, 1],
center = [binLength / 2, binLength / 2, 0], center = [binLength / 2, binLength / 2, 0],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
// create the baseplate by patterning sides // create the baseplate by patterning sides
@ -69,23 +69,15 @@ basePlateSides = patternLinear3d(
sides, sides,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength distance = binLength,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// create the corners of the baseplate by patterning the corners // create the corners of the baseplate by patterning the corners
basePlateCorners = patternLinear3d( basePlateCorners = patternLinear3d(
corners, corners,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength distance = binLength,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)

View File

@ -47,7 +47,7 @@ fn face(plane) {
} }
// extrude a single side of the bin // extrude a single side of the bin
singleSide = extrude(face(offsetPlane("YZ", offset = cornerRadius + binTol)), length = binLength - (cornerRadius * 2)) singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius + binTol)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern // create the other sides of the bin by using a circular pattern
sides = patternCircular3d( sides = patternCircular3d(
@ -60,7 +60,7 @@ sides = patternCircular3d(
0 0
], ],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
// define an axis axis000 // define an axis axis000
@ -75,7 +75,7 @@ axis000 = {
} }
// create a single corner of the bin // create a single corner of the bin
singleCorner = revolve(face(offsetPlane("YZ", offset = cornerRadius + binTol)), angle = -90, axis = axis000) singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius + binTol)), angle = -90, axis = axis000)
// create the corners of the bin // create the corners of the bin
corners = patternCircular3d( corners = patternCircular3d(
@ -88,10 +88,10 @@ corners = patternCircular3d(
0 0
], ],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
singleBinFill = startSketchOn("XY") singleBinFill = startSketchOn(XY)
|> startProfileAt([ |> startProfileAt([
binBaseLength + binTol, binBaseLength + binTol,
binBaseLength + binTol binBaseLength + binTol
@ -108,7 +108,7 @@ singleBinFill = startSketchOn("XY")
getPreviousAdjacentEdge(line000), getPreviousAdjacentEdge(line000),
getNextAdjacentEdge(line002), getNextAdjacentEdge(line002),
getPreviousAdjacentEdge(line002) getPreviousAdjacentEdge(line002)
] ],
) )
magCutout000 = startSketchOn(singleBinFill, "start") magCutout000 = startSketchOn(singleBinFill, "start")
@ -117,7 +117,7 @@ magCutout000 = startSketchOn(singleBinFill, "start")
-magOffset - binBaseLength - binTol, -magOffset - binBaseLength - binTol,
magOffset + binBaseLength + binTol magOffset + binBaseLength + binTol
], ],
radius = magOuterDiam / 2 radius = magOuterDiam / 2,
) )
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
@ -126,7 +126,7 @@ magCutout000 = startSketchOn(singleBinFill, "start")
(binLength + 2 * binTol) / 2 (binLength + 2 * binTol) / 2
], ],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
|> extrude(length = -magDepth) |> extrude(length = -magDepth)
@ -135,42 +135,30 @@ binSides = patternLinear3d(
sides, sides,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength + binTol * 2 distance = binLength + binTol * 2,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength + binTol * 2
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the corners of the baseplate by patterning the corners // create the corners of the baseplate by patterning the corners
binCorners = patternLinear3d( binCorners = patternLinear3d(
corners, corners,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength + binTol * 2 distance = binLength + binTol * 2,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength + binTol * 2
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the fill of the bin by patterning the corners // create the fill of the bin by patterning the corners
binFill = patternLinear3d( binFill = patternLinear3d(
singleBinFill, singleBinFill,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength + binTol * 2 distance = binLength + binTol * 2,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength + binTol * 2
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// //
binTop = startSketchOn(offsetPlane("XY", offset = height)) binTop = startSketchOn(offsetPlane(XY, offset = height))
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010) |> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010)
|> yLine(length = (binLength + 2 * binTol) * countBinLength, tag = $line011) |> yLine(length = (binLength + 2 * binTol) * countBinLength, tag = $line011)
@ -184,7 +172,7 @@ binTop = startSketchOn(offsetPlane("XY", offset = height))
getPreviousAdjacentEdge(line010), getPreviousAdjacentEdge(line010),
getNextAdjacentEdge(line012), getNextAdjacentEdge(line012),
getPreviousAdjacentEdge(line012) getPreviousAdjacentEdge(line012)
] ],
) )
|> shell(faces = ["end"], thickness = binThk) |> shell(faces = ["end"], thickness = binThk)
@ -265,7 +253,7 @@ lipLengths = patternCircular3d(
0 0
], ],
instances = 2, instances = 2,
rotateDuplicates = true rotateDuplicates = true,
) )
// create the other sides of the lips by using a circular pattern // create the other sides of the lips by using a circular pattern
@ -279,7 +267,7 @@ lipWidths = patternCircular3d(
0 0
], ],
instances = 2, instances = 2,
rotateDuplicates = true rotateDuplicates = true,
) )
// define an axis axis000 // define an axis axis000
@ -307,7 +295,7 @@ lipCorners000 = patternCircular3d(
0 0
], ],
instances = 2, instances = 2,
rotateDuplicates = true rotateDuplicates = true,
) )
// create the corners of the bin // create the corners of the bin
@ -321,5 +309,5 @@ lipCorners001 = patternCircular3d(
0 0
], ],
instances = 2, instances = 2,
rotateDuplicates = true rotateDuplicates = true,
) )

View File

@ -40,7 +40,7 @@ fn face(plane) {
} }
// extrude a single side of the bin // extrude a single side of the bin
singleSide = extrude(face(offsetPlane("YZ", offset = cornerRadius + binTol)), length = binLength - (cornerRadius * 2), ) singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius + binTol)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern // create the other sides of the bin by using a circular pattern
sides = patternCircular3d( sides = patternCircular3d(
@ -53,7 +53,7 @@ sides = patternCircular3d(
0 0
], ],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
// define an axis axis000 // define an axis axis000
@ -68,7 +68,7 @@ axis000 = {
} }
// create a single corner of the bin // create a single corner of the bin
singleCorner = revolve(face(offsetPlane("YZ", offset = cornerRadius + binTol)), angle = -90, axis = axis000) singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius + binTol)), angle = -90, axis = axis000)
// create the corners of the bin // create the corners of the bin
corners = patternCircular3d( corners = patternCircular3d(
@ -81,10 +81,10 @@ corners = patternCircular3d(
0 0
], ],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
singleBinFill = startSketchOn("XY") singleBinFill = startSketchOn(XY)
|> startProfileAt([ |> startProfileAt([
binBaseLength + binTol, binBaseLength + binTol,
binBaseLength + binTol binBaseLength + binTol
@ -101,7 +101,7 @@ singleBinFill = startSketchOn("XY")
getPreviousAdjacentEdge(line000), getPreviousAdjacentEdge(line000),
getNextAdjacentEdge(line002), getNextAdjacentEdge(line002),
getPreviousAdjacentEdge(line002) getPreviousAdjacentEdge(line002)
] ],
) )
magCutout000 = startSketchOn(singleBinFill, "start") magCutout000 = startSketchOn(singleBinFill, "start")
@ -110,7 +110,7 @@ magCutout000 = startSketchOn(singleBinFill, "start")
-magOffset - binBaseLength - binTol, -magOffset - binBaseLength - binTol,
magOffset + binBaseLength + binTol magOffset + binBaseLength + binTol
], ],
radius = magOuterDiam / 2 radius = magOuterDiam / 2,
) )
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
@ -119,7 +119,7 @@ magCutout000 = startSketchOn(singleBinFill, "start")
(binLength + 2 * binTol) / 2 (binLength + 2 * binTol) / 2
], ],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
|> extrude(length = -magDepth) |> extrude(length = -magDepth)
@ -128,42 +128,30 @@ binSides = patternLinear3d(
sides, sides,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength + binTol * 2 distance = binLength + binTol * 2,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength + binTol * 2
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the corners of the baseplate by patterning the corners // create the corners of the baseplate by patterning the corners
binCorners = patternLinear3d( binCorners = patternLinear3d(
corners, corners,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength + binTol * 2 distance = binLength + binTol * 2,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength + binTol * 2
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the fill of the bin by patterning the corners // create the fill of the bin by patterning the corners
binFill = patternLinear3d( binFill = patternLinear3d(
singleBinFill, singleBinFill,
axis = [1.0, 0.0, 0.0], axis = [1.0, 0.0, 0.0],
instances = countBinWidth, instances = countBinWidth,
distance = binLength + binTol * 2 distance = binLength + binTol * 2,
)
|> patternLinear3d(
axis = [0.0, 1.0, 0.0],
instances = countBinLength,
distance = binLength + binTol * 2
) )
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the top of the bin // create the top of the bin
binTop = startSketchOn(offsetPlane("XY", offset = height)) binTop = startSketchOn(offsetPlane(XY, offset = height))
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010) |> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010)
|> yLine(length = (binLength + 2 * binTol) * countBinLength, tag = $line011) |> yLine(length = (binLength + 2 * binTol) * countBinLength, tag = $line011)
@ -177,6 +165,6 @@ binTop = startSketchOn(offsetPlane("XY", offset = height))
getPreviousAdjacentEdge(line010), getPreviousAdjacentEdge(line010),
getNextAdjacentEdge(line012), getNextAdjacentEdge(line012),
getPreviousAdjacentEdge(line012) getPreviousAdjacentEdge(line012)
] ],
) )
|> shell(faces = ["end"], thickness = binThk) |> shell(faces = ["end"], thickness = binThk)

View File

@ -11,7 +11,7 @@ diameter = 0.3125
// Define a function for the hex nut // Define a function for the hex nut
fn hexNut(start, thk, innerDia) { fn hexNut(start, thk, innerDia) {
hexNutSketch = startSketchOn('-XZ') hexNutSketch = startSketchOn(-XZ)
|> startProfileAt([start[0] + innerDia, start[1]], %) |> startProfileAt([start[0] + innerDia, start[1]], %)
|> angledLine({ angle = 240, length = innerDia }, %) |> angledLine({ angle = 240, length = innerDia }, %)
|> angledLine({ angle = 180, length = innerDia }, %) |> angledLine({ angle = 180, length = innerDia }, %)
@ -19,10 +19,7 @@ fn hexNut(start, thk, innerDia) {
|> angledLine({ angle = 60, length = innerDia }, %) |> angledLine({ angle = 60, length = innerDia }, %)
|> angledLine({ angle = 0, length = innerDia * .90 }, %) |> angledLine({ angle = 0, length = innerDia * .90 }, %)
|> close() |> close()
|> hole(circle( |> hole(circle(center = [start[0], start[1]], radius = innerDia / 2), %)
center = [start[0], start[1]],
radius = innerDia / 2
), %)
|> extrude(length = thk) |> extrude(length = thk)
return hexNutSketch return hexNutSketch
} }

View File

@ -19,7 +19,7 @@ row5 = row4 + keyHeight + spacing
row6 = row5 + keyHeight + spacing row6 = row5 + keyHeight + spacing
// Sketch the side profile of the keyboard base and extrude to total width // Sketch the side profile of the keyboard base and extrude to total width
sketch001 = startSketchOn('YZ') sketch001 = startSketchOn(YZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [-0.14, 0.68], tag = $seg01) |> line(end = [-0.14, 0.68], tag = $seg01)
|> angledLine([7, row6 + 3 * spacing + keyHeight], %, $seg02) |> angledLine([7, row6 + 3 * spacing + keyHeight], %, $seg02)
@ -89,7 +89,7 @@ fn keyFn(originStart, keyWidth, keyHeight, repeats, color) {
|> close() |> close()
|> extrude(length = keyDepth) |> extrude(length = keyDepth)
|> appearance(color = color) |> appearance(color = color)
// Repeat key when desired. This will default to zero // Repeat key when desired. This will default to zero
|> patternLinear3d( |> patternLinear3d(
%, %,
instances = repeats + 1, instances = repeats + 1,

View File

@ -20,7 +20,7 @@ kitBodyWidth = 26
kitBodyHeight = 25 kitBodyHeight = 25
kitBodyDepth = 18 kitBodyDepth = 18
kitBody = startSketchOn('XZ') kitBody = startSketchOn(XZ)
|> startProfileAt([-kitBodyWidth / 2, kitBodyElevation], %) |> startProfileAt([-kitBodyWidth / 2, kitBodyElevation], %)
|> line(end = [0, kitBodyHeight]) |> line(end = [0, kitBodyHeight])
|> line(end = [kitBodyWidth, 0], tag = $seg01) |> line(end = [kitBodyWidth, 0], tag = $seg01)
@ -159,7 +159,7 @@ kitShoeHeight = 3
fn kitLeg(offsetFront, offsetSide) { fn kitLeg(offsetFront, offsetSide) {
kitShoeOffsetFront = kitShoeLength / 2 - (kitBodyDepth / 2) - offsetFront kitShoeOffsetFront = kitShoeLength / 2 - (kitBodyDepth / 2) - offsetFront
kitFootPrint = startSketchOn('XY') kitFootPrint = startSketchOn(XY)
|> startProfileAt([offsetSide, kitShoeOffsetFront], %) |> startProfileAt([offsetSide, kitShoeOffsetFront], %)
|> line(end = [kitShoeWidth, 0]) |> line(end = [kitShoeWidth, 0])
|> line(end = [0, -kitShoeLength]) |> line(end = [0, -kitShoeLength])

View File

@ -26,7 +26,7 @@ assertGreaterThan(lbumps, 1, "lbumps must be greater than 1")
assertGreaterThan(wbumps, 1, "wbumps must be greater than 1") assertGreaterThan(wbumps, 1, "wbumps must be greater than 1")
// Make the base // Make the base
base = startSketchOn('XY') base = startSketchOn(XY)
|> startProfileAt([-totalWidth / 2, -totalLength / 2], %) |> startProfileAt([-totalWidth / 2, -totalLength / 2], %)
|> line(end = [totalWidth, 0]) |> line(end = [totalWidth, 0])
|> line(end = [0, totalLength]) |> line(end = [0, totalLength])
@ -53,18 +53,10 @@ peg = startSketchOn(base, 'end')
-(pitch * (wbumps - 1) / 2), -(pitch * (wbumps - 1) / 2),
-(pitch * (lbumps - 1) / 2) -(pitch * (lbumps - 1) / 2)
], ],
radius = bumpDiam / 2 radius = bumpDiam / 2,
)
|> patternLinear2d(
axis = [1, 0],
instances = wbumps,
distance = pitch
)
|> patternLinear2d(
axis = [0, 1],
instances = lbumps,
distance = pitch
) )
|> patternLinear2d(axis = [1, 0], instances = wbumps, distance = pitch)
|> patternLinear2d(axis = [0, 1], instances = lbumps, distance = pitch)
|> extrude(length = bumpHeight) |> extrude(length = bumpHeight)
// Create the pegs on the bottom of the base // Create the pegs on the bottom of the base
@ -74,16 +66,8 @@ tubePattern = startSketchOn(shellExtrude, 'start')
-(pitch * (wbumps - 1) / 2 - (pitch / 2)), -(pitch * (wbumps - 1) / 2 - (pitch / 2)),
-(pitch * (lbumps - 1) / 2 - (pitch / 2)) -(pitch * (lbumps - 1) / 2 - (pitch / 2))
], ],
radius = bumpDiam / 2 radius = bumpDiam / 2,
)
|> patternLinear2d(
axis = [1, 0],
instances = wbumps - 1,
distance = pitch
)
|> patternLinear2d(
axis = [0, 1],
instances = lbumps - 1,
distance = pitch
) )
|> patternLinear2d(axis = [1, 0], instances = wbumps - 1, distance = pitch)
|> patternLinear2d(axis = [0, 1], instances = lbumps - 1, distance = pitch)
|> extrude(length = bumpHeight) |> extrude(length = bumpHeight)

View File

@ -13,7 +13,7 @@ centerHoleDiameter = 2
// Create a function that defines the body width and length of the mounting plate. Tag the corners so they can be passed through the fillet function. // Create a function that defines the body width and length of the mounting plate. Tag the corners so they can be passed through the fillet function.
fn rectShape(pos, w, l) { fn rectShape(pos, w, l) {
rr = startSketchOn('XY') rr = startSketchOn(XY)
|> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %) |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
|> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge1) |> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge1)
|> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge2) |> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge2)
@ -34,33 +34,30 @@ part = rs
-plateWidth / 2 + holeIndex, -plateWidth / 2 + holeIndex,
plateLength / 2 - holeIndex plateLength / 2 - holeIndex
], ],
radius = holeRadius radius = holeRadius,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
plateWidth / 2 - holeIndex, plateWidth / 2 - holeIndex,
plateLength / 2 - holeIndex plateLength / 2 - holeIndex
], ],
radius = holeRadius radius = holeRadius,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
-plateWidth / 2 + holeIndex, -plateWidth / 2 + holeIndex,
-plateLength / 2 + holeIndex -plateLength / 2 + holeIndex
], ],
radius = holeRadius radius = holeRadius,
), %) ), %)
|> hole(circle( |> hole(circle(
center = [ center = [
plateWidth / 2 - holeIndex, plateWidth / 2 - holeIndex,
-plateLength / 2 + holeIndex -plateLength / 2 + holeIndex
], ],
radius = holeRadius radius = holeRadius,
), %)
|> hole(circle(
center = [0, 0],
radius = centerHoleDiameter
), %) ), %)
|> hole(circle(center = [0, 0], radius = centerHoleDiameter), %)
|> extrude(length = plateThickness) |> extrude(length = plateThickness)
|> fillet( |> fillet(
radius = filletRadius, radius = filletRadius,
@ -69,5 +66,5 @@ part = rs
getPreviousAdjacentEdge(rs.tags.edge2), getPreviousAdjacentEdge(rs.tags.edge2),
getPreviousAdjacentEdge(rs.tags.edge3), getPreviousAdjacentEdge(rs.tags.edge3),
getPreviousAdjacentEdge(rs.tags.edge4) getPreviousAdjacentEdge(rs.tags.edge4)
] ],
) )

View File

@ -28,37 +28,37 @@ export axisJ3CArmThickness = 2.5
// Planes // Planes
export plane001 = { export plane001 = {
plane = { plane = {
origin = [0.0, 0.0, baseHeight - 1.5 + 0.1], origin = [0.0, 0.0, baseHeight - 1.5 + 0.1],
xAxis = [1.0, 0.0, 0.0], xAxis = [1.0, 0.0, 0.0],
yAxis = [0.0, 1.0, 0.0], yAxis = [0.0, 1.0, 0.0],
zAxis = [0.0, 0.0, 1.0] zAxis = [0.0, 0.0, 1.0]
}
} }
}
export plane002 = { export plane002 = {
plane = { plane = {
origin = [0.0, 0.0, 0.0], origin = [0.0, 0.0, 0.0],
xAxis = [ xAxis = [
sin(toRadians(axisJ1)), sin(toRadians(axisJ1)),
cos(toRadians(axisJ1)), cos(toRadians(axisJ1)),
0.0 0.0
], ],
yAxis = [0.0, 0.0, 1.0], yAxis = [0.0, 0.0, 1.0],
zAxis = [1.0, 0.0, 0.0] zAxis = [1.0, 0.0, 0.0]
}
} }
}
// Define Plane to Move J2 Axis Robot Arm // Define Plane to Move J2 Axis Robot Arm
export plane003 = { export plane003 = {
plane = { plane = {
origin = [-0.1, 0.0, 0.0], origin = [-0.1, 0.0, 0.0],
xAxis = [ xAxis = [
sin(toRadians(axisJ1)), sin(toRadians(axisJ1)),
cos(toRadians(axisJ1)), cos(toRadians(axisJ1)),
0.0 0.0
], ],
yAxis = [0.0, 0.0, 1.0], yAxis = [0.0, 0.0, 1.0],
zAxis = [1.0, 0.0, 0.0] zAxis = [1.0, 0.0, 0.0]
} }
} }

View File

@ -4,10 +4,10 @@
// Set Units // Set Units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
import 'robot-arm-base.kcl' as robotArmBase import "robot-arm-base.kcl" as robotArmBase
import 'robot-rotating-base.kcl' as rotatingBase import "robot-rotating-base.kcl" as rotatingBase
import 'robot-arm-j2.kcl' as j2RobotArm import "robot-arm-j2.kcl" as j2RobotArm
import 'robot-arm-j3.kcl' as j3RobotArm import "robot-arm-j3.kcl" as j3RobotArm
robotArmBase robotArmBase
rotatingBase rotatingBase

View File

@ -1,15 +1,13 @@
// Robot Arm Base // Robot Arm Base
// Set Units // Set Units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import Constants // Import Constants
import basePlateRadius, basePlateThickness, baseChamfer, baseHeight from "globals.kcl" import basePlateRadius, basePlateThickness, baseChamfer, baseHeight from "globals.kcl"
// Base Plate // Base Plate
sketch001 = startSketchOn('XY') sketch001 = startSketchOn(XY)
|> startProfileAt([-basePlateRadius, -basePlateRadius], %) |> startProfileAt([-basePlateRadius, -basePlateRadius], %)
|> angledLine([0, 2 * basePlateRadius], %, $rectangleSegmentA001) |> angledLine([0, 2 * basePlateRadius], %, $rectangleSegmentA001)
|> angledLine([ |> angledLine([
@ -30,17 +28,14 @@ extrude001 = extrude(sketch001, length = basePlateThickness)
getNextAdjacentEdge(rectangleSegmentB001), getNextAdjacentEdge(rectangleSegmentB001),
getNextAdjacentEdge(rectangleSegmentC001), getNextAdjacentEdge(rectangleSegmentC001),
getNextAdjacentEdge(rectangleSegmentD001) getNextAdjacentEdge(rectangleSegmentD001)
] ],
) )
// Base Motor for actuating first joint // Base Motor for actuating first joint
sketch002 = startSketchOn(extrude001, 'END') sketch002 = startSketchOn(extrude001, 'END')
|> circle(center = [0, 0], radius = 4, tag = $referenceEdge) |> circle(center = [0, 0], radius = 4, tag = $referenceEdge)
extrude002 = extrude(sketch002, length = baseHeight - basePlateThickness - 1.5) extrude002 = extrude(sketch002, length = baseHeight - basePlateThickness - 1.5)
|> fillet( |> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge)])
radius = 0.1,
tags = [getOppositeEdge(referenceEdge)]
)
sketch003 = startSketchOn(extrude002, 'END') sketch003 = startSketchOn(extrude002, 'END')
|> circle(center = [0, 0], radius = 0.5) |> circle(center = [0, 0], radius = 0.5)
extrude003 = extrude(sketch003, length = 1) extrude003 = extrude(sketch003, length = 1)
@ -52,13 +47,13 @@ sketch4A = startSketchOn(extrude001, 'END')
-basePlateRadius + 1, -basePlateRadius + 1,
-basePlateRadius + baseChamfer + 0.5 -basePlateRadius + baseChamfer + 0.5
], ],
radius = 0.4 radius = 0.4,
) )
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude4A = extrude(sketch4A, length = -basePlateThickness) extrude4A = extrude(sketch4A, length = -basePlateThickness)
@ -69,13 +64,13 @@ sketch4B = startSketchOn(extrude001, 'END')
-basePlateRadius + 0.5 + baseChamfer, -basePlateRadius + 0.5 + baseChamfer,
-basePlateRadius + 1 -basePlateRadius + 1
], ],
radius = 0.4 radius = 0.4,
) )
|> patternCircular2d( |> patternCircular2d(
arcDegrees = 360, arcDegrees = 360,
center = [0, 0], center = [0, 0],
instances = 4, instances = 4,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude(sketch4B, length = -basePlateThickness) extrude(sketch4B, length = -basePlateThickness)

View File

@ -1,10 +1,8 @@
// J2 Axis for Robot Arm // J2 Axis for Robot Arm
// Set Units // Set Units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
import axisJ1, axisJ2, axisJ2ArmWidth, axisJ2ArmLength, axisJ2ArmThickness, plane003 from "globals.kcl" import axisJ1, axisJ2, axisJ2ArmWidth, axisJ2ArmLength, axisJ2ArmThickness, plane003 from "globals.kcl"
// Create Body of J2 Robot Arm // Create Body of J2 Robot Arm
@ -35,24 +33,19 @@ sketch012 = startSketchOn(extrude011, 'START')
|> circle(center = [-1.75, 8], radius = 1.9, tag = $referenceEdge4) |> circle(center = [-1.75, 8], radius = 1.9, tag = $referenceEdge4)
extrude012 = extrude(sketch012, length = 0.15) extrude012 = extrude(sketch012, length = 0.15)
|> fillet( |> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge4)])
radius = 0.1,
tags = [getOppositeEdge(referenceEdge4)]
)
sketch013 = startSketchOn(extrude011, 'START') sketch013 = startSketchOn(extrude011, 'START')
|> circle( |> circle(
center = [ center = [
-1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))), -1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) 8 + axisJ2ArmLength * sin(toRadians(axisJ2))
], ],
radius = 1.9, radius = 1.9,
tag = $referenceEdge5) tag = $referenceEdge5,
)
extrude013 = extrude(sketch013, length = 1) extrude013 = extrude(sketch013, length = 1)
|> fillet( |> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge5)])
radius = 0.1,
tags = [getOppositeEdge(referenceEdge5)]
)
// Draw Bolt Patterns on J2 Robot Arm // Draw Bolt Patterns on J2 Robot Arm
sketch014 = startSketchOn(extrude012, 'END') sketch014 = startSketchOn(extrude012, 'END')
@ -61,7 +54,7 @@ sketch014 = startSketchOn(extrude012, 'END')
center = [-1.75, 8], center = [-1.75, 8],
instances = 8, instances = 8,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude014 = extrude(sketch014, length = 0.15) extrude014 = extrude(sketch014, length = 0.15)
@ -72,7 +65,7 @@ sketch015 = startSketchOn(extrude013, 'END')
-1.75 - ((axisJ2ArmLength - 1) * cos(toRadians(axisJ2))), -1.75 - ((axisJ2ArmLength - 1) * cos(toRadians(axisJ2))),
8 + (axisJ2ArmLength - 1.5) * sin(toRadians(axisJ2)) 8 + (axisJ2ArmLength - 1.5) * sin(toRadians(axisJ2))
], ],
radius = 0.2 radius = 0.2,
) )
|> patternCircular2d( |> patternCircular2d(
center = [ center = [
@ -81,7 +74,7 @@ sketch015 = startSketchOn(extrude013, 'END')
], ],
instances = 4, instances = 4,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude015 = extrude(sketch015, length = 0.15) extrude015 = extrude(sketch015, length = 0.15)
@ -92,7 +85,7 @@ sketch016 = startSketchOn(extrude011, 'END')
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)), 1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) 8 + axisJ2ArmLength * sin(toRadians(axisJ2))
], ],
radius = 0.3 radius = 0.3,
) )
extrude(sketch016, length = 1) extrude(sketch016, length = 1)

View File

@ -1,10 +1,8 @@
// J3 Robot Arm // J3 Robot Arm
// Set Units // Set Units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
import plane002, axisJ2, axisJ3C, axisJ4, axisJ2ArmLength, axisJ3CArmLength, axisJ3CArmWidth, axisJ3CArmThickness from "globals.kcl" import plane002, axisJ2, axisJ3C, axisJ4, axisJ2ArmLength, axisJ3CArmLength, axisJ3CArmWidth, axisJ3CArmThickness from "globals.kcl"
// Create Body of J3 Robot Arm // Create Body of J3 Robot Arm
@ -38,13 +36,11 @@ sketch018 = startSketchOn(extrude017, 'END')
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) 8 + axisJ2ArmLength * sin(toRadians(axisJ2))
], ],
radius = 3.7 / 2, radius = 3.7 / 2,
tag = $referenceEdge6) tag = $referenceEdge6,
)
extrude018 = extrude(sketch018, length = 0.15) extrude018 = extrude(sketch018, length = 0.15)
|> fillet( |> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge6)])
radius = 0.1,
tags = [getOppositeEdge(referenceEdge6)]
)
// Draw Bolt Pattern on J3 Robot Arm // Draw Bolt Pattern on J3 Robot Arm
sketch019 = startSketchOn(extrude018, 'END') sketch019 = startSketchOn(extrude018, 'END')
@ -53,7 +49,7 @@ sketch019 = startSketchOn(extrude018, 'END')
1.75 + (axisJ2ArmLength - 1) * cos(toRadians(axisJ2)), 1.75 + (axisJ2ArmLength - 1) * cos(toRadians(axisJ2)),
8 + (axisJ2ArmLength - 1.5) * sin(toRadians(axisJ2)) 8 + (axisJ2ArmLength - 1.5) * sin(toRadians(axisJ2))
], ],
radius = 0.2 radius = 0.2,
) )
|> patternCircular2d( |> patternCircular2d(
center = [ center = [
@ -62,7 +58,7 @@ sketch019 = startSketchOn(extrude018, 'END')
], ],
instances = 8, instances = 8,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude019 = extrude(sketch019, length = 0.15) extrude019 = extrude(sketch019, length = 0.15)
@ -74,7 +70,7 @@ sketch020 = startSketchOn(extrude017, 'START')
-1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))) - (axisJ3CArmLength * cos(toRadians(axisJ3C))), -1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))) - (axisJ3CArmLength * cos(toRadians(axisJ3C))),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C)) 8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
], ],
radius = axisJ3CArmWidth / 2 radius = axisJ3CArmWidth / 2,
) )
extrude020 = extrude(sketch020, length = -0.5) extrude020 = extrude(sketch020, length = -0.5)
@ -84,7 +80,7 @@ sketch021 = startSketchOn(extrude017, 'END')
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)), 1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C)) 8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
], ],
radius = axisJ3CArmWidth / 2.01 radius = axisJ3CArmWidth / 2.01,
) )
extrude021 = extrude(sketch021, length = -0.5) extrude021 = extrude(sketch021, length = -0.5)

View File

@ -1,20 +1,15 @@
// Robot Rotating Base // Robot Rotating Base
// Set Units // Set Units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
import axisJ1, baseHeight, plane001, plane002 from "globals.kcl" import axisJ1, baseHeight, plane001, plane002 from "globals.kcl"
// Create Rotating Base // Create Rotating Base
sketch005 = startSketchOn(plane001) sketch005 = startSketchOn(plane001)
|> circle(center = [0, 0], radius = 3.9, tag = $referenceEdge1) |> circle(center = [0, 0], radius = 3.9, tag = $referenceEdge1)
extrude005 = extrude(sketch005, length = 1.5 - 0.1) extrude005 = extrude(sketch005, length = 1.5 - 0.1)
|> fillet( |> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge1)])
radius = 0.1,
tags = [getOppositeEdge(referenceEdge1)]
)
|> appearance(color = "#4f7d54", metalness = 90, roughness = 90) |> appearance(color = "#4f7d54", metalness = 90, roughness = 90)
sketch006 = startSketchOn(plane002) sketch006 = startSketchOn(plane002)
@ -38,12 +33,10 @@ sketch007 = startSketchOn(extrude006, 'END')
8 8
], ],
radius = 2.75, radius = 2.75,
tag = $referenceEdge2) tag = $referenceEdge2,
extrude007 = extrude(sketch007, length = 1.5)
|> fillet(
radius = 0.1,
tags = [getOppositeEdge(referenceEdge2)]
) )
extrude007 = extrude(sketch007, length = 1.5)
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge2)])
// Draw Bolt Pattern on Rotating Base // Draw Bolt Pattern on Rotating Base
sketch008 = startSketchOn(extrude007, 'END') sketch008 = startSketchOn(extrude007, 'END')
@ -52,7 +45,7 @@ sketch008 = startSketchOn(extrude007, 'END')
1.75 * cos(toRadians(axisJ1)) / abs(cos(toRadians(axisJ1))), 1.75 * cos(toRadians(axisJ1)) / abs(cos(toRadians(axisJ1))),
6.75 6.75
], ],
radius = 0.2 radius = 0.2,
) )
|> patternCircular2d( |> patternCircular2d(
center = [ center = [
@ -61,7 +54,7 @@ sketch008 = startSketchOn(extrude007, 'END')
], ],
instances = 4, instances = 4,
arcDegrees = 360, arcDegrees = 360,
rotateDuplicates = true rotateDuplicates = true,
) )
extrude008 = extrude(sketch008, length = 0.2) extrude008 = extrude(sketch008, length = 0.2)
@ -72,12 +65,10 @@ sketch009 = startSketchOn(extrude007, 'END')
8 8
], ],
radius = 0.5, radius = 0.5,
tag = $referenceEdge3) tag = $referenceEdge3,
extrude009 = extrude(sketch009, length = 0.15)
|> fillet(
radius = 0.1,
tags = [getOppositeEdge(referenceEdge3)]
) )
extrude009 = extrude(sketch009, length = 0.15)
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge3)])
|> appearance(color = "#4f7d54", metalness = 90, roughness = 90) |> appearance(color = "#4f7d54", metalness = 90, roughness = 90)
sketch010 = startSketchOn(plane002) sketch010 = startSketchOn(plane002)

View File

@ -1,16 +1,16 @@
// 1120t74 Pipe // Pipe
// piping for the pipe flange assembly
// import constants
import pipeInnerDiameter, pipeOuterDiameter, pipeLength from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants
import pipeInnerDiameter, pipeOuterDiameter, pipeLength from "globals.kcl"
// create a function to make the pipe // create a function to make the pipe
export fn pipe() { export fn pipe() {
// create the pipe base // create the pipe base
pipeBase = startSketchOn('XZ') pipeBase = startSketchOn(XZ)
|> circle(%, center = [0, 0], radius = pipeOuterDiameter / 2) |> circle(%, center = [0, 0], radius = pipeOuterDiameter / 2)
|> extrude(%, length = pipeLength) |> extrude(%, length = pipeLength)

View File

@ -1,16 +1,16 @@
// 68095k348 flange // 68095k348 flange
// flange used for mating two pipes together in the pipe flange assembly.
// import constants
import pipeDiameter, mountingHoleDiameter, mountingHolePlacementDiameter, flangeDiameter, flangeTotalThickness, flangeBackHeight, flangeFrontHeight, flangeBaseThickness, flangeBackDiameter, flangeFrontDiameter from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants
import pipeDiameter, mountingHoleDiameter, mountingHolePlacementDiameter, flangeDiameter, flangeTotalThickness, flangeBackHeight, flangeFrontHeight, flangeBaseThickness, flangeBackDiameter, flangeFrontDiameter from "globals.kcl"
// create a function to create the flange // create a function to create the flange
export fn flange() { export fn flange() {
// sketch the mounting hole pattern // sketch the mounting hole pattern
mountingHoles = startSketchOn("XY") mountingHoles = startSketchOn(XY)
|> circle(%, center = [0, mountingHolePlacementDiameter / 2], radius = mountingHoleDiameter / 2) |> circle(%, center = [0, mountingHolePlacementDiameter / 2], radius = mountingHoleDiameter / 2)
|> patternCircular2d( |> patternCircular2d(
%, %,
@ -21,7 +21,7 @@ export fn flange() {
) )
// create the flange base // create the flange base
flangeBase = startSketchOn("XY") flangeBase = startSketchOn(XY)
|> circle(%, center = [0, 0], radius = flangeDiameter / 2) |> circle(%, center = [0, 0], radius = flangeDiameter / 2)
|> hole(mountingHoles, %) |> hole(mountingHoles, %)
|> extrude(%, length = flangeBaseThickness) |> extrude(%, length = flangeBaseThickness)

View File

@ -1,16 +1,17 @@
// 91251A404 Socket Head Cap Screw // 91251A404 Socket Head Cap Screw
// screw for mating the flanges together in the pipe flange assembly
// import constants
import boltDiameter, boltLength, boltHeadLength, boltHeadDiameter, boltHexDrive, boltHexFlatLength, boltThreadLength from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants
import boltDiameter, boltLength, boltHeadLength, boltHeadDiameter, boltHexDrive, boltHexFlatLength, boltThreadLength from "globals.kcl"
// create a function to make a the bolt // create a function to make a the bolt
export fn bolt() { export fn bolt() {
// Create the head of the cap screw // Create the head of the cap screw
boltHead = startSketchOn('XZ') boltHead = startSketchOn(XZ)
|> circle(center = [0, 0], radius = boltHeadDiameter / 2, tag = $topEdge) |> circle(center = [0, 0], radius = boltHeadDiameter / 2, tag = $topEdge)
|> extrude(length = -boltHeadLength) |> extrude(length = -boltHeadLength)
|> fillet(radius = 0.020, tags = [topEdge, getOppositeEdge(topEdge)]) |> fillet(radius = 0.020, tags = [topEdge, getOppositeEdge(topEdge)])

View File

@ -1,16 +1,16 @@
// 9472K188 Gasket // 9472K188 Gasket
// gasket for the pipe flange assembly. A gasket is a mechanical seal that fills the space between two or more mating surfaces, preventing leaks of liquids or gases under compression
// import constants
import gasketOutsideDiameter, gasketInnerDiameter, gasketThickness from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants
import gasketOutsideDiameter, gasketInnerDiameter, gasketThickness from "globals.kcl"
// create a function to make the gasket // create a function to make the gasket
export fn gasket() { export fn gasket() {
// create the base of the gasket // create the base of the gasket
gasketBase = startSketchOn("XY") gasketBase = startSketchOn(XY)
|> circle(%, center = [0, 0], radius = gasketOutsideDiameter / 2) |> circle(%, center = [0, 0], radius = gasketOutsideDiameter / 2)
|> extrude(%, length = gasketThickness) |> extrude(%, length = gasketThickness)

View File

@ -1,16 +1,16 @@
// 95479A127 Hex Nut // 95479A127 Hex Nut
// hex nut for the screws in the pipe flange assembly.
// import constants
import hexNutDiameter, hexNutFlatToFlat, hexNutThickness, hexNutFlatLength from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants
import hexNutDiameter, hexNutFlatToFlat, hexNutThickness, hexNutFlatLength from "globals.kcl"
// create a function to make the hex nut // create a function to make the hex nut
export fn hexNut() { export fn hexNut() {
// create the base of the hex nut // create the base of the hex nut
hexNutBase = startSketchOn('XY') hexNutBase = startSketchOn(XY)
|> startProfileAt([ |> startProfileAt([
hexNutFlatToFlat / 2, hexNutFlatToFlat / 2,
hexNutFlatLength / 2 hexNutFlatLength / 2

View File

@ -1,16 +1,16 @@
// 98017A257 Washer // 98017A257 Washer
// washer for the screws in the pipe flange assembly.
// import constants
import washerInnerDia, washerOuterDia, washerThickness from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants
import washerInnerDia, washerOuterDia, washerThickness from "globals.kcl"
// create a function to make the washer // create a function to make the washer
export fn washer() { export fn washer() {
// create the base of the washer // create the base of the washer
washerBase = startSketchOn('XY') washerBase = startSketchOn(XY)
|> circle(center = [0, 0], radius = washerOuterDia / 2) |> circle(center = [0, 0], radius = washerOuterDia / 2)
|> extrude(length = washerThickness) |> extrude(length = washerThickness)

View File

@ -5,54 +5,120 @@
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants // import constants
import * from 'globals.kcl' import * from "globals.kcl"
// import parts // import parts
import flange from '68095k348-flange.kcl' import flange from "68095k348-flange.kcl"
import gasket from '9472k188-gasket.kcl' import gasket from "9472k188-gasket.kcl"
import washer from '98017a257-washer.kcl' import washer from "98017a257-washer.kcl"
import bolt from '91251a404-bolt.kcl' import bolt from "91251a404-bolt.kcl"
import hexNut from '95479a127-hex-nut.kcl' import hexNut from "95479a127-hex-nut.kcl"
import pipe from '1120t74-pipe.kcl' import pipe from "1120t74-pipe.kcl"
// place flanges // place flanges
flange() flange()
flange() flange()
|> rotate(axis = [0, 1, 0], angle = 180) |> rotate(axis = [0, 1, 0], angle = 180)
|> translate(translate = [0, 0, flangeBackHeight*2 + gasketThickness]) |> translate(translate = [
0,
0,
flangeBackHeight * 2 + gasketThickness
])
// place gasket between the flanges // place gasket between the flanges
gasket() gasket()
|> translate(translate = [0, 0, -flangeBackHeight - gasketThickness]) |> translate(translate = [
0,
0,
-flangeBackHeight - gasketThickness
])
// place eight washers (four front, four back) // place eight washers (four front, four back)
washer() washer()
|> translate(translate = [ |> translate(translate = [
mountingHolePlacementDiameter/2, mountingHolePlacementDiameter / 2,
0, 0,
flangeBaseThickness flangeBaseThickness
]) ])
|> patternCircular3d(%, instances = 4, axis = [0, 0, 1], center = [0, 0, 0], arcDegrees = 360, rotateDuplicates = false) |> patternCircular3d(
|> patternLinear3d(%, instances = 2, distance = -(flangeBaseThickness*2 + flangeBackHeight * 2 + gasketThickness + washerThickness), axis = [0, 0, 1]) %,
instances = 4,
axis = [0, 0, 1],
center = [0, 0, 0],
arcDegrees = 360,
rotateDuplicates = false,
)
|> patternLinear3d(
%,
instances = 2,
distance = -(flangeBaseThickness * 2 + flangeBackHeight * 2 + gasketThickness + washerThickness),
axis = [0, 0, 1],
)
// place four bolts // place four bolts
bolt() bolt()
|> translate(translate = [ |> translate(translate = [
mountingHolePlacementDiameter/2, 0, flangeBaseThickness + washerThickness mountingHolePlacementDiameter / 2,
]) 0,
flangeBaseThickness + washerThickness
])
|> rotate(roll = 90, pitch = 0, yaw = 0) |> rotate(roll = 90, pitch = 0, yaw = 0)
|> patternCircular3d(%, instances = 4, axis = [0, 0, 1], center = [0, 0, 0], arcDegrees = 360, rotateDuplicates = false) |> patternCircular3d(
%,
instances = 4,
axis = [0, 0, 1],
center = [0, 0, 0],
arcDegrees = 360,
rotateDuplicates = false,
)
// place four hex nuts // place four hex nuts
hexNut() hexNut()
|> translate(translate = [mountingHolePlacementDiameter/2, 0, -(flangeBackHeight * 2 + gasketThickness + flangeBaseThickness + washerThickness + hexNutThickness)]) |> translate(translate = [
|> patternCircular3d(%, instances = 4, axis = [0, 0, 1], center = [0, 0, 0], arcDegrees = 360, rotateDuplicates = false) mountingHolePlacementDiameter / 2,
0,
-(flangeBackHeight * 2 + gasketThickness + flangeBaseThickness + washerThickness + hexNutThickness)
])
|> patternCircular3d(
%,
instances = 4,
axis = [0, 0, 1],
center = [0, 0, 0],
arcDegrees = 360,
rotateDuplicates = false,
)
// place both pieces of pipe // place both pieces of pipe
pipe() pipe()
|> rotate(%, roll = -90, pitch = 0, yaw = 0) |> rotate(
|> translate(%, translate = [0, 0, flangeBaseThickness + flangeFrontHeight - 0.5], global = true) %,
roll = -90,
pitch = 0,
yaw = 0,
)
|> translate(
%,
translate = [
0,
0,
flangeBaseThickness + flangeFrontHeight - 0.5
],
global = true,
)
pipe() pipe()
|> rotate(%, roll = 90, pitch = 0, yaw = 0) |> rotate(
|> translate(%, translate = [0, 0, -(flangeBackHeight * 2 + gasketThickness + flangeBaseThickness + flangeFrontHeight - 0.5)], global = true) %,
roll = 90,
pitch = 0,
yaw = 0,
)
|> translate(
%,
translate = [
0,
0,
-(flangeBackHeight * 2 + gasketThickness + flangeBaseThickness + flangeFrontHeight - 0.5)
],
global = true,
)

View File

@ -1,7 +1,6 @@
// Pipe with bend // Pipe with bend
// A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow. // A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
@ -12,7 +11,7 @@ bendRadius = 30
bendAngle = 90 bendAngle = 90
// create a sketch in the 'XZ' plane // create a sketch in the 'XZ' plane
sketch000 = startSketchOn("XZ") sketch000 = startSketchOn(XZ)
// create a profile for the outer diameter // create a profile for the outer diameter
outerProfile = circle(sketch000, center = [bendRadius, 0], radius = outerDiameter / 2) outerProfile = circle(sketch000, center = [bendRadius, 0], radius = outerDiameter / 2)

View File

@ -15,7 +15,7 @@ pipeTransitionLength = 0.5
pipeSmallDiaLength = pipeTotalLength - pipeTransitionLength - pipeLargeDiaLength pipeSmallDiaLength = pipeTotalLength - pipeTransitionLength - pipeLargeDiaLength
// Create the sketch to be revolved around the y-axis. Use the small diameter, large diameter, length, and thickness to define the sketch. // Create the sketch to be revolved around the y-axis. Use the small diameter, large diameter, length, and thickness to define the sketch.
pipeSketch = startSketchOn('XY') pipeSketch = startSketchOn(XY)
|> startProfileAt([pipeSmallDia - (thickness / 2), 38], %) |> startProfileAt([pipeSmallDia - (thickness / 2), 38], %)
|> line(end = [thickness, 0]) |> line(end = [thickness, 0])
|> line(end = [0, -pipeSmallDiaLength]) |> line(end = [0, -pipeSmallDiaLength])

View File

@ -1,11 +1,9 @@
// Poopy Shoe // Poopy Shoe
// poop shute for bambu labs printer - optimized for printing. // poop shute for bambu labs printer - optimized for printing.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
wallThickness = 0.125 wallThickness = 0.125
wallsWidth = 3 wallsWidth = 3
height = 5.125 height = 5.125
@ -14,7 +12,7 @@ backLength = 6
exitHeight = 1 exitHeight = 1
frontLength = 7 frontLength = 7
sketch001 = startSketchOn("-YZ") sketch001 = startSketchOn(-YZ)
|> startProfileAt([wallsWidth / 2, 0], %) |> startProfileAt([wallsWidth / 2, 0], %)
|> xLine(length = wallThickness / 2) |> xLine(length = wallThickness / 2)
|> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg01) |> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg01)
@ -32,17 +30,18 @@ sketch001 = startSketchOn("-YZ")
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
|> angledLineToY({ angle = 180 - 60, to = 0 }, %) |> angledLineToY({ angle = 180 - 60, to = 0 }, %)
|> close() |> close()
part001 = revolve(sketch001, part001 = revolve(
sketch001,
angle = 90, angle = 90,
axis = { axis = {
custom = { custom = {
axis = [1.0, 0.0], axis = [1.0, 0.0],
origin = [0.0, height + .0001] origin = [0.0, height + .0001]
} }
} },
) )
sketch002 = startSketchOn('-YZ') sketch002 = startSketchOn(-YZ)
|> startProfileAt([wallsWidth / 2, 0], %) |> startProfileAt([wallsWidth / 2, 0], %)
|> xLine(length = wallThickness / 2) |> xLine(length = wallThickness / 2)
|> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg02) |> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg02)

View File

@ -13,7 +13,7 @@ templateThickness = 10
radius = 10 radius = 10
depth = 30 depth = 30
distanceToInsideEdge = slateWidthHalf + templateThickness + templateGap distanceToInsideEdge = slateWidthHalf + templateThickness + templateGap
sketch001 = startSketchOn('XZ') sketch001 = startSketchOn(XZ)
|> startProfileAt([ZERO, depth + templateGap], %) |> startProfileAt([ZERO, depth + templateGap], %)
|> xLine(length = slateWidthHalf - radius, tag = $seg01) |> xLine(length = slateWidthHalf - radius, tag = $seg01)
|> arc({ |> arc({

View File

@ -17,7 +17,7 @@ length001 = slateWidthHalf - radius
length002 = depth + minClampingDistance length002 = depth + minClampingDistance
// Create the first sketch // Create the first sketch
sketch001 = startSketchOn('XZ') sketch001 = startSketchOn(XZ)
|> startProfileAt([0, depth - templateGap], %) |> startProfileAt([0, depth - templateGap], %)
|> xLine(length = length001, tag = $seg01) |> xLine(length = length001, tag = $seg01)
|> arc({ |> arc({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -15,7 +15,7 @@ boltSize = 0.25
flangeWidth = 1.5 flangeWidth = 1.5
// Sketch and extrude the base shape and fillet the inside and outside edges. // Sketch and extrude the base shape and fillet the inside and outside edges.
baseExtrusion = startSketchOn('-XZ') baseExtrusion = startSketchOn(-XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [0, thickness], tag = $e1) |> line(end = [0, thickness], tag = $e1)
|> line(end = [flangeLength, 0], tag = $e2) |> line(end = [flangeLength, 0], tag = $e2)
@ -30,82 +30,46 @@ baseExtrusion = startSketchOn('-XZ')
|> line(end = [0, -hatHeight], tag = $e11) |> line(end = [0, -hatHeight], tag = $e11)
|> close(tag = $e12) |> close(tag = $e12)
|> extrude(length = hatWidth) |> extrude(length = hatWidth)
|> fillet( |> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e2)])
radius = bendRad, |> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e3)])
tags = [getNextAdjacentEdge(e2)] |> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e4)])
) |> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e5)])
|> fillet( |> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e8)])
radius = outsideBendRad, |> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e9)])
tags = [getNextAdjacentEdge(e3)] |> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e10)])
) |> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e11)])
|> fillet(
radius = outsideBendRad,
tags = [getNextAdjacentEdge(e4)]
)
|> fillet(
radius = bendRad,
tags = [getNextAdjacentEdge(e5)]
)
|> fillet(
radius = outsideBendRad,
tags = [getNextAdjacentEdge(e8)]
)
|> fillet(
radius = bendRad,
tags = [getNextAdjacentEdge(e9)]
)
|> fillet(
radius = bendRad,
tags = [getNextAdjacentEdge(e10)]
)
|> fillet(
radius = outsideBendRad,
tags = [getNextAdjacentEdge(e11)]
)
// Define the flanges and place the bolt holes // Define the flanges and place the bolt holes
flange1 = startSketchOn('XY') flange1 = startSketchOn(XY)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [0, hatWidth]) |> line(end = [0, hatWidth])
|> line(end = [flangeWidth, 0], tag = $e13) |> line(end = [flangeWidth, 0], tag = $e13)
|> line(end = [0, -hatWidth], tag = $e14) |> line(end = [0, -hatWidth], tag = $e14)
|> close() |> close()
|> hole(circle( |> hole(circle(center = [0.75, 1], radius = boltSize), %)
center = [0.75, 1], |> hole(circle(center = [0.75, 4], radius = boltSize), %)
radius = boltSize
), %)
|> hole(circle(
center = [0.75, 4],
radius = boltSize
), %)
|> extrude(length = thickness) |> extrude(length = thickness)
|> fillet( |> fillet(
radius = 0.5, radius = 0.5,
tags = [ tags = [
getNextAdjacentEdge(e13), getNextAdjacentEdge(e13),
getNextAdjacentEdge(e14) getNextAdjacentEdge(e14)
] ],
) )
flange2 = startSketchOn('XY') flange2 = startSketchOn(XY)
|> startProfileAt([-6, 0], %) |> startProfileAt([-6, 0], %)
|> line(end = [0, hatWidth]) |> line(end = [0, hatWidth])
|> line(end = [-flangeWidth, 0], tag = $e15) |> line(end = [-flangeWidth, 0], tag = $e15)
|> line(end = [0, -hatWidth], tag = $e16) |> line(end = [0, -hatWidth], tag = $e16)
|> close() |> close()
|> hole(circle( |> hole(circle(center = [-6.75, 1], radius = boltSize), %)
center = [-6.75, 1], |> hole(circle(center = [-6.75, 4], radius = boltSize), %)
radius = boltSize
), %)
|> hole(circle(
center = [-6.75, 4],
radius = boltSize
), %)
|> extrude(length = thickness) |> extrude(length = thickness)
|> fillet( |> fillet(
radius = 0.25, radius = 0.25,
tags = [ tags = [
getNextAdjacentEdge(e15), getNextAdjacentEdge(e15),
getNextAdjacentEdge(e16) getNextAdjacentEdge(e16)
] ],
) )

View File

@ -5,24 +5,19 @@
@settings(defaultLengthUnit = in, defaultAngleUnit = deg) @settings(defaultLengthUnit = in, defaultAngleUnit = deg)
export boltDiameter = 0.190 export boltDiameter = 0.190
export boltLength = 1.00 export boltLength = 1.0
export boltHeadLength = boltDiameter export boltHeadLength = boltDiameter
export boltHeadDiameter = 0.313 export boltHeadDiameter = 0.313
export boltHexDrive = 5/32 export boltHexDrive = 5 / 32
export boltHexFlatLength = boltHexDrive / (2 * cos(toRadians(30))) export boltHexFlatLength = boltHexDrive / (2 * cos(toRadians(30)))
export fn bolt () { export fn bolt() {
// Create the head of the cap screw // Create the head of the cap screw
boltHead = startSketchOn('XZ') boltHead = startSketchOn(XZ)
|> circle( |> circle(center = [0, 0], radius = boltHeadDiameter / 2, tag = $topEdge)
center = [0, 0],
radius = boltHeadDiameter / 2,
tag = $topEdge
)
|> extrude(length = -boltHeadLength) |> extrude(length = -boltHeadLength)
|> fillet(radius = 0.020, tags = [topEdge, getOppositeEdge(topEdge)]) |> fillet(radius = 0.020, tags = [topEdge, getOppositeEdge(topEdge)])
// Define the sketch of the hex pattern on the screw head // Define the sketch of the hex pattern on the screw head
hexPatternSketch = startSketchOn(boltHead, 'start') hexPatternSketch = startSketchOn(boltHead, 'start')
|> startProfileAt([ |> startProfileAt([
@ -51,7 +46,6 @@ export fn bolt () {
}, %) }, %)
|> close() |> close()
|> extrude(length = -boltHeadLength * 0.75) |> extrude(length = -boltHeadLength * 0.75)
boltBody = startSketchOn(boltHead, 'end') boltBody = startSketchOn(boltHead, 'end')
|> circle(center = [0, 0], radius = boltDiameter / 2, tag = $filletEdge) |> circle(center = [0, 0], radius = boltDiameter / 2, tag = $filletEdge)
|> extrude(length = boltLength) |> extrude(length = boltLength)

View File

@ -1,24 +1,23 @@
// Antenna // Walkie talkie antenna
// antenna for the walkie talkie assembly
// import constants
import antennaLength, antennaBaseWidth, antennaBaseHeight, antennaTopWidth, antennaTopHeight from "globals.kcl"
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
export fn antenna () { // import constants
import antennaLength, antennaBaseWidth, antennaBaseHeight, antennaTopWidth, antennaTopHeight from "globals.kcl"
export fn antenna() {
// Create the antenna base sketch // Create the antenna base sketch
sketch001 = startSketchOn('XY') sketch001 = startSketchOn(XY)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [antennaBaseWidth, 0]) |> line(end = [antennaBaseWidth, 0])
|> line(end = [0, -antennaBaseHeight]) |> line(end = [0, -antennaBaseHeight])
|> line(end = [-antennaBaseWidth, 0]) |> line(end = [-antennaBaseWidth, 0])
|> close() |> close()
// Create the antenna top sketch // Create the antenna top sketch
loftPlane = offsetPlane('XY', offset = antennaLength) loftPlane = offsetPlane(XY, offset = antennaLength)
sketch002 = startSketchOn(loftPlane) sketch002 = startSketchOn(loftPlane)
|> startProfileAt([ |> startProfileAt([
(antennaBaseWidth - antennaTopWidth) / 2, (antennaBaseWidth - antennaTopWidth) / 2,
@ -28,10 +27,9 @@ export fn antenna () {
|> yLine(length = -antennaTopHeight) |> yLine(length = -antennaTopHeight)
|> xLine(length = -antennaTopWidth) |> xLine(length = -antennaTopWidth)
|> close() |> close()
// Create the antenna using a loft // Create the antenna using a loft
antenna = loft([sketch001, sketch002]) antenna = loft([sketch001, sketch002])
|> appearance(color = "#000000") |> appearance(color = "#000000")
return antenna return antenna
} }

View File

@ -1,16 +1,16 @@
// Walkie talkie body // Walkie talkie body
// the main body of the walkie talkie assembly
// import constants
import height, width, thickness, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// create a function to define the body // import constants
export fn body () { import height, width, thickness, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight from "globals.kcl"
// create a function to define the body
export fn body() {
// sketch and extrude the body of the walkie talkie // sketch and extrude the body of the walkie talkie
bodySketch = startSketchOn('XZ') bodySketch = startSketchOn(XZ)
|> startProfileAt([-width / 2, height / 2], %) |> startProfileAt([-width / 2, height / 2], %)
|> xLine(length = width, tag = $chamfer1) |> xLine(length = width, tag = $chamfer1)
|> yLine(length = -height, tag = $chamfer2) |> yLine(length = -height, tag = $chamfer2)
@ -24,7 +24,7 @@ export fn body () {
getNextAdjacentEdge(chamfer2), getNextAdjacentEdge(chamfer2),
getNextAdjacentEdge(chamfer3), getNextAdjacentEdge(chamfer3),
getNextAdjacentEdge(chamfer4) getNextAdjacentEdge(chamfer4)
] ],
) )
// cut out the indentation for the case // cut out the indentation for the case
@ -57,7 +57,7 @@ export fn body () {
}, %) }, %)
|> close() |> close()
extrude002 = extrude(sketch002, length = -0.0625) extrude002 = extrude(sketch002, length = -0.0625)
// Create the pocket for the screen // Create the pocket for the screen
sketch003 = startSketchOn(extrude002, 'start') sketch003 = startSketchOn(extrude002, 'start')
|> startProfileAt([-screenWidth / 2, screenYPosition], %) |> startProfileAt([-screenWidth / 2, screenYPosition], %)
@ -67,7 +67,7 @@ export fn body () {
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
extrude003 = extrude(sketch003, length = screenDepth) extrude003 = extrude(sketch003, length = screenDepth)
// Create the speaker box // Create the speaker box
sketch004 = startSketchOn(extrude002, 'start') sketch004 = startSketchOn(extrude002, 'start')
|> startProfileAt([-1.25 / 2, -.125], %) |> startProfileAt([-1.25 / 2, -.125], %)
@ -77,9 +77,7 @@ export fn body () {
|> close() |> close()
body = extrude(sketch004, length = -.5) body = extrude(sketch004, length = -.5)
|> appearance( |> appearance(color = "#277bb0")
color = "#277bb0",
)
return body return body
} }

View File

@ -4,26 +4,16 @@
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants // import constants
import buttonWidth, buttonHeight, buttonThickness from 'globals.kcl' import buttonWidth, buttonHeight, buttonThickness from "globals.kcl"
// create a function to define the button // create a function to define the button
export fn button() { export fn button() {
// sketch the button profile and extrude // sketch the button profile and extrude
buttonSketch = startSketchOn('XZ') buttonSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine({ angle = 180, length = buttonWidth }, %, $tag1)
angle = 180, |> angledLine({ angle = 270, length = buttonHeight }, %, $tag2)
length = buttonWidth |> angledLine({ angle = 0, length = buttonWidth }, %)
}, %, $tag1)
|> angledLine({
angle = 270,
length = buttonHeight
}, %, $tag2)
|> angledLine({
angle = 0,
length = buttonWidth
}, %)
|> close() |> close()
buttonExtrude = extrude(buttonSketch, length = buttonThickness) buttonExtrude = extrude(buttonSketch, length = buttonThickness)
|> chamfer( |> chamfer(
@ -31,9 +21,9 @@ export fn button() {
tags = [ tags = [
getNextAdjacentEdge(tag1), getNextAdjacentEdge(tag1),
getNextAdjacentEdge(tag2) getNextAdjacentEdge(tag2)
] ],
) )
|> appearance(color = "#ff0000") |> appearance(color = "#ff0000")
return buttonExtrude return buttonExtrude
} }

View File

@ -1,25 +1,24 @@
// Walkie talkie case // Walkie talkie case
// the plastic case for the front of the walkie talkie
// set units
@settings(defaultLengthUnit = in)
// import constants and Zoo logo // import constants and Zoo logo
import width, height, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight, squareHoleSideLength, caseTolerance from "globals.kcl" import width, height, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight, squareHoleSideLength, caseTolerance from "globals.kcl"
import zLogo, oLogo, oLogo2 from "zoo-logo.kcl" import zLogo, oLogo, oLogo2 from "zoo-logo.kcl"
// set units
@settings(defaultLengthUnit = in)
// create a function to define the case // create a function to define the case
export fn case () { export fn case() {
// sketch the profile of the screen // sketch the profile of the screen
sketch006 = startSketchOn(startSketchOn('XZ')) sketch006 = startSketchOn(startSketchOn(XZ))
|> startProfileAt([-screenWidth / 2, screenYPosition], %) |> startProfileAt([-screenWidth / 2, screenYPosition], %)
|> xLine(length = screenWidth) |> xLine(length = screenWidth)
|> yLine(length = -screenHeight) |> yLine(length = -screenHeight)
|> xLine(length = -screenWidth) |> xLine(length = -screenWidth)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
// create transform functions for the speaker grid pattern // create transform functions for the speaker grid pattern
fn transformX(i) { fn transformX(i) {
return { translate = [.125 * i, 0] } return { translate = [.125 * i, 0] }
@ -29,7 +28,7 @@ export fn case () {
} }
// sketch the square hole grid pattern // sketch the square hole grid pattern
squareHolePatternSketch = startSketchOn(startSketchOn('XZ')) squareHolePatternSketch = startSketchOn(startSketchOn(XZ))
|> startProfileAt([-screenWidth / 2 + .100, 0], %) |> startProfileAt([-screenWidth / 2 + .100, 0], %)
|> line(end = [squareHoleSideLength / 2, 0]) |> line(end = [squareHoleSideLength / 2, 0])
|> line(end = [0, -squareHoleSideLength / 2]) |> line(end = [0, -squareHoleSideLength / 2])
@ -38,8 +37,8 @@ export fn case () {
|> patternTransform2d(instances = 13, transform = transformX) |> patternTransform2d(instances = 13, transform = transformX)
|> patternTransform2d(instances = 11, transform = transformY) |> patternTransform2d(instances = 11, transform = transformY)
// sketch the outer profile of the case and extrude with holes using the previously made profiles // sketch the outer profile of the case and extrude with holes using the previously made profiles
sketch005 = startSketchOn(startSketchOn('XZ')) sketch005 = startSketchOn(startSketchOn(XZ))
|> startProfileAt([ |> startProfileAt([
-width / 2 + offset + caseTolerance, -width / 2 + offset + caseTolerance,
height / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45))) height / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45)))
@ -77,14 +76,13 @@ export fn case () {
|> hole(squareHolePatternSketch, %) |> hole(squareHolePatternSketch, %)
// create the Zoo logo // create the Zoo logo
|> hole(zLogo(startSketchOn('XZ'), [-.30, -1.825], .20), %) |> hole(zLogo(startSketchOn(XZ), [-.30, -1.825], .20), %)
|> hole(oLogo(startSketchOn('XZ'), [-.075, -1.825], .20), %) |> hole(oLogo(startSketchOn(XZ), [-.075, -1.825], .20), %)
|> hole(oLogo2(startSketchOn('XZ'), [-.075, -1.825], .20), %) |> hole(oLogo2(startSketchOn(XZ), [-.075, -1.825], .20), %)
|> hole(oLogo(startSketchOn('XZ'), [.175, -1.825], .20), %) |> hole(oLogo(startSketchOn(XZ), [.175, -1.825], .20), %)
|> hole(oLogo2(startSketchOn('XZ'), [.175, -1.825], .20), %) |> hole(oLogo2(startSketchOn(XZ), [.175, -1.825], .20), %)
case = extrude(sketch005, length = -0.0625) case = extrude(sketch005, length = -0.0625)
|> appearance(color = '#D0FF01', metalness = 0, roughness = 50) |> appearance(color = '#D0FF01', metalness = 0, roughness = 50)
return case return case
} }

View File

@ -40,4 +40,4 @@ export knobRadius = 0.050
// talk-button // talk-button
export talkButtonSideLength = 0.5 export talkButtonSideLength = 0.5
export talkButtonHeight = 0.050 export talkButtonHeight = 0.050

View File

@ -1,31 +1,28 @@
// Walkie Talkie Frequency Knob // Walkie talkie frequency knob
// the frequency knob for the walkie talkie assembly
// import constants
import width, thickness, height, knobDiameter, knobHeight, knobRadius from "globals.kcl"
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// create a function to define the knob // import constants
export fn knob () { import width, thickness, height, knobDiameter, knobHeight, knobRadius from "globals.kcl"
// Create the knob sketch and revolve // create a function to define the knob
knob = startSketchOn('XZ') export fn knob() {
|> startProfileAt([0.0001, 0], %) // Create the knob sketch and revolve
|> xLine(length = knobDiameter / 2) knob = startSketchOn(XZ)
|> yLine(length = knobHeight - 0.05) |> startProfileAt([0.0001, 0], %)
|> arc({ |> xLine(length = knobDiameter / 2)
angleStart = 0, |> yLine(length = knobHeight - 0.05)
angleEnd = 90, |> arc({
radius = .05 angleStart = 0,
}, %) angleEnd = 90,
|> xLine(endAbsolute = 0.0001) radius = .05
|> close() }, %)
|> revolve( |> xLine(endAbsolute = 0.0001)
axis = "Y", |> close()
) |> revolve(axis = "Y")
|> appearance(color = '#D0FF01', metalness = 90, roughness = 50) |> appearance(color = '#D0FF01', metalness = 90, roughness = 50)
return knob return knob
}
}

View File

@ -5,14 +5,14 @@
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants // import constants
import * from 'globals.kcl' import * from "globals.kcl"
// import parts and constants // import parts and constants
import body from 'body.kcl' import body from "body.kcl"
import case from 'case.kcl' import case from "case.kcl"
import antenna from 'antenna.kcl' import antenna from "antenna.kcl"
import talkButton from 'talk-button.kcl' import talkButton from "talk-button.kcl"
import knob from 'knob.kcl' import knob from "knob.kcl"
import button from "button.kcl" import button from "button.kcl"
// import the body // import the body
@ -20,7 +20,7 @@ body()
// import the antenna // import the antenna
antenna() antenna()
|> translate(translate = [-width / 2 + .45, -0.10, height/2]) |> translate(translate = [-width / 2 + .45, -0.10, height / 2])
// import the case // import the case
case() case()
@ -32,16 +32,52 @@ talkButton()
// import the frequency knob // import the frequency knob
knob() knob()
|> translate(translate = [width / 2 - 0.70, -thickness / 2, height / 2]) |> translate(translate = [
width / 2 - 0.70,
-thickness / 2,
height / 2
])
// import the buttons // import the buttons
button() button()
|> translate(translate = [-(screenWidth / 2 + tolerance), -1, screenYPosition]) |> translate(translate = [
-(screenWidth / 2 + tolerance),
-1,
screenYPosition
])
button() button()
|> translate(translate = [-(screenWidth / 2 + tolerance), -1, screenYPosition - buttonHeight - tolerance*2]) |> translate(translate = [
-(screenWidth / 2 + tolerance),
-1,
screenYPosition - buttonHeight - (tolerance * 2)
])
button() button()
|> rotate(%, roll = 0, pitch = 180, yaw = 0) |> rotate(
|> translate(translate = [screenWidth / 2 + tolerance, -1, screenYPosition - buttonHeight], global = true) %,
roll = 0,
pitch = 180,
yaw = 0,
)
|> translate(
translate = [
screenWidth / 2 + tolerance,
-1,
screenYPosition - buttonHeight
],
global = true,
)
button() button()
|> rotate(%, roll = 0, pitch = 180, yaw = 0) |> rotate(
|> translate(translate = [screenWidth / 2 + tolerance, -1, screenYPosition - buttonHeight*2 - tolerance * 2], global = true) %,
roll = 0,
pitch = 180,
yaw = 0,
)
|> translate(
translate = [
screenWidth / 2 + tolerance,
-1,
screenYPosition - (buttonHeight * 2) - (tolerance * 2)
],
global = true,
)

View File

@ -1,6 +1,5 @@
// Walkie talkie talk button // Walkie talkie talk button
// set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
@ -8,9 +7,8 @@
import width, thickness, talkButtonSideLength, talkButtonHeight from "globals.kcl" import width, thickness, talkButtonSideLength, talkButtonHeight from "globals.kcl"
export fn talkButton() { export fn talkButton() {
// create the talk button sketch // create the talk button sketch
talkButtonSketch = startSketchOn('YZ') talkButtonSketch = startSketchOn(YZ)
|> startProfileAt([ |> startProfileAt([
-talkButtonSideLength / 2, -talkButtonSideLength / 2,
talkButtonSideLength / 2 talkButtonSideLength / 2
@ -23,14 +21,14 @@ export fn talkButton() {
// create the talk button and apply fillets // create the talk button and apply fillets
talkButton = extrude(talkButtonSketch, length = talkButtonHeight) talkButton = extrude(talkButtonSketch, length = talkButtonHeight)
|> fillet( |> fillet(
radius = 0.050, radius = 0.050,
tags = [ tags = [
getNextAdjacentEdge(tag1), getNextAdjacentEdge(tag1),
getNextAdjacentEdge(tag2), getNextAdjacentEdge(tag2),
getNextAdjacentEdge(tag3), getNextAdjacentEdge(tag3),
getNextAdjacentEdge(tag4) getNextAdjacentEdge(tag4)
] ],
) )
|> appearance(color = '#D0FF01', metalness = 90, roughness = 90) |> appearance(color = '#D0FF01', metalness = 90, roughness = 90)
return talkButton return talkButton

View File

@ -80,4 +80,4 @@ export fn oLogo2(surface, origin, scale) {
}, %) }, %)
|> close() |> close()
return oSketch002 return oSketch002
} }

View File

@ -14,17 +14,11 @@ thicknessMin = 0.024
fn washer(plane, innerDia, outerDia, thk) { fn washer(plane, innerDia, outerDia, thk) {
// Define the sketch of the washer // Define the sketch of the washer
washerSketch = startSketchOn(plane) washerSketch = startSketchOn(plane)
|> circle( |> circle(center = [0, 0], radius = outerDia / 2)
center = [0, 0], |> hole(circle(center = [0, 0], radius = innerDia / 2), %)
radius = outerDia / 2
)
|> hole(circle(
center = [0, 0],
radius = innerDia / 2
), %)
washer = extrude(washerSketch, length = thk) washer = extrude(washerSketch, length = thk)
return washer return washer
} }
washer('XY', innerDiameter, outerDiameter, thicknessMax) washer(XY, innerDiameter, outerDiameter, thicknessMax)

20
rust/Cargo.lock generated
View File

@ -1780,7 +1780,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-bumper" name = "kcl-bumper"
version = "0.1.54" version = "0.1.55"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -1791,7 +1791,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-derive-docs" name = "kcl-derive-docs"
version = "0.1.54" version = "0.1.55"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"anyhow", "anyhow",
@ -1810,7 +1810,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-directory-test-macro" name = "kcl-directory-test-macro"
version = "0.1.54" version = "0.1.55"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1819,7 +1819,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-language-server" name = "kcl-language-server"
version = "0.2.54" version = "0.2.55"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -1840,7 +1840,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-language-server-release" name = "kcl-language-server-release"
version = "0.1.54" version = "0.1.55"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -1860,7 +1860,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-lib" name = "kcl-lib"
version = "0.2.54" version = "0.2.55"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"approx 0.5.1", "approx 0.5.1",
@ -1928,7 +1928,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-python-bindings" name = "kcl-python-bindings"
version = "0.3.54" version = "0.3.55"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"kcl-lib", "kcl-lib",
@ -1943,7 +1943,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-test-server" name = "kcl-test-server"
version = "0.1.54" version = "0.1.55"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"hyper 0.14.32", "hyper 0.14.32",
@ -1956,7 +1956,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-to-core" name = "kcl-to-core"
version = "0.1.54" version = "0.1.55"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1970,7 +1970,7 @@ dependencies = [
[[package]] [[package]]
name = "kcl-wasm-lib" name = "kcl-wasm-lib"
version = "0.1.54" version = "0.1.55"
dependencies = [ dependencies = [
"bson", "bson",
"console_error_panic_hook", "console_error_panic_hook",

View File

@ -1,7 +1,7 @@
[package] [package]
name = "kcl-bumper" name = "kcl-bumper"
version = "0.1.54" version = "0.1.55"
edition = "2021" edition = "2021"
repository = "https://github.com/KittyCAD/modeling-api" repository = "https://github.com/KittyCAD/modeling-api"
rust-version = "1.76" rust-version = "1.76"

View File

@ -1,7 +1,7 @@
[package] [package]
name = "kcl-derive-docs" name = "kcl-derive-docs"
description = "A tool for generating documentation from Rust derive macros" description = "A tool for generating documentation from Rust derive macros"
version = "0.1.54" version = "0.1.55"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app" repository = "https://github.com/KittyCAD/modeling-app"

View File

@ -1,7 +1,7 @@
[package] [package]
name = "kcl-directory-test-macro" name = "kcl-directory-test-macro"
description = "A tool for generating tests from a directory of kcl files" description = "A tool for generating tests from a directory of kcl files"
version = "0.1.54" version = "0.1.55"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app" repository = "https://github.com/KittyCAD/modeling-app"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "kcl-language-server-release" name = "kcl-language-server-release"
version = "0.1.54" version = "0.1.55"
edition = "2021" edition = "2021"
authors = ["KittyCAD Inc <kcl@kittycad.io>"] authors = ["KittyCAD Inc <kcl@kittycad.io>"]
publish = false publish = false

View File

@ -2,7 +2,7 @@
name = "kcl-language-server" name = "kcl-language-server"
description = "A language server for KCL." description = "A language server for KCL."
authors = ["KittyCAD Inc <kcl@kittycad.io>"] authors = ["KittyCAD Inc <kcl@kittycad.io>"]
version = "0.2.54" version = "0.2.55"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,7 +1,7 @@
[package] [package]
name = "kcl-lib" name = "kcl-lib"
description = "KittyCAD Language implementation and tools" description = "KittyCAD Language implementation and tools"
version = "0.2.54" version = "0.2.55"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app" repository = "https://github.com/KittyCAD/modeling-app"

View File

@ -158,13 +158,13 @@ fn named_view_point_version_one() -> f64 {
#[ts(export)] #[ts(export)]
pub struct NamedView { pub struct NamedView {
/// User defined name to identify the named view. A label. /// User defined name to identify the named view. A label.
#[serde(default, alias = "name", skip_serializing_if = "is_default")] #[serde(default, alias = "name")]
pub name: String, pub name: String,
/// Engine camera eye off set /// Engine camera eye off set
#[serde(default, alias = "eyeOffset", skip_serializing_if = "is_default")] #[serde(default, alias = "eyeOffset")]
pub eye_offset: f64, pub eye_offset: f64,
/// Engine camera vertical FOV /// Engine camera vertical FOV
#[serde(default, alias = "fovY", skip_serializing_if = "is_default")] #[serde(default, alias = "fovY")]
pub fov_y: f64, pub fov_y: f64,
// Engine camera is orthographic or perspective projection // Engine camera is orthographic or perspective projection
#[serde(default, alias = "isOrtho")] #[serde(default, alias = "isOrtho")]
@ -173,16 +173,16 @@ pub struct NamedView {
#[serde(default, alias = "orthoScaleEnabled")] #[serde(default, alias = "orthoScaleEnabled")]
pub ortho_scale_enabled: bool, pub ortho_scale_enabled: bool,
/// Engine camera orthographic scaling factor /// Engine camera orthographic scaling factor
#[serde(default, alias = "orthoScaleFactor", skip_serializing_if = "is_default")] #[serde(default, alias = "orthoScaleFactor")]
pub ortho_scale_factor: f64, pub ortho_scale_factor: f64,
/// Engine camera position that the camera pivots around /// Engine camera position that the camera pivots around
#[serde(default, alias = "pivotPosition", skip_serializing_if = "is_default")] #[serde(default, alias = "pivotPosition")]
pub pivot_position: [f64; 3], pub pivot_position: [f64; 3],
/// Engine camera orientation in relation to the pivot position /// Engine camera orientation in relation to the pivot position
#[serde(default, alias = "pivotRotation", skip_serializing_if = "is_default")] #[serde(default, alias = "pivotRotation")]
pub pivot_rotation: [f64; 4], pub pivot_rotation: [f64; 4],
/// Engine camera world coordinate system orientation /// Engine camera world coordinate system orientation
#[serde(default, alias = "worldCoordSystem", skip_serializing_if = "is_default")] #[serde(default, alias = "worldCoordSystem")]
pub world_coord_system: String, pub world_coord_system: String,
/// Version number of the view point if the engine camera API changes /// Version number of the view point if the engine camera API changes
#[serde(default = "named_view_point_version_one")] #[serde(default = "named_view_point_version_one")]

View File

@ -1,81 +1,81 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[326, 423, 0]"] 2["Path<br>[324, 421, 0]"]
3["Segment<br>[431, 536, 0]"] 3["Segment<br>[429, 534, 0]"]
4["Segment<br>[544, 653, 0]"] 4["Segment<br>[542, 651, 0]"]
5["Segment<br>[661, 693, 0]"] 5["Segment<br>[659, 691, 0]"]
6["Segment<br>[701, 810, 0]"] 6["Segment<br>[699, 808, 0]"]
7["Segment<br>[818, 865, 0]"] 7["Segment<br>[816, 863, 0]"]
8["Segment<br>[873, 921, 0]"] 8["Segment<br>[871, 919, 0]"]
9["Segment<br>[929, 978, 0]"] 9["Segment<br>[927, 976, 0]"]
10["Segment<br>[986, 1103, 0]"] 10["Segment<br>[984, 1101, 0]"]
11["Segment<br>[1111, 1159, 0]"] 11["Segment<br>[1109, 1157, 0]"]
12["Segment<br>[1167, 1275, 0]"] 12["Segment<br>[1165, 1273, 0]"]
13["Segment<br>[1283, 1332, 0]"] 13["Segment<br>[1281, 1330, 0]"]
14["Segment<br>[1340, 1389, 0]"] 14["Segment<br>[1338, 1387, 0]"]
15["Segment<br>[1397, 1430, 0]"] 15["Segment<br>[1395, 1428, 0]"]
16["Segment<br>[1438, 1547, 0]"] 16["Segment<br>[1436, 1545, 0]"]
17["Segment<br>[1555, 1587, 0]"] 17["Segment<br>[1553, 1585, 0]"]
18["Segment<br>[1595, 1704, 0]"] 18["Segment<br>[1593, 1702, 0]"]
19["Segment<br>[1712, 1815, 0]"] 19["Segment<br>[1710, 1813, 0]"]
20["Segment<br>[1856, 1966, 0]"] 20["Segment<br>[1854, 1964, 0]"]
21["Segment<br>[1974, 2006, 0]"] 21["Segment<br>[1972, 2004, 0]"]
22["Segment<br>[2014, 2124, 0]"] 22["Segment<br>[2012, 2122, 0]"]
23["Segment<br>[2132, 2179, 0]"] 23["Segment<br>[2130, 2177, 0]"]
24["Segment<br>[2187, 2237, 0]"] 24["Segment<br>[2185, 2235, 0]"]
25["Segment<br>[2245, 2295, 0]"] 25["Segment<br>[2243, 2293, 0]"]
26["Segment<br>[2313, 2442, 0]"] 26["Segment<br>[2311, 2440, 0]"]
27["Segment<br>[2460, 2509, 0]"] 27["Segment<br>[2458, 2507, 0]"]
28["Segment<br>[2523, 2637, 0]"] 28["Segment<br>[2521, 2635, 0]"]
29["Segment<br>[2651, 2701, 0]"] 29["Segment<br>[2649, 2699, 0]"]
30["Segment<br>[2715, 2764, 0]"] 30["Segment<br>[2713, 2762, 0]"]
31["Segment<br>[2772, 2805, 0]"] 31["Segment<br>[2770, 2803, 0]"]
32["Segment<br>[2813, 2923, 0]"] 32["Segment<br>[2811, 2921, 0]"]
33["Segment<br>[2931, 2963, 0]"] 33["Segment<br>[2929, 2961, 0]"]
34["Segment<br>[2971, 3081, 0]"] 34["Segment<br>[2969, 3079, 0]"]
35["Segment<br>[3122, 3224, 0]"] 35["Segment<br>[3120, 3222, 0]"]
36["Segment<br>[3232, 3342, 0]"] 36["Segment<br>[3230, 3340, 0]"]
37["Segment<br>[3350, 3383, 0]"] 37["Segment<br>[3348, 3381, 0]"]
38["Segment<br>[3391, 3501, 0]"] 38["Segment<br>[3389, 3499, 0]"]
39["Segment<br>[3509, 3558, 0]"] 39["Segment<br>[3507, 3556, 0]"]
40["Segment<br>[3566, 3616, 0]"] 40["Segment<br>[3564, 3614, 0]"]
41["Segment<br>[3624, 3673, 0]"] 41["Segment<br>[3622, 3671, 0]"]
42["Segment<br>[3681, 3809, 0]"] 42["Segment<br>[3679, 3807, 0]"]
43["Segment<br>[3817, 3867, 0]"] 43["Segment<br>[3815, 3865, 0]"]
44["Segment<br>[3875, 3990, 0]"] 44["Segment<br>[3873, 3988, 0]"]
45["Segment<br>[3998, 4047, 0]"] 45["Segment<br>[3996, 4045, 0]"]
46["Segment<br>[4055, 4104, 0]"] 46["Segment<br>[4053, 4102, 0]"]
47["Segment<br>[4112, 4146, 0]"] 47["Segment<br>[4110, 4144, 0]"]
48["Segment<br>[4154, 4264, 0]"] 48["Segment<br>[4152, 4262, 0]"]
49["Segment<br>[4272, 4305, 0]"] 49["Segment<br>[4270, 4303, 0]"]
50["Segment<br>[4313, 4423, 0]"] 50["Segment<br>[4311, 4421, 0]"]
51["Segment<br>[4431, 4535, 0]"] 51["Segment<br>[4429, 4533, 0]"]
52["Segment<br>[4576, 4686, 0]"] 52["Segment<br>[4574, 4684, 0]"]
53["Segment<br>[4694, 4727, 0]"] 53["Segment<br>[4692, 4725, 0]"]
54["Segment<br>[4735, 4845, 0]"] 54["Segment<br>[4733, 4843, 0]"]
55["Segment<br>[4853, 4902, 0]"] 55["Segment<br>[4851, 4900, 0]"]
56["Segment<br>[4910, 4959, 0]"] 56["Segment<br>[4908, 4957, 0]"]
57["Segment<br>[4967, 5016, 0]"] 57["Segment<br>[4965, 5014, 0]"]
58["Segment<br>[5024, 5143, 0]"] 58["Segment<br>[5022, 5141, 0]"]
59["Segment<br>[5151, 5201, 0]"] 59["Segment<br>[5149, 5199, 0]"]
60["Segment<br>[5209, 5317, 0]"] 60["Segment<br>[5207, 5315, 0]"]
61["Segment<br>[5325, 5374, 0]"] 61["Segment<br>[5323, 5372, 0]"]
62["Segment<br>[5382, 5432, 0]"] 62["Segment<br>[5380, 5430, 0]"]
63["Segment<br>[5440, 5474, 0]"] 63["Segment<br>[5438, 5472, 0]"]
64["Segment<br>[5482, 5592, 0]"] 64["Segment<br>[5480, 5590, 0]"]
65["Segment<br>[5600, 5633, 0]"] 65["Segment<br>[5598, 5631, 0]"]
66["Segment<br>[5641, 5751, 0]"] 66["Segment<br>[5639, 5749, 0]"]
67["Segment<br>[5759, 5766, 0]"] 67["Segment<br>[5757, 5764, 0]"]
68[Solid2d] 68[Solid2d]
end end
subgraph path69 [Path] subgraph path69 [Path]
69["Path<br>[5817, 5994, 0]"] 69["Path<br>[5815, 5993, 0]"]
70["Segment<br>[5817, 5994, 0]"] 70["Segment<br>[5815, 5993, 0]"]
71[Solid2d] 71[Solid2d]
end end
1["Plane<br>[298, 318, 0]"] 1["Plane<br>[298, 316, 0]"]
72["Sweep Extrusion<br>[6006, 6034, 0]"] 72["Sweep Extrusion<br>[6005, 6033, 0]"]
73[Wall] 73[Wall]
74[Wall] 74[Wall]
75[Wall] 75[Wall]
@ -270,38 +270,38 @@ flowchart LR
264["SweepEdge Adjacent"] 264["SweepEdge Adjacent"]
265["SweepEdge Opposite"] 265["SweepEdge Opposite"]
266["SweepEdge Adjacent"] 266["SweepEdge Adjacent"]
267["EdgeCut Fillet<br>[6042, 6746, 0]"] 267["EdgeCut Fillet<br>[6041, 6746, 0]"]
268["EdgeCut Fillet<br>[6042, 6746, 0]"] 268["EdgeCut Fillet<br>[6041, 6746, 0]"]
269["EdgeCut Fillet<br>[6042, 6746, 0]"] 269["EdgeCut Fillet<br>[6041, 6746, 0]"]
270["EdgeCut Fillet<br>[6042, 6746, 0]"] 270["EdgeCut Fillet<br>[6041, 6746, 0]"]
271["EdgeCut Fillet<br>[6042, 6746, 0]"] 271["EdgeCut Fillet<br>[6041, 6746, 0]"]
272["EdgeCut Fillet<br>[6042, 6746, 0]"] 272["EdgeCut Fillet<br>[6041, 6746, 0]"]
273["EdgeCut Fillet<br>[6042, 6746, 0]"] 273["EdgeCut Fillet<br>[6041, 6746, 0]"]
274["EdgeCut Fillet<br>[6042, 6746, 0]"] 274["EdgeCut Fillet<br>[6041, 6746, 0]"]
275["EdgeCut Fillet<br>[6042, 6746, 0]"] 275["EdgeCut Fillet<br>[6041, 6746, 0]"]
276["EdgeCut Fillet<br>[6042, 6746, 0]"] 276["EdgeCut Fillet<br>[6041, 6746, 0]"]
277["EdgeCut Fillet<br>[6042, 6746, 0]"] 277["EdgeCut Fillet<br>[6041, 6746, 0]"]
278["EdgeCut Fillet<br>[6042, 6746, 0]"] 278["EdgeCut Fillet<br>[6041, 6746, 0]"]
279["EdgeCut Fillet<br>[6042, 6746, 0]"] 279["EdgeCut Fillet<br>[6041, 6746, 0]"]
280["EdgeCut Fillet<br>[6042, 6746, 0]"] 280["EdgeCut Fillet<br>[6041, 6746, 0]"]
281["EdgeCut Fillet<br>[6042, 6746, 0]"] 281["EdgeCut Fillet<br>[6041, 6746, 0]"]
282["EdgeCut Fillet<br>[6042, 6746, 0]"] 282["EdgeCut Fillet<br>[6041, 6746, 0]"]
283["EdgeCut Fillet<br>[6754, 7457, 0]"] 283["EdgeCut Fillet<br>[6754, 7458, 0]"]
284["EdgeCut Fillet<br>[6754, 7457, 0]"] 284["EdgeCut Fillet<br>[6754, 7458, 0]"]
285["EdgeCut Fillet<br>[6754, 7457, 0]"] 285["EdgeCut Fillet<br>[6754, 7458, 0]"]
286["EdgeCut Fillet<br>[6754, 7457, 0]"] 286["EdgeCut Fillet<br>[6754, 7458, 0]"]
287["EdgeCut Fillet<br>[6754, 7457, 0]"] 287["EdgeCut Fillet<br>[6754, 7458, 0]"]
288["EdgeCut Fillet<br>[6754, 7457, 0]"] 288["EdgeCut Fillet<br>[6754, 7458, 0]"]
289["EdgeCut Fillet<br>[6754, 7457, 0]"] 289["EdgeCut Fillet<br>[6754, 7458, 0]"]
290["EdgeCut Fillet<br>[6754, 7457, 0]"] 290["EdgeCut Fillet<br>[6754, 7458, 0]"]
291["EdgeCut Fillet<br>[6754, 7457, 0]"] 291["EdgeCut Fillet<br>[6754, 7458, 0]"]
292["EdgeCut Fillet<br>[6754, 7457, 0]"] 292["EdgeCut Fillet<br>[6754, 7458, 0]"]
293["EdgeCut Fillet<br>[6754, 7457, 0]"] 293["EdgeCut Fillet<br>[6754, 7458, 0]"]
294["EdgeCut Fillet<br>[6754, 7457, 0]"] 294["EdgeCut Fillet<br>[6754, 7458, 0]"]
295["EdgeCut Fillet<br>[6754, 7457, 0]"] 295["EdgeCut Fillet<br>[6754, 7458, 0]"]
296["EdgeCut Fillet<br>[6754, 7457, 0]"] 296["EdgeCut Fillet<br>[6754, 7458, 0]"]
297["EdgeCut Fillet<br>[6754, 7457, 0]"] 297["EdgeCut Fillet<br>[6754, 7458, 0]"]
298["EdgeCut Fillet<br>[6754, 7457, 0]"] 298["EdgeCut Fillet<br>[6754, 7458, 0]"]
1 --- 2 1 --- 2
1 --- 69 1 --- 69
2 --- 3 2 --- 3

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ description: Operations executed 80-20-rail.kcl
"name": "rail8020", "name": "rail8020",
"functionSourceRange": [ "functionSourceRange": [
214, 214,
7478, 7479,
0 0
], ],
"unlabeledArg": null, "unlabeledArg": null,
@ -19,8 +19,8 @@ description: Operations executed 80-20-rail.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "-XZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }

View File

@ -1,30 +1,30 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[971, 1015, 0]"] 2["Path<br>[969, 1013, 0]"]
3["Segment<br>[1021, 1065, 0]"] 3["Segment<br>[1019, 1063, 0]"]
4["Segment<br>[1071, 1114, 0]"] 4["Segment<br>[1069, 1112, 0]"]
5["Segment<br>[1120, 1164, 0]"] 5["Segment<br>[1118, 1162, 0]"]
6["Segment<br>[1170, 1177, 0]"] 6["Segment<br>[1168, 1175, 0]"]
7[Solid2d] 7[Solid2d]
end end
subgraph path23 [Path] subgraph path23 [Path]
23["Path<br>[1262, 1406, 0]"] 23["Path<br>[1257, 1404, 0]"]
24["Segment<br>[1262, 1406, 0]"] 24["Segment<br>[1257, 1404, 0]"]
25[Solid2d] 25[Solid2d]
end end
subgraph path34 [Path] subgraph path34 [Path]
34["Path<br>[1706, 1862, 0]"] 34["Path<br>[1653, 1802, 0]"]
35["Segment<br>[1706, 1862, 0]"] 35["Segment<br>[1653, 1802, 0]"]
36[Solid2d] 36[Solid2d]
end end
subgraph path44 [Path] subgraph path44 [Path]
44["Path<br>[2165, 2230, 0]"] 44["Path<br>[2055, 2103, 0]"]
45["Segment<br>[2165, 2230, 0]"] 45["Segment<br>[2055, 2103, 0]"]
46[Solid2d] 46[Solid2d]
end end
1["Plane<br>[946, 965, 0]"] 1["Plane<br>[946, 963, 0]"]
8["Sweep Extrusion<br>[1183, 1207, 0]"] 8["Sweep Extrusion<br>[1181, 1205, 0]"]
9[Wall] 9[Wall]
10[Wall] 10[Wall]
11[Wall] 11[Wall]
@ -39,28 +39,28 @@ flowchart LR
20["SweepEdge Adjacent"] 20["SweepEdge Adjacent"]
21["SweepEdge Opposite"] 21["SweepEdge Opposite"]
22["SweepEdge Adjacent"] 22["SweepEdge Adjacent"]
26["Sweep Extrusion<br>[1622, 1651, 0]"] 26["Sweep Extrusion<br>[1569, 1598, 0]"]
27[Wall] 27[Wall]
28["Cap Start"] 28["Cap Start"]
29["SweepEdge Opposite"] 29["SweepEdge Opposite"]
30["SweepEdge Adjacent"] 30["SweepEdge Adjacent"]
31["Sweep Extrusion<br>[1622, 1651, 0]"] 31["Sweep Extrusion<br>[1569, 1598, 0]"]
32["Sweep Extrusion<br>[1622, 1651, 0]"] 32["Sweep Extrusion<br>[1569, 1598, 0]"]
33["Sweep Extrusion<br>[1622, 1651, 0]"] 33["Sweep Extrusion<br>[1569, 1598, 0]"]
37["Sweep Extrusion<br>[2077, 2112, 0]"] 37["Sweep Extrusion<br>[1967, 2002, 0]"]
38[Wall] 38[Wall]
39["SweepEdge Opposite"] 39["SweepEdge Opposite"]
40["SweepEdge Adjacent"] 40["SweepEdge Adjacent"]
41["Sweep Extrusion<br>[2077, 2112, 0]"] 41["Sweep Extrusion<br>[1967, 2002, 0]"]
42["Sweep Extrusion<br>[2077, 2112, 0]"] 42["Sweep Extrusion<br>[1967, 2002, 0]"]
43["Sweep Extrusion<br>[2077, 2112, 0]"] 43["Sweep Extrusion<br>[1967, 2002, 0]"]
47["Sweep Extrusion<br>[2236, 2261, 0]"] 47["Sweep Extrusion<br>[2109, 2134, 0]"]
48[Wall] 48[Wall]
49["SweepEdge Opposite"] 49["SweepEdge Opposite"]
50["SweepEdge Adjacent"] 50["SweepEdge Adjacent"]
51["StartSketchOnFace<br>[1224, 1256, 0]"] 51["StartSketchOnFace<br>[1219, 1251, 0]"]
52["StartSketchOnFace<br>[1666, 1700, 0]"] 52["StartSketchOnFace<br>[1613, 1647, 0]"]
53["StartSketchOnFace<br>[2127, 2159, 0]"] 53["StartSketchOnFace<br>[2017, 2049, 0]"]
1 --- 2 1 --- 2
2 --- 3 2 --- 3
2 --- 4 2 --- 4

View File

@ -7,8 +7,8 @@ description: Operations executed a-parametric-bearing-pillow-block.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "XY" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }

View File

@ -1,58 +1,58 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[733, 816, 0]"] 2["Path<br>[731, 793, 0]"]
3["Segment<br>[733, 816, 0]"] 3["Segment<br>[731, 793, 0]"]
4[Solid2d] 4[Solid2d]
end end
subgraph path5 [Path] subgraph path5 [Path]
5["Path<br>[827, 894, 0]"] 5["Path<br>[804, 850, 0]"]
6["Segment<br>[827, 894, 0]"] 6["Segment<br>[804, 850, 0]"]
7[Solid2d] 7[Solid2d]
end end
subgraph path15 [Path] subgraph path15 [Path]
15["Path<br>[1083, 1139, 0]"] 15["Path<br>[1037, 1093, 0]"]
16["Segment<br>[1145, 1237, 0]"] 16["Segment<br>[1099, 1191, 0]"]
17["Segment<br>[1243, 1250, 0]"] 17["Segment<br>[1197, 1204, 0]"]
18[Solid2d] 18[Solid2d]
end end
subgraph path24 [Path] subgraph path24 [Path]
24["Path<br>[1623, 1756, 0]"] 24["Path<br>[1576, 1709, 0]"]
25["Segment<br>[1762, 1855, 0]"] 25["Segment<br>[1715, 1808, 0]"]
26["Segment<br>[1861, 1892, 0]"] 26["Segment<br>[1814, 1845, 0]"]
27["Segment<br>[1898, 1926, 0]"] 27["Segment<br>[1851, 1879, 0]"]
28["Segment<br>[1932, 1939, 0]"] 28["Segment<br>[1885, 1892, 0]"]
29[Solid2d] 29[Solid2d]
end end
subgraph path40 [Path] subgraph path40 [Path]
40["Path<br>[2276, 2417, 0]"] 40["Path<br>[2228, 2370, 0]"]
41["Segment<br>[2276, 2417, 0]"] 41["Segment<br>[2228, 2370, 0]"]
42[Solid2d] 42[Solid2d]
end end
subgraph path50 [Path] subgraph path50 [Path]
50["Path<br>[2814, 2888, 0]"] 50["Path<br>[2766, 2819, 0]"]
51["Segment<br>[2814, 2888, 0]"] 51["Segment<br>[2766, 2819, 0]"]
52[Solid2d] 52[Solid2d]
end end
subgraph path53 [Path] subgraph path53 [Path]
53["Path<br>[2899, 2994, 0]"] 53["Path<br>[2830, 2904, 0]"]
54["Segment<br>[2899, 2994, 0]"] 54["Segment<br>[2830, 2904, 0]"]
55[Solid2d] 55[Solid2d]
end end
1["Plane<br>[677, 726, 0]"] 1["Plane<br>[677, 724, 0]"]
8["Sweep Extrusion<br>[949, 1001, 0]"] 8["Sweep Extrusion<br>[905, 957, 0]"]
9[Wall] 9[Wall]
10["Cap Start"] 10["Cap Start"]
11["Cap End"] 11["Cap End"]
12["SweepEdge Opposite"] 12["SweepEdge Opposite"]
13["SweepEdge Adjacent"] 13["SweepEdge Adjacent"]
14["Plane<br>[1058, 1077, 0]"] 14["Plane<br>[1014, 1031, 0]"]
19["Sweep Revolve<br>[1332, 1364, 0]"] 19["Sweep Revolve<br>[1286, 1318, 0]"]
20[Wall] 20[Wall]
21[Wall] 21[Wall]
22["SweepEdge Adjacent"] 22["SweepEdge Adjacent"]
23["Plane<br>[1598, 1617, 0]"] 23["Plane<br>[1553, 1570, 0]"]
30["Sweep Revolve<br>[1981, 2013, 0]"] 30["Sweep Revolve<br>[1934, 1966, 0]"]
31[Wall] 31[Wall]
32[Wall] 32[Wall]
33[Wall] 33[Wall]
@ -61,22 +61,22 @@ flowchart LR
36["SweepEdge Adjacent"] 36["SweepEdge Adjacent"]
37["SweepEdge Adjacent"] 37["SweepEdge Adjacent"]
38["SweepEdge Adjacent"] 38["SweepEdge Adjacent"]
39["Plane<br>[2251, 2270, 0]"] 39["Plane<br>[2205, 2222, 0]"]
43["Sweep Revolve<br>[2460, 2513, 0]"] 43["Sweep Revolve<br>[2413, 2466, 0]"]
44[Wall] 44[Wall]
45["Cap Start"] 45["Cap Start"]
46["Cap End"] 46["Cap End"]
47["SweepEdge Opposite"] 47["SweepEdge Opposite"]
48["SweepEdge Adjacent"] 48["SweepEdge Adjacent"]
49["Plane<br>[2758, 2807, 0]"] 49["Plane<br>[2712, 2759, 0]"]
56["Sweep Extrusion<br>[3014, 3067, 0]"] 56["Sweep Extrusion<br>[2924, 2977, 0]"]
57[Wall] 57[Wall]
58["Cap Start"] 58["Cap Start"]
59["Cap End"] 59["Cap End"]
60["SweepEdge Opposite"] 60["SweepEdge Opposite"]
61["SweepEdge Adjacent"] 61["SweepEdge Adjacent"]
62["StartSketchOnPlane<br>[663, 727, 0]"] 62["StartSketchOnPlane<br>[663, 725, 0]"]
63["StartSketchOnPlane<br>[2744, 2808, 0]"] 63["StartSketchOnPlane<br>[2698, 2760, 0]"]
1 --- 2 1 --- 2
1 --- 5 1 --- 5
2 --- 3 2 --- 3

File diff suppressed because it is too large Load Diff

View File

@ -21,8 +21,8 @@ description: Operations executed ball-bearing.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "XY" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -224,8 +224,8 @@ description: Operations executed ball-bearing.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "XY" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -411,8 +411,8 @@ description: Operations executed ball-bearing.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "XY" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -613,8 +613,8 @@ description: Operations executed ball-bearing.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "XZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -878,8 +878,8 @@ description: Operations executed ball-bearing.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "XY" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }

View File

@ -1853,8 +1853,8 @@ description: Artifact commands bench.kcl
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": -1.0, "x": -1.0,
"y": 0.0, "y": -0.0,
"z": 0.0 "z": -0.0
} }
} }
}, },
@ -2244,8 +2244,8 @@ description: Artifact commands bench.kcl
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": -1.0, "x": -1.0,
"y": 0.0, "y": -0.0,
"z": 0.0 "z": -0.0
} }
} }
}, },
@ -2694,8 +2694,8 @@ description: Artifact commands bench.kcl
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": -1.0, "x": -1.0,
"y": 0.0, "y": -0.0,
"z": 0.0 "z": -0.0
} }
} }
}, },
@ -3085,8 +3085,8 @@ description: Artifact commands bench.kcl
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": -1.0, "x": -1.0,
"y": 0.0, "y": -0.0,
"z": 0.0 "z": -0.0
} }
} }
}, },
@ -7461,8 +7461,8 @@ description: Artifact commands bench.kcl
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": -1.0, "x": -1.0,
"y": 0.0, "y": -0.0,
"z": 0.0 "z": -0.0
} }
} }
}, },
@ -7546,7 +7546,7 @@ description: Artifact commands bench.kcl
"z": 0.0 "z": 0.0
}, },
"x_axis": { "x_axis": {
"x": -1.0, "x": 1.0,
"y": 0.0, "y": 0.0,
"z": 0.0 "z": 0.0
}, },
@ -7584,9 +7584,9 @@ description: Artifact commands bench.kcl
"animated": false, "animated": false,
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": 0.0, "x": -0.0,
"y": 1.0, "y": 1.0,
"z": 0.0 "z": -0.0
} }
} }
}, },
@ -7945,8 +7945,8 @@ description: Artifact commands bench.kcl
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": -1.0, "x": -1.0,
"y": 0.0, "y": -0.0,
"z": 0.0 "z": -0.0
} }
} }
}, },
@ -8030,7 +8030,7 @@ description: Artifact commands bench.kcl
"z": 0.0 "z": 0.0
}, },
"x_axis": { "x_axis": {
"x": -1.0, "x": 1.0,
"y": 0.0, "y": 0.0,
"z": 0.0 "z": 0.0
}, },
@ -8068,9 +8068,9 @@ description: Artifact commands bench.kcl
"animated": false, "animated": false,
"adjust_camera": false, "adjust_camera": false,
"planar_normal": { "planar_normal": {
"x": 0.0, "x": -0.0,
"y": 1.0, "y": 1.0,
"z": 0.0 "z": -0.0
} }
} }
}, },

View File

@ -360,7 +360,7 @@ flowchart LR
172["SweepEdge Adjacent"] 172["SweepEdge Adjacent"]
173["SweepEdge Opposite"] 173["SweepEdge Opposite"]
174["SweepEdge Adjacent"] 174["SweepEdge Adjacent"]
175["Plane<br>[825, 869, 0]"] 175["Plane<br>[823, 865, 0]"]
199["Sweep Extrusion<br>[1379, 1417, 4]"] 199["Sweep Extrusion<br>[1379, 1417, 4]"]
200[Wall] 200[Wall]
201[Wall] 201[Wall]
@ -487,7 +487,7 @@ flowchart LR
345["SweepEdge Adjacent"] 345["SweepEdge Adjacent"]
346["SweepEdge Opposite"] 346["SweepEdge Opposite"]
347["SweepEdge Adjacent"] 347["SweepEdge Adjacent"]
348["Plane<br>[879, 922, 0]"] 348["Plane<br>[875, 916, 0]"]
372["Sweep Extrusion<br>[1379, 1417, 4]"] 372["Sweep Extrusion<br>[1379, 1417, 4]"]
373[Wall] 373[Wall]
374[Wall] 374[Wall]
@ -614,7 +614,7 @@ flowchart LR
518["SweepEdge Adjacent"] 518["SweepEdge Adjacent"]
519["SweepEdge Opposite"] 519["SweepEdge Opposite"]
520["SweepEdge Adjacent"] 520["SweepEdge Adjacent"]
521["Plane<br>[981, 1025, 0]"] 521["Plane<br>[975, 1017, 0]"]
532["Sweep Extrusion<br>[1949, 1973, 4]"] 532["Sweep Extrusion<br>[1949, 1973, 4]"]
533[Wall] 533[Wall]
534[Wall] 534[Wall]
@ -657,7 +657,7 @@ flowchart LR
581["SweepEdge Adjacent"] 581["SweepEdge Adjacent"]
582["SweepEdge Opposite"] 582["SweepEdge Opposite"]
583["SweepEdge Adjacent"] 583["SweepEdge Adjacent"]
584["Plane<br>[1076, 1143, 0]"] 584["Plane<br>[1068, 1135, 0]"]
594["Sweep Extrusion<br>[2523, 2547, 4]"] 594["Sweep Extrusion<br>[2523, 2547, 4]"]
595[Wall] 595[Wall]
596[Wall] 596[Wall]
@ -681,7 +681,7 @@ flowchart LR
614["SweepEdge Adjacent"] 614["SweepEdge Adjacent"]
615["Sweep Extrusion<br>[2523, 2547, 4]"] 615["Sweep Extrusion<br>[2523, 2547, 4]"]
616["Sweep Extrusion<br>[2523, 2547, 4]"] 616["Sweep Extrusion<br>[2523, 2547, 4]"]
617["Plane<br>[1213, 1280, 0]"] 617["Plane<br>[1205, 1272, 0]"]
627["Sweep Extrusion<br>[3047, 3071, 4]"] 627["Sweep Extrusion<br>[3047, 3071, 4]"]
628[Wall] 628[Wall]
629[Wall] 629[Wall]
@ -705,8 +705,8 @@ flowchart LR
647["SweepEdge Adjacent"] 647["SweepEdge Adjacent"]
648["Sweep Extrusion<br>[3047, 3071, 4]"] 648["Sweep Extrusion<br>[3047, 3071, 4]"]
649["Plane<br>[3712, 3747, 4]"] 649["Plane<br>[3712, 3747, 4]"]
653["Plane<br>[3778, 3809, 4]"] 653["Plane<br>[3778, 3807, 4]"]
663["Sweep Sweep<br>[3821, 3848, 4]"] 663["Sweep Sweep<br>[3819, 3846, 4]"]
664[Wall] 664[Wall]
665[Wall] 665[Wall]
666[Wall] 666[Wall]
@ -731,8 +731,8 @@ flowchart LR
685["SweepEdge Opposite"] 685["SweepEdge Opposite"]
686["SweepEdge Adjacent"] 686["SweepEdge Adjacent"]
687["Plane<br>[3712, 3747, 4]"] 687["Plane<br>[3712, 3747, 4]"]
691["Plane<br>[3778, 3809, 4]"] 691["Plane<br>[3778, 3807, 4]"]
701["Sweep Sweep<br>[3821, 3848, 4]"] 701["Sweep Sweep<br>[3819, 3846, 4]"]
702[Wall] 702[Wall]
703[Wall] 703[Wall]
704[Wall] 704[Wall]

View File

@ -232,13 +232,20 @@ description: Result of parsing bench.kcl
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"abs_path": false,
"commentStart": 811, "commentStart": 811,
"end": 0, "end": 0,
"raw": "\"YZ\"", "name": {
"commentStart": 811,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0, "start": 0,
"type": "Literal", "type": "Name",
"type": "Literal", "type": "Name"
"value": "YZ"
} }
], ],
"callee": { "callee": {
@ -272,7 +279,7 @@ description: Result of parsing bench.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 817, "commentStart": 815,
"end": 0, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
@ -281,21 +288,21 @@ description: Result of parsing bench.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 844, "commentStart": 840,
"end": 0, "end": 0,
"name": "offset", "name": "offset",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 853, "commentStart": 849,
"end": 0, "end": 0,
"left": { "left": {
"abs_path": false, "abs_path": false,
"commentStart": 853, "commentStart": 849,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 853, "commentStart": 849,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -308,7 +315,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 867, "commentStart": 863,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -327,10 +334,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 825, "commentStart": 823,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 825, "commentStart": 823,
"end": 0, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 0, "start": 0,
@ -340,28 +347,43 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 825, "commentStart": 823,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 837, "argument": {
"abs_path": false,
"commentStart": 836,
"end": 0,
"name": {
"commentStart": 836,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 835,
"end": 0, "end": 0,
"raw": "\"-YZ\"", "operator": "-",
"start": 0, "start": 0,
"type": "Literal", "type": "UnaryExpression",
"type": "Literal", "type": "UnaryExpression"
"value": "-YZ"
} }
} }
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 817, "commentStart": 815,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 817, "commentStart": 815,
"end": 0, "end": 0,
"name": "divider", "name": "divider",
"start": 0, "start": 0,
@ -371,7 +393,7 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 817, "commentStart": 815,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
@ -382,7 +404,7 @@ description: Result of parsing bench.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 871, "commentStart": 867,
"end": 0, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
@ -391,21 +413,21 @@ description: Result of parsing bench.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 897, "commentStart": 891,
"end": 0, "end": 0,
"name": "offset", "name": "offset",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 906, "commentStart": 900,
"end": 0, "end": 0,
"left": { "left": {
"abs_path": false, "abs_path": false,
"commentStart": 906, "commentStart": 900,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 906, "commentStart": 900,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -418,7 +440,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 920, "commentStart": 914,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -437,10 +459,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 879, "commentStart": 875,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 879, "commentStart": 875,
"end": 0, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 0, "start": 0,
@ -450,28 +472,35 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 879, "commentStart": 875,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 891, "abs_path": false,
"commentStart": 887,
"end": 0, "end": 0,
"raw": "\"YZ\"", "name": {
"commentStart": 887,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0, "start": 0,
"type": "Literal", "type": "Name",
"type": "Literal", "type": "Name"
"value": "YZ"
} }
} }
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 871, "commentStart": 867,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 871, "commentStart": 867,
"end": 0, "end": 0,
"name": "divider", "name": "divider",
"start": 0, "start": 0,
@ -481,7 +510,7 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 871, "commentStart": 867,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
@ -492,7 +521,7 @@ description: Result of parsing bench.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 923, "commentStart": 917,
"end": 0, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
@ -501,22 +530,22 @@ description: Result of parsing bench.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 999, "commentStart": 991,
"end": 0, "end": 0,
"name": "offset", "name": "offset",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 1008, "commentStart": 1000,
"end": 0, "end": 0,
"left": { "left": {
"argument": { "argument": {
"abs_path": false, "abs_path": false,
"commentStart": 1009, "commentStart": 1001,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1009, "commentStart": 1001,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -527,7 +556,7 @@ description: Result of parsing bench.kcl
"type": "Name", "type": "Name",
"type": "Name" "type": "Name"
}, },
"commentStart": 1008, "commentStart": 1000,
"end": 0, "end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 0,
@ -536,7 +565,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 1023, "commentStart": 1015,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -555,10 +584,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 981, "commentStart": 975,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 981, "commentStart": 975,
"end": 0, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 0, "start": 0,
@ -568,27 +597,34 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 981, "commentStart": 975,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 993, "abs_path": false,
"commentStart": 987,
"end": 0, "end": 0,
"raw": "\"YZ\"", "name": {
"commentStart": 987,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0, "start": 0,
"type": "Literal", "type": "Name",
"type": "Literal", "type": "Name"
"value": "YZ"
} }
}, },
{ {
"abs_path": false, "abs_path": false,
"commentStart": 1027, "commentStart": 1019,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1027, "commentStart": 1019,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -602,10 +638,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 971, "commentStart": 965,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 971, "commentStart": 965,
"end": 0, "end": 0,
"name": "connector", "name": "connector",
"start": 0, "start": 0,
@ -615,7 +651,7 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 971, "commentStart": 965,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
@ -631,7 +667,7 @@ description: Result of parsing bench.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 1039, "commentStart": 1031,
"end": 0, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
@ -640,25 +676,25 @@ description: Result of parsing bench.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 1094, "commentStart": 1084,
"end": 0, "end": 0,
"name": "offset", "name": "offset",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 1103, "commentStart": 1093,
"end": 0, "end": 0,
"left": { "left": {
"commentStart": 1103, "commentStart": 1093,
"end": 0, "end": 0,
"left": { "left": {
"argument": { "argument": {
"abs_path": false, "abs_path": false,
"commentStart": 1104, "commentStart": 1094,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1104, "commentStart": 1094,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -669,7 +705,7 @@ description: Result of parsing bench.kcl
"type": "Name", "type": "Name",
"type": "Name" "type": "Name"
}, },
"commentStart": 1103, "commentStart": 1093,
"end": 0, "end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 0,
@ -678,7 +714,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 1118, "commentStart": 1108,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -695,14 +731,14 @@ description: Result of parsing bench.kcl
}, },
"operator": "-", "operator": "-",
"right": { "right": {
"commentStart": 1122, "commentStart": 1113,
"end": 0, "end": 0,
"left": { "left": {
"abs_path": false, "abs_path": false,
"commentStart": 1122, "commentStart": 1113,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1122, "commentStart": 1113,
"end": 0, "end": 0,
"name": "dividerThickness", "name": "dividerThickness",
"start": 0, "start": 0,
@ -715,7 +751,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 1141, "commentStart": 1132,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -738,10 +774,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 1076, "commentStart": 1068,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1076, "commentStart": 1068,
"end": 0, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 0, "start": 0,
@ -751,30 +787,37 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 1076, "commentStart": 1068,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 1088, "abs_path": false,
"commentStart": 1080,
"end": 0, "end": 0,
"raw": "\"YZ\"", "name": {
"commentStart": 1080,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0, "start": 0,
"type": "Literal", "type": "Name",
"type": "Literal", "type": "Name"
"value": "YZ"
} }
}, },
{ {
"commentStart": 1145, "commentStart": 1137,
"end": 0, "end": 0,
"left": { "left": {
"abs_path": false, "abs_path": false,
"commentStart": 1145, "commentStart": 1137,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1145, "commentStart": 1137,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -788,10 +831,10 @@ description: Result of parsing bench.kcl
"operator": "+", "operator": "+",
"right": { "right": {
"abs_path": false, "abs_path": false,
"commentStart": 1159, "commentStart": 1151,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1159, "commentStart": 1151,
"end": 0, "end": 0,
"name": "dividerThickness", "name": "dividerThickness",
"start": 0, "start": 0,
@ -809,10 +852,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 1066, "commentStart": 1058,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1066, "commentStart": 1058,
"end": 0, "end": 0,
"name": "seatSlats", "name": "seatSlats",
"start": 0, "start": 0,
@ -822,7 +865,7 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 1066, "commentStart": 1058,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
@ -838,7 +881,7 @@ description: Result of parsing bench.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 1176, "commentStart": 1168,
"end": 0, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
@ -847,25 +890,25 @@ description: Result of parsing bench.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 1231, "commentStart": 1221,
"end": 0, "end": 0,
"name": "offset", "name": "offset",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 1240, "commentStart": 1230,
"end": 0, "end": 0,
"left": { "left": {
"commentStart": 1240, "commentStart": 1230,
"end": 0, "end": 0,
"left": { "left": {
"argument": { "argument": {
"abs_path": false, "abs_path": false,
"commentStart": 1241, "commentStart": 1231,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1241, "commentStart": 1231,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -876,7 +919,7 @@ description: Result of parsing bench.kcl
"type": "Name", "type": "Name",
"type": "Name" "type": "Name"
}, },
"commentStart": 1240, "commentStart": 1230,
"end": 0, "end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 0,
@ -885,7 +928,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 1255, "commentStart": 1245,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -902,14 +945,14 @@ description: Result of parsing bench.kcl
}, },
"operator": "-", "operator": "-",
"right": { "right": {
"commentStart": 1259, "commentStart": 1250,
"end": 0, "end": 0,
"left": { "left": {
"abs_path": false, "abs_path": false,
"commentStart": 1259, "commentStart": 1250,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1259, "commentStart": 1250,
"end": 0, "end": 0,
"name": "dividerThickness", "name": "dividerThickness",
"start": 0, "start": 0,
@ -922,7 +965,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 1278, "commentStart": 1269,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -945,10 +988,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 1213, "commentStart": 1205,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1213, "commentStart": 1205,
"end": 0, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 0, "start": 0,
@ -958,30 +1001,37 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 1213, "commentStart": 1205,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 1225, "abs_path": false,
"commentStart": 1217,
"end": 0, "end": 0,
"raw": "\"YZ\"", "name": {
"commentStart": 1217,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0, "start": 0,
"type": "Literal", "type": "Name",
"type": "Literal", "type": "Name"
"value": "YZ"
} }
}, },
{ {
"commentStart": 1282, "commentStart": 1274,
"end": 0, "end": 0,
"left": { "left": {
"abs_path": false, "abs_path": false,
"commentStart": 1282, "commentStart": 1274,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1282, "commentStart": 1274,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -995,10 +1045,10 @@ description: Result of parsing bench.kcl
"operator": "+", "operator": "+",
"right": { "right": {
"abs_path": false, "abs_path": false,
"commentStart": 1296, "commentStart": 1288,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1296, "commentStart": 1288,
"end": 0, "end": 0,
"name": "dividerThickness", "name": "dividerThickness",
"start": 0, "start": 0,
@ -1016,10 +1066,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 1203, "commentStart": 1195,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1203, "commentStart": 1195,
"end": 0, "end": 0,
"name": "backSlats", "name": "backSlats",
"start": 0, "start": 0,
@ -1029,7 +1079,7 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 1203, "commentStart": 1195,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
@ -1045,28 +1095,43 @@ description: Result of parsing bench.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 1313, "commentStart": 1305,
"end": 0, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"commentStart": 1347, "argument": {
"abs_path": false,
"commentStart": 1340,
"end": 0,
"name": {
"commentStart": 1340,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1339,
"end": 0, "end": 0,
"raw": "\"-YZ\"", "operator": "-",
"start": 0, "start": 0,
"type": "Literal", "type": "UnaryExpression",
"type": "Literal", "type": "UnaryExpression"
"value": "-YZ"
}, },
{ {
"commentStart": 1354, "commentStart": 1344,
"end": 0, "end": 0,
"left": { "left": {
"abs_path": false, "abs_path": false,
"commentStart": 1354, "commentStart": 1344,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1354, "commentStart": 1344,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -1079,7 +1144,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 1368, "commentStart": 1358,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -1097,10 +1162,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 1339, "commentStart": 1331,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1339, "commentStart": 1331,
"end": 0, "end": 0,
"name": "armRest", "name": "armRest",
"start": 0, "start": 0,
@ -1110,7 +1175,7 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 1339, "commentStart": 1331,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
@ -1126,29 +1191,44 @@ description: Result of parsing bench.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 1371, "commentStart": 1361,
"end": 0, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"commentStart": 1379, "argument": {
"abs_path": false,
"commentStart": 1370,
"end": 0,
"name": {
"commentStart": 1370,
"end": 0,
"name": "YZ",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1369,
"end": 0, "end": 0,
"raw": "\"-YZ\"", "operator": "-",
"start": 0, "start": 0,
"type": "Literal", "type": "UnaryExpression",
"type": "Literal", "type": "UnaryExpression"
"value": "-YZ"
}, },
{ {
"commentStart": 1386, "commentStart": 1374,
"end": 0, "end": 0,
"left": { "left": {
"argument": { "argument": {
"abs_path": false, "abs_path": false,
"commentStart": 1387, "commentStart": 1375,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1387, "commentStart": 1375,
"end": 0, "end": 0,
"name": "benchLength", "name": "benchLength",
"start": 0, "start": 0,
@ -1159,7 +1239,7 @@ description: Result of parsing bench.kcl
"type": "Name", "type": "Name",
"type": "Name" "type": "Name"
}, },
"commentStart": 1386, "commentStart": 1374,
"end": 0, "end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 0,
@ -1168,7 +1248,7 @@ description: Result of parsing bench.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 1401, "commentStart": 1389,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -1186,10 +1266,10 @@ description: Result of parsing bench.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 1371, "commentStart": 1361,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 1371, "commentStart": 1361,
"end": 0, "end": 0,
"name": "armRest", "name": "armRest",
"start": 0, "start": 0,
@ -1199,7 +1279,7 @@ description: Result of parsing bench.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 1371, "commentStart": 1361,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",

View File

@ -31,8 +31,8 @@ description: Operations executed bench.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -87,8 +87,8 @@ description: Operations executed bench.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -236,8 +236,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "-YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -475,8 +475,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -714,8 +714,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -877,8 +877,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -995,8 +995,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -1094,7 +1094,7 @@ description: Operations executed bench.kcl
"name": "armRest", "name": "armRest",
"functionSourceRange": [ "functionSourceRange": [
3671, 3671,
3861, 3859,
4 4
], ],
"unlabeledArg": null, "unlabeledArg": null,
@ -1119,8 +1119,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "-YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -1179,8 +1179,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "-XZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -1248,7 +1248,7 @@ description: Operations executed bench.kcl
"name": "armRest", "name": "armRest",
"functionSourceRange": [ "functionSourceRange": [
3671, 3671,
3861, 3859,
4 4
], ],
"unlabeledArg": null, "unlabeledArg": null,
@ -1273,8 +1273,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "-YZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -1333,8 +1333,8 @@ description: Operations executed bench.kcl
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "-XZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }

View File

@ -1,28 +1,28 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[1086, 1111, 0]"] 2["Path<br>[1085, 1110, 0]"]
3["Segment<br>[1117, 1170, 0]"] 3["Segment<br>[1116, 1169, 0]"]
4["Segment<br>[1176, 1215, 0]"] 4["Segment<br>[1175, 1214, 0]"]
5["Segment<br>[1221, 1263, 0]"] 5["Segment<br>[1220, 1262, 0]"]
6["Segment<br>[1269, 1310, 0]"] 6["Segment<br>[1268, 1309, 0]"]
7["Segment<br>[1316, 1355, 0]"] 7["Segment<br>[1315, 1354, 0]"]
8["Segment<br>[1361, 1431, 0]"] 8["Segment<br>[1360, 1430, 0]"]
9["Segment<br>[1437, 1444, 0]"] 9["Segment<br>[1436, 1443, 0]"]
10[Solid2d] 10[Solid2d]
end end
subgraph path38 [Path] subgraph path38 [Path]
38["Path<br>[1906, 1981, 0]"] 38["Path<br>[1823, 1885, 0]"]
39["Segment<br>[1906, 1981, 0]"] 39["Segment<br>[1823, 1885, 0]"]
40[Solid2d] 40[Solid2d]
end end
subgraph path48 [Path] subgraph path48 [Path]
48["Path<br>[2240, 2312, 0]"] 48["Path<br>[2112, 2171, 0]"]
49["Segment<br>[2240, 2312, 0]"] 49["Segment<br>[2112, 2171, 0]"]
50[Solid2d] 50[Solid2d]
end end
1["Plane<br>[1061, 1080, 0]"] 1["Plane<br>[1062, 1079, 0]"]
11["Sweep Extrusion<br>[1450, 1476, 0]"] 11["Sweep Extrusion<br>[1449, 1475, 0]"]
12[Wall] 12[Wall]
13[Wall] 13[Wall]
14[Wall] 14[Wall]
@ -43,26 +43,26 @@ flowchart LR
29["SweepEdge Adjacent"] 29["SweepEdge Adjacent"]
30["SweepEdge Opposite"] 30["SweepEdge Opposite"]
31["SweepEdge Adjacent"] 31["SweepEdge Adjacent"]
32["EdgeCut Fillet<br>[1482, 1573, 0]"] 32["EdgeCut Fillet<br>[1481, 1550, 0]"]
33["EdgeCut Fillet<br>[1579, 1667, 0]"] 33["EdgeCut Fillet<br>[1556, 1622, 0]"]
34["EdgeCut Fillet<br>[1673, 1761, 0]"] 34["EdgeCut Fillet<br>[1628, 1697, 0]"]
35["EdgeCut Fillet<br>[1673, 1761, 0]"] 35["EdgeCut Fillet<br>[1628, 1697, 0]"]
36["EdgeCut Fillet<br>[1767, 1855, 0]"] 36["EdgeCut Fillet<br>[1703, 1772, 0]"]
37["EdgeCut Fillet<br>[1767, 1855, 0]"] 37["EdgeCut Fillet<br>[1703, 1772, 0]"]
41["Sweep Extrusion<br>[2154, 2189, 0]"] 41["Sweep Extrusion<br>[2024, 2061, 0]"]
42[Wall] 42[Wall]
43["SweepEdge Opposite"] 43["SweepEdge Opposite"]
44["SweepEdge Adjacent"] 44["SweepEdge Adjacent"]
45["Sweep Extrusion<br>[2154, 2189, 0]"] 45["Sweep Extrusion<br>[2024, 2061, 0]"]
46["Sweep Extrusion<br>[2154, 2189, 0]"] 46["Sweep Extrusion<br>[2024, 2061, 0]"]
47["Sweep Extrusion<br>[2154, 2189, 0]"] 47["Sweep Extrusion<br>[2024, 2061, 0]"]
51["Sweep Extrusion<br>[2400, 2435, 0]"] 51["Sweep Extrusion<br>[2242, 2279, 0]"]
52[Wall] 52[Wall]
53["SweepEdge Opposite"] 53["SweepEdge Opposite"]
54["SweepEdge Adjacent"] 54["SweepEdge Adjacent"]
55["Sweep Extrusion<br>[2400, 2435, 0]"] 55["Sweep Extrusion<br>[2242, 2279, 0]"]
56["StartSketchOnFace<br>[1869, 1900, 0]"] 56["StartSketchOnFace<br>[1786, 1817, 0]"]
57["StartSketchOnFace<br>[2203, 2234, 0]"] 57["StartSketchOnFace<br>[2075, 2106, 0]"]
1 --- 2 1 --- 2
2 --- 3 2 --- 3
2 --- 4 2 --- 4

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@ description: Operations executed bracket.kcl
"labeledArgs": { "labeledArgs": {
"data": { "data": {
"value": { "value": {
"type": "String", "type": "Plane",
"value": "XZ" "artifact_id": "[uuid]"
}, },
"sourceRange": [] "sourceRange": []
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,264 +1,264 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[571, 643, 5]"] 2["Path<br>[567, 618, 5]"]
3["Segment<br>[571, 643, 5]"] 3["Segment<br>[567, 618, 5]"]
4[Solid2d] 4[Solid2d]
end end
subgraph path11 [Path] subgraph path11 [Path]
11["Path<br>[828, 905, 5]"] 11["Path<br>[803, 859, 5]"]
12["Segment<br>[828, 905, 5]"] 12["Segment<br>[803, 859, 5]"]
13[Solid2d] 13[Solid2d]
end end
subgraph path19 [Path] subgraph path19 [Path]
19["Path<br>[1030, 1104, 5]"] 19["Path<br>[984, 1037, 5]"]
20["Segment<br>[1030, 1104, 5]"] 20["Segment<br>[984, 1037, 5]"]
21[Solid2d] 21[Solid2d]
end end
subgraph path30 [Path] subgraph path30 [Path]
30["Path<br>[1486, 1526, 5]"] 30["Path<br>[1420, 1460, 5]"]
31["Segment<br>[1486, 1526, 5]"] 31["Segment<br>[1420, 1460, 5]"]
32[Solid2d] 32[Solid2d]
end end
subgraph path38 [Path] subgraph path38 [Path]
38["Path<br>[1630, 1702, 5]"] 38["Path<br>[1564, 1615, 5]"]
39["Segment<br>[1630, 1702, 5]"] 39["Segment<br>[1564, 1615, 5]"]
40[Solid2d] 40[Solid2d]
end end
subgraph path47 [Path] subgraph path47 [Path]
47["Path<br>[1835, 1909, 5]"] 47["Path<br>[1748, 1801, 5]"]
48["Segment<br>[1835, 1909, 5]"] 48["Segment<br>[1748, 1801, 5]"]
49[Solid2d] 49[Solid2d]
end end
subgraph path58 [Path] subgraph path58 [Path]
58["Path<br>[2151, 2244, 5]"] 58["Path<br>[2044, 2116, 5]"]
59["Segment<br>[2151, 2244, 5]"] 59["Segment<br>[2044, 2116, 5]"]
60[Solid2d] 60[Solid2d]
end end
subgraph path81 [Path] subgraph path81 [Path]
81["Path<br>[2500, 2531, 5]"] 81["Path<br>[2373, 2404, 5]"]
82["Segment<br>[2537, 2557, 5]"] 82["Segment<br>[2410, 2430, 5]"]
83["Segment<br>[2563, 2583, 5]"] 83["Segment<br>[2436, 2456, 5]"]
84["Segment<br>[2589, 2610, 5]"] 84["Segment<br>[2462, 2483, 5]"]
85["Segment<br>[2616, 2672, 5]"] 85["Segment<br>[2489, 2545, 5]"]
86["Segment<br>[2678, 2685, 5]"] 86["Segment<br>[2551, 2558, 5]"]
87[Solid2d] 87[Solid2d]
end end
subgraph path106 [Path] subgraph path106 [Path]
106["Path<br>[2986, 3018, 5]"] 106["Path<br>[2860, 2892, 5]"]
107["Segment<br>[3024, 3045, 5]"] 107["Segment<br>[2898, 2919, 5]"]
108["Segment<br>[3051, 3071, 5]"] 108["Segment<br>[2925, 2945, 5]"]
109["Segment<br>[3077, 3097, 5]"] 109["Segment<br>[2951, 2971, 5]"]
110["Segment<br>[3103, 3159, 5]"] 110["Segment<br>[2977, 3033, 5]"]
111["Segment<br>[3165, 3172, 5]"] 111["Segment<br>[3039, 3046, 5]"]
112[Solid2d] 112[Solid2d]
end end
subgraph path132 [Path] subgraph path132 [Path]
132["Path<br>[354, 431, 4]"] 132["Path<br>[350, 406, 4]"]
133["Segment<br>[354, 431, 4]"] 133["Segment<br>[350, 406, 4]"]
134[Solid2d] 134[Solid2d]
end end
subgraph path135 [Path] subgraph path135 [Path]
135["Path<br>[442, 519, 4]"] 135["Path<br>[417, 473, 4]"]
136["Segment<br>[442, 519, 4]"] 136["Segment<br>[417, 473, 4]"]
137[Solid2d] 137[Solid2d]
end end
subgraph path144 [Path] subgraph path144 [Path]
144["Path<br>[684, 761, 4]"] 144["Path<br>[638, 694, 4]"]
145["Segment<br>[684, 761, 4]"] 145["Segment<br>[638, 694, 4]"]
146[Solid2d] 146[Solid2d]
end end
subgraph path147 [Path] subgraph path147 [Path]
147["Path<br>[772, 849, 4]"] 147["Path<br>[705, 761, 4]"]
148["Segment<br>[772, 849, 4]"] 148["Segment<br>[705, 761, 4]"]
149[Solid2d] 149[Solid2d]
end end
subgraph path156 [Path] subgraph path156 [Path]
156["Path<br>[993, 1068, 4]"] 156["Path<br>[905, 959, 4]"]
157["Segment<br>[993, 1068, 4]"] 157["Segment<br>[905, 959, 4]"]
158[Solid2d] 158[Solid2d]
end end
subgraph path167 [Path] subgraph path167 [Path]
167["Path<br>[1345, 1426, 4]"] 167["Path<br>[1237, 1297, 4]"]
168["Segment<br>[1345, 1426, 4]"] 168["Segment<br>[1237, 1297, 4]"]
169[Solid2d] 169[Solid2d]
end end
subgraph path179 [Path] subgraph path179 [Path]
179["Path<br>[1785, 1831, 4]"] 179["Path<br>[1655, 1701, 4]"]
180["Segment<br>[1837, 1889, 4]"] 180["Segment<br>[1707, 1759, 4]"]
181["Segment<br>[1895, 2000, 4]"] 181["Segment<br>[1765, 1870, 4]"]
182["Segment<br>[2006, 2028, 4]"] 182["Segment<br>[1876, 1898, 4]"]
183["Segment<br>[2034, 2090, 4]"] 183["Segment<br>[1904, 1960, 4]"]
184["Segment<br>[2096, 2103, 4]"] 184["Segment<br>[1966, 1973, 4]"]
185[Solid2d] 185[Solid2d]
end end
subgraph path195 [Path] subgraph path195 [Path]
195["Path<br>[2239, 2285, 4]"] 195["Path<br>[2107, 2153, 4]"]
196["Segment<br>[2291, 2343, 4]"] 196["Segment<br>[2159, 2211, 4]"]
197["Segment<br>[2349, 2456, 4]"] 197["Segment<br>[2217, 2324, 4]"]
198["Segment<br>[2462, 2499, 4]"] 198["Segment<br>[2330, 2367, 4]"]
199["Segment<br>[2505, 2561, 4]"] 199["Segment<br>[2373, 2429, 4]"]
200["Segment<br>[2567, 2574, 4]"] 200["Segment<br>[2435, 2442, 4]"]
201[Solid2d] 201[Solid2d]
end end
subgraph path212 [Path] subgraph path212 [Path]
212["Path<br>[3085, 3132, 4]"] 212["Path<br>[2953, 3000, 4]"]
213["Segment<br>[3140, 3480, 4]"] 213["Segment<br>[3008, 3348, 4]"]
214["Segment<br>[3488, 3520, 4]"] 214["Segment<br>[3356, 3388, 4]"]
215["Segment<br>[3528, 3872, 4]"] 215["Segment<br>[3396, 3740, 4]"]
216["Segment<br>[3880, 3936, 4]"] 216["Segment<br>[3748, 3804, 4]"]
217["Segment<br>[3944, 3951, 4]"] 217["Segment<br>[3812, 3819, 4]"]
218[Solid2d] 218[Solid2d]
end end
subgraph path235 [Path] subgraph path235 [Path]
235["Path<br>[3085, 3132, 4]"] 235["Path<br>[2953, 3000, 4]"]
236["Segment<br>[3140, 3480, 4]"] 236["Segment<br>[3008, 3348, 4]"]
237["Segment<br>[3488, 3520, 4]"] 237["Segment<br>[3356, 3388, 4]"]
238["Segment<br>[3528, 3872, 4]"] 238["Segment<br>[3396, 3740, 4]"]
239["Segment<br>[3880, 3936, 4]"] 239["Segment<br>[3748, 3804, 4]"]
240["Segment<br>[3944, 3951, 4]"] 240["Segment<br>[3812, 3819, 4]"]
241[Solid2d] 241[Solid2d]
end end
subgraph path258 [Path] subgraph path258 [Path]
258["Path<br>[4480, 4575, 4]"] 258["Path<br>[4347, 4442, 4]"]
259["Segment<br>[4581, 4614, 4]"] 259["Segment<br>[4448, 4481, 4]"]
260["Segment<br>[4620, 4671, 4]"] 260["Segment<br>[4487, 4538, 4]"]
261["Segment<br>[4677, 4710, 4]"] 261["Segment<br>[4544, 4577, 4]"]
262["Segment<br>[4716, 4766, 4]"] 262["Segment<br>[4583, 4633, 4]"]
263["Segment<br>[4772, 4813, 4]"] 263["Segment<br>[4639, 4680, 4]"]
264["Segment<br>[4819, 4868, 4]"] 264["Segment<br>[4686, 4735, 4]"]
265["Segment<br>[4874, 4907, 4]"] 265["Segment<br>[4741, 4774, 4]"]
266["Segment<br>[4913, 4947, 4]"] 266["Segment<br>[4780, 4814, 4]"]
267["Segment<br>[4953, 4987, 4]"] 267["Segment<br>[4820, 4854, 4]"]
268["Segment<br>[4993, 5045, 4]"] 268["Segment<br>[4860, 4912, 4]"]
269["Segment<br>[5051, 5085, 4]"] 269["Segment<br>[4918, 4952, 4]"]
270["Segment<br>[5091, 5167, 4]"] 270["Segment<br>[4958, 5034, 4]"]
271["Segment<br>[5173, 5206, 4]"] 271["Segment<br>[5040, 5073, 4]"]
272["Segment<br>[5212, 5288, 4]"] 272["Segment<br>[5079, 5155, 4]"]
273["Segment<br>[5294, 5328, 4]"] 273["Segment<br>[5161, 5195, 4]"]
274["Segment<br>[5334, 5408, 4]"] 274["Segment<br>[5201, 5275, 4]"]
275["Segment<br>[5414, 5448, 4]"] 275["Segment<br>[5281, 5315, 4]"]
276["Segment<br>[5454, 5505, 4]"] 276["Segment<br>[5321, 5372, 4]"]
277["Segment<br>[5511, 5573, 4]"] 277["Segment<br>[5378, 5440, 4]"]
278["Segment<br>[5579, 5630, 4]"] 278["Segment<br>[5446, 5497, 4]"]
279["Segment<br>[5636, 5670, 4]"] 279["Segment<br>[5503, 5537, 4]"]
280["Segment<br>[5676, 5709, 4]"] 280["Segment<br>[5543, 5576, 4]"]
281["Segment<br>[5715, 5748, 4]"] 281["Segment<br>[5582, 5615, 4]"]
282["Segment<br>[5754, 5761, 4]"] 282["Segment<br>[5621, 5628, 4]"]
283[Solid2d] 283[Solid2d]
end end
subgraph path334 [Path] subgraph path334 [Path]
334["Path<br>[742, 782, 7]"] 334["Path<br>[740, 780, 7]"]
335["Segment<br>[790, 852, 7]"] 335["Segment<br>[788, 850, 7]"]
336["Segment<br>[860, 896, 7]"] 336["Segment<br>[858, 894, 7]"]
337["Segment<br>[904, 934, 7]"] 337["Segment<br>[902, 932, 7]"]
338["Segment<br>[942, 994, 7]"] 338["Segment<br>[940, 992, 7]"]
339["Segment<br>[1002, 1042, 7]"] 339["Segment<br>[1000, 1040, 7]"]
340["Segment<br>[1050, 1085, 7]"] 340["Segment<br>[1048, 1083, 7]"]
341["Segment<br>[1093, 1131, 7]"] 341["Segment<br>[1091, 1129, 7]"]
342["Segment<br>[1139, 1161, 7]"] 342["Segment<br>[1137, 1159, 7]"]
343["Segment<br>[1169, 1176, 7]"] 343["Segment<br>[1167, 1174, 7]"]
344[Solid2d] 344[Solid2d]
end end
subgraph path365 [Path] subgraph path365 [Path]
365["Path<br>[511, 592, 6]"] 365["Path<br>[507, 588, 6]"]
366["Segment<br>[598, 699, 6]"] 366["Segment<br>[594, 695, 6]"]
367["Segment<br>[705, 790, 6]"] 367["Segment<br>[701, 786, 6]"]
368["Segment<br>[796, 880, 6]"] 368["Segment<br>[792, 876, 6]"]
369["Segment<br>[886, 972, 6]"] 369["Segment<br>[882, 968, 6]"]
370["Segment<br>[978, 1063, 6]"] 370["Segment<br>[974, 1059, 6]"]
371["Segment<br>[1069, 1155, 6]"] 371["Segment<br>[1065, 1151, 6]"]
372["Segment<br>[1161, 1284, 6]"] 372["Segment<br>[1157, 1280, 6]"]
373["Segment<br>[1290, 1376, 6]"] 373["Segment<br>[1286, 1372, 6]"]
374["Segment<br>[1382, 1517, 6]"] 374["Segment<br>[1378, 1513, 6]"]
375["Segment<br>[1523, 1609, 6]"] 375["Segment<br>[1519, 1605, 6]"]
376["Segment<br>[1615, 1739, 6]"] 376["Segment<br>[1611, 1735, 6]"]
377["Segment<br>[1745, 1831, 6]"] 377["Segment<br>[1741, 1827, 6]"]
378["Segment<br>[1837, 1922, 6]"] 378["Segment<br>[1833, 1918, 6]"]
379["Segment<br>[1928, 2014, 6]"] 379["Segment<br>[1924, 2010, 6]"]
380["Segment<br>[2020, 2105, 6]"] 380["Segment<br>[2016, 2101, 6]"]
381["Segment<br>[2111, 2196, 6]"] 381["Segment<br>[2107, 2192, 6]"]
382["Segment<br>[2202, 2209, 6]"] 382["Segment<br>[2198, 2205, 6]"]
383[Solid2d] 383[Solid2d]
end end
subgraph path439 [Path] subgraph path439 [Path]
439["Path<br>[487, 544, 8]"] 439["Path<br>[483, 540, 8]"]
440["Segment<br>[550, 656, 8]"] 440["Segment<br>[546, 680, 8]"]
441["Segment<br>[662, 717, 8]"] 441["Segment<br>[686, 741, 8]"]
442["Segment<br>[723, 820, 8]"] 442["Segment<br>[747, 844, 8]"]
443["Segment<br>[826, 858, 8]"] 443["Segment<br>[850, 882, 8]"]
444["Segment<br>[864, 896, 8]"] 444["Segment<br>[888, 920, 8]"]
445["Segment<br>[902, 933, 8]"] 445["Segment<br>[926, 957, 8]"]
446["Segment<br>[939, 1054, 8]"] 446["Segment<br>[963, 1078, 8]"]
447["Segment<br>[1060, 1092, 8]"] 447["Segment<br>[1084, 1116, 8]"]
448["Segment<br>[1098, 1130, 8]"] 448["Segment<br>[1122, 1154, 8]"]
449["Segment<br>[1136, 1167, 8]"] 449["Segment<br>[1160, 1191, 8]"]
450["Segment<br>[1173, 1266, 8]"] 450["Segment<br>[1197, 1290, 8]"]
451["Segment<br>[1272, 1327, 8]"] 451["Segment<br>[1296, 1351, 8]"]
452["Segment<br>[1333, 1406, 8]"] 452["Segment<br>[1357, 1430, 8]"]
453["Segment<br>[1412, 1419, 8]"] 453["Segment<br>[1436, 1443, 8]"]
454[Solid2d] 454[Solid2d]
end end
1["Plane<br>[546, 565, 5]"] 1["Plane<br>[544, 561, 5]"]
5["Sweep Extrusion<br>[652, 708, 5]"] 5["Sweep Extrusion<br>[627, 683, 5]"]
6[Wall] 6[Wall]
7["Cap Start"] 7["Cap Start"]
8["Cap End"] 8["Cap End"]
9["SweepEdge Opposite"] 9["SweepEdge Opposite"]
10["SweepEdge Adjacent"] 10["SweepEdge Adjacent"]
14["Sweep Extrusion<br>[918, 980, 5]"] 14["Sweep Extrusion<br>[872, 934, 5]"]
15[Wall] 15[Wall]
16["Cap End"] 16["Cap End"]
17["SweepEdge Opposite"] 17["SweepEdge Opposite"]
18["SweepEdge Adjacent"] 18["SweepEdge Adjacent"]
22["Sweep Extrusion<br>[1250, 1329, 5]"] 22["Sweep Extrusion<br>[1184, 1263, 5]"]
23[Wall] 23[Wall]
24["SweepEdge Opposite"] 24["SweepEdge Opposite"]
25["SweepEdge Adjacent"] 25["SweepEdge Adjacent"]
26["Sweep Extrusion<br>[1250, 1329, 5]"] 26["Sweep Extrusion<br>[1184, 1263, 5]"]
27["Sweep Extrusion<br>[1250, 1329, 5]"] 27["Sweep Extrusion<br>[1184, 1263, 5]"]
28["Sweep Extrusion<br>[1250, 1329, 5]"] 28["Sweep Extrusion<br>[1184, 1263, 5]"]
29["Sweep Extrusion<br>[1250, 1329, 5]"] 29["Sweep Extrusion<br>[1184, 1263, 5]"]
33["Sweep Extrusion<br>[1532, 1565, 5]"] 33["Sweep Extrusion<br>[1466, 1499, 5]"]
34[Wall] 34[Wall]
35["Cap End"] 35["Cap End"]
36["SweepEdge Opposite"] 36["SweepEdge Opposite"]
37["SweepEdge Adjacent"] 37["SweepEdge Adjacent"]
41["Sweep Extrusion<br>[1717, 1782, 5]"] 41["Sweep Extrusion<br>[1630, 1695, 5]"]
42[Wall] 42[Wall]
43["Cap Start"] 43["Cap Start"]
44["Cap End"] 44["Cap End"]
45["SweepEdge Opposite"] 45["SweepEdge Opposite"]
46["SweepEdge Adjacent"] 46["SweepEdge Adjacent"]
50["Sweep Extrusion<br>[2055, 2099, 5]"] 50["Sweep Extrusion<br>[1948, 1992, 5]"]
51[Wall] 51[Wall]
52["SweepEdge Opposite"] 52["SweepEdge Opposite"]
53["SweepEdge Adjacent"] 53["SweepEdge Adjacent"]
54["Sweep Extrusion<br>[2055, 2099, 5]"] 54["Sweep Extrusion<br>[1948, 1992, 5]"]
55["Sweep Extrusion<br>[2055, 2099, 5]"] 55["Sweep Extrusion<br>[1948, 1992, 5]"]
56["Sweep Extrusion<br>[2055, 2099, 5]"] 56["Sweep Extrusion<br>[1948, 1992, 5]"]
57["Sweep Extrusion<br>[2055, 2099, 5]"] 57["Sweep Extrusion<br>[1948, 1992, 5]"]
61["Sweep Extrusion<br>[2398, 2442, 5]"] 61["Sweep Extrusion<br>[2271, 2315, 5]"]
62[Wall] 62[Wall]
63["Cap End"] 63["Cap End"]
64["SweepEdge Opposite"] 64["SweepEdge Opposite"]
65["SweepEdge Adjacent"] 65["SweepEdge Adjacent"]
66["Sweep Extrusion<br>[2398, 2442, 5]"] 66["Sweep Extrusion<br>[2271, 2315, 5]"]
67["Sweep Extrusion<br>[2398, 2442, 5]"] 67["Sweep Extrusion<br>[2271, 2315, 5]"]
68["Sweep Extrusion<br>[2398, 2442, 5]"] 68["Sweep Extrusion<br>[2271, 2315, 5]"]
69["Sweep Extrusion<br>[2398, 2442, 5]"] 69["Sweep Extrusion<br>[2271, 2315, 5]"]
70["Sweep Extrusion<br>[2398, 2442, 5]"] 70["Sweep Extrusion<br>[2271, 2315, 5]"]
71["Sweep Extrusion<br>[2398, 2442, 5]"] 71["Sweep Extrusion<br>[2271, 2315, 5]"]
72["Sweep Extrusion<br>[2398, 2442, 5]"] 72["Sweep Extrusion<br>[2271, 2315, 5]"]
73["Sweep Extrusion<br>[2398, 2442, 5]"] 73["Sweep Extrusion<br>[2271, 2315, 5]"]
74["Sweep Extrusion<br>[2398, 2442, 5]"] 74["Sweep Extrusion<br>[2271, 2315, 5]"]
75["Sweep Extrusion<br>[2398, 2442, 5]"] 75["Sweep Extrusion<br>[2271, 2315, 5]"]
76["Sweep Extrusion<br>[2398, 2442, 5]"] 76["Sweep Extrusion<br>[2271, 2315, 5]"]
77["Sweep Extrusion<br>[2398, 2442, 5]"] 77["Sweep Extrusion<br>[2271, 2315, 5]"]
78["Sweep Extrusion<br>[2398, 2442, 5]"] 78["Sweep Extrusion<br>[2271, 2315, 5]"]
79["Sweep Extrusion<br>[2398, 2442, 5]"] 79["Sweep Extrusion<br>[2271, 2315, 5]"]
80["Sweep Extrusion<br>[2398, 2442, 5]"] 80["Sweep Extrusion<br>[2271, 2315, 5]"]
88["Sweep Extrusion<br>[2850, 2918, 5]"] 88["Sweep Extrusion<br>[2724, 2792, 5]"]
89[Wall] 89[Wall]
90[Wall] 90[Wall]
91[Wall] 91[Wall]
@ -272,11 +272,11 @@ flowchart LR
99["SweepEdge Adjacent"] 99["SweepEdge Adjacent"]
100["SweepEdge Opposite"] 100["SweepEdge Opposite"]
101["SweepEdge Adjacent"] 101["SweepEdge Adjacent"]
102["Sweep Extrusion<br>[2850, 2918, 5]"] 102["Sweep Extrusion<br>[2724, 2792, 5]"]
103["Sweep Extrusion<br>[2850, 2918, 5]"] 103["Sweep Extrusion<br>[2724, 2792, 5]"]
104["Sweep Extrusion<br>[2850, 2918, 5]"] 104["Sweep Extrusion<br>[2724, 2792, 5]"]
105["Sweep Extrusion<br>[2850, 2918, 5]"] 105["Sweep Extrusion<br>[2724, 2792, 5]"]
113["Sweep Extrusion<br>[3323, 3397, 5]"] 113["Sweep Extrusion<br>[3198, 3272, 5]"]
114[Wall] 114[Wall]
115[Wall] 115[Wall]
116[Wall] 116[Wall]
@ -290,41 +290,41 @@ flowchart LR
124["SweepEdge Adjacent"] 124["SweepEdge Adjacent"]
125["SweepEdge Opposite"] 125["SweepEdge Opposite"]
126["SweepEdge Adjacent"] 126["SweepEdge Adjacent"]
127["Sweep Extrusion<br>[3323, 3397, 5]"] 127["Sweep Extrusion<br>[3198, 3272, 5]"]
128["Sweep Extrusion<br>[3323, 3397, 5]"] 128["Sweep Extrusion<br>[3198, 3272, 5]"]
129["Sweep Extrusion<br>[3323, 3397, 5]"] 129["Sweep Extrusion<br>[3198, 3272, 5]"]
130["Sweep Extrusion<br>[3323, 3397, 5]"] 130["Sweep Extrusion<br>[3198, 3272, 5]"]
131["Plane<br>[329, 348, 4]"] 131["Plane<br>[327, 344, 4]"]
138["Sweep Extrusion<br>[529, 562, 4]"] 138["Sweep Extrusion<br>[483, 516, 4]"]
139[Wall] 139[Wall]
140["Cap Start"] 140["Cap Start"]
141["Cap End"] 141["Cap End"]
142["SweepEdge Opposite"] 142["SweepEdge Opposite"]
143["SweepEdge Adjacent"] 143["SweepEdge Adjacent"]
150["Sweep Extrusion<br>[859, 892, 4]"] 150["Sweep Extrusion<br>[771, 804, 4]"]
151[Wall] 151[Wall]
152["Cap Start"] 152["Cap Start"]
153["Cap End"] 153["Cap End"]
154["SweepEdge Opposite"] 154["SweepEdge Opposite"]
155["SweepEdge Adjacent"] 155["SweepEdge Adjacent"]
159["Sweep Extrusion<br>[1214, 1248, 4]"] 159["Sweep Extrusion<br>[1106, 1140, 4]"]
160[Wall] 160[Wall]
161["SweepEdge Opposite"] 161["SweepEdge Opposite"]
162["SweepEdge Adjacent"] 162["SweepEdge Adjacent"]
163["Sweep Extrusion<br>[1214, 1248, 4]"] 163["Sweep Extrusion<br>[1106, 1140, 4]"]
164["Sweep Extrusion<br>[1214, 1248, 4]"] 164["Sweep Extrusion<br>[1106, 1140, 4]"]
165["Sweep Extrusion<br>[1214, 1248, 4]"] 165["Sweep Extrusion<br>[1106, 1140, 4]"]
166["Sweep Extrusion<br>[1214, 1248, 4]"] 166["Sweep Extrusion<br>[1106, 1140, 4]"]
170["Sweep Extrusion<br>[1572, 1606, 4]"] 170["Sweep Extrusion<br>[1444, 1478, 4]"]
171[Wall] 171[Wall]
172["SweepEdge Opposite"] 172["SweepEdge Opposite"]
173["SweepEdge Adjacent"] 173["SweepEdge Adjacent"]
174["Sweep Extrusion<br>[1572, 1606, 4]"] 174["Sweep Extrusion<br>[1444, 1478, 4]"]
175["Sweep Extrusion<br>[1572, 1606, 4]"] 175["Sweep Extrusion<br>[1444, 1478, 4]"]
176["Sweep Extrusion<br>[1572, 1606, 4]"] 176["Sweep Extrusion<br>[1444, 1478, 4]"]
177["Sweep Extrusion<br>[1572, 1606, 4]"] 177["Sweep Extrusion<br>[1444, 1478, 4]"]
178["Plane<br>[1760, 1779, 4]"] 178["Plane<br>[1632, 1649, 4]"]
186["Sweep Revolve<br>[2109, 2128, 4]"] 186["Sweep Revolve<br>[1979, 1998, 4]"]
187[Wall] 187[Wall]
188[Wall] 188[Wall]
189[Wall] 189[Wall]
@ -332,8 +332,8 @@ flowchart LR
191["SweepEdge Adjacent"] 191["SweepEdge Adjacent"]
192["SweepEdge Adjacent"] 192["SweepEdge Adjacent"]
193["SweepEdge Adjacent"] 193["SweepEdge Adjacent"]
194["Plane<br>[2214, 2233, 4]"] 194["Plane<br>[2084, 2101, 4]"]
202["Sweep Revolve<br>[2580, 2599, 4]"] 202["Sweep Revolve<br>[2448, 2467, 4]"]
203[Wall] 203[Wall]
204[Wall] 204[Wall]
205[Wall] 205[Wall]
@ -342,8 +342,8 @@ flowchart LR
208["SweepEdge Adjacent"] 208["SweepEdge Adjacent"]
209["SweepEdge Adjacent"] 209["SweepEdge Adjacent"]
210["SweepEdge Adjacent"] 210["SweepEdge Adjacent"]
211["Plane<br>[3054, 3077, 4]"] 211["Plane<br>[2922, 2945, 4]"]
219["Sweep Extrusion<br>[3999, 4045, 4]"] 219["Sweep Extrusion<br>[3867, 3913, 4]"]
220[Wall] 220[Wall]
221[Wall] 221[Wall]
222[Wall] 222[Wall]
@ -358,8 +358,8 @@ flowchart LR
231["SweepEdge Adjacent"] 231["SweepEdge Adjacent"]
232["SweepEdge Opposite"] 232["SweepEdge Opposite"]
233["SweepEdge Adjacent"] 233["SweepEdge Adjacent"]
234["Plane<br>[3054, 3077, 4]"] 234["Plane<br>[2922, 2945, 4]"]
242["Sweep Extrusion<br>[3999, 4045, 4]"] 242["Sweep Extrusion<br>[3867, 3913, 4]"]
243[Wall] 243[Wall]
244[Wall] 244[Wall]
245[Wall] 245[Wall]
@ -374,8 +374,8 @@ flowchart LR
254["SweepEdge Adjacent"] 254["SweepEdge Adjacent"]
255["SweepEdge Opposite"] 255["SweepEdge Opposite"]
256["SweepEdge Adjacent"] 256["SweepEdge Adjacent"]
257["Plane<br>[4455, 4474, 4]"] 257["Plane<br>[4324, 4341, 4]"]
284["Sweep Revolve<br>[5767, 5786, 4]"] 284["Sweep Revolve<br>[5634, 5653, 4]"]
285[Wall] 285[Wall]
286[Wall] 286[Wall]
287[Wall] 287[Wall]
@ -424,8 +424,8 @@ flowchart LR
330["SweepEdge Adjacent"] 330["SweepEdge Adjacent"]
331["SweepEdge Adjacent"] 331["SweepEdge Adjacent"]
332["SweepEdge Adjacent"] 332["SweepEdge Adjacent"]
333["Plane<br>[708, 734, 7]"] 333["Plane<br>[706, 732, 7]"]
345["Sweep Revolve<br>[1184, 1203, 7]"] 345["Sweep Revolve<br>[1182, 1201, 7]"]
346[Wall] 346[Wall]
347[Wall] 347[Wall]
348[Wall] 348[Wall]
@ -444,8 +444,8 @@ flowchart LR
361["SweepEdge Adjacent"] 361["SweepEdge Adjacent"]
362["SweepEdge Adjacent"] 362["SweepEdge Adjacent"]
363["SweepEdge Adjacent"] 363["SweepEdge Adjacent"]
364["Plane<br>[486, 505, 6]"] 364["Plane<br>[484, 501, 6]"]
384["Sweep Revolve<br>[2247, 2299, 6]"] 384["Sweep Revolve<br>[2243, 2295, 6]"]
385[Wall] 385[Wall]
386[Wall] 386[Wall]
387[Wall] 387[Wall]
@ -499,8 +499,8 @@ flowchart LR
435["SweepEdge Adjacent"] 435["SweepEdge Adjacent"]
436["SweepEdge Opposite"] 436["SweepEdge Opposite"]
437["SweepEdge Adjacent"] 437["SweepEdge Adjacent"]
438["Plane<br>[462, 481, 8]"] 438["Plane<br>[460, 477, 8]"]
455["Sweep Revolve<br>[1462, 1493, 8]"] 455["Sweep Revolve<br>[1486, 1517, 8]"]
456[Wall] 456[Wall]
457[Wall] 457[Wall]
458[Wall] 458[Wall]
@ -529,17 +529,17 @@ flowchart LR
481["SweepEdge Adjacent"] 481["SweepEdge Adjacent"]
482["SweepEdge Adjacent"] 482["SweepEdge Adjacent"]
483["SweepEdge Adjacent"] 483["SweepEdge Adjacent"]
484["StartSketchOnFace<br>[795, 822, 5]"] 484["StartSketchOnFace<br>[770, 797, 5]"]
485["StartSketchOnFace<br>[993, 1024, 5]"] 485["StartSketchOnFace<br>[947, 978, 5]"]
486["StartSketchOnFace<br>[1451, 1480, 5]"] 486["StartSketchOnFace<br>[1385, 1414, 5]"]
487["StartSketchOnFace<br>[1590, 1624, 5]"] 487["StartSketchOnFace<br>[1524, 1558, 5]"]
488["StartSketchOnFace<br>[1796, 1829, 5]"] 488["StartSketchOnFace<br>[1709, 1742, 5]"]
489["StartSketchOnFace<br>[2116, 2145, 5]"] 489["StartSketchOnFace<br>[2009, 2038, 5]"]
490["StartSketchOnFace<br>[2465, 2494, 5]"] 490["StartSketchOnFace<br>[2338, 2367, 5]"]
491["StartSketchOnFace<br>[2947, 2980, 5]"] 491["StartSketchOnFace<br>[2821, 2854, 5]"]
492["StartSketchOnFace<br>[649, 678, 4]"] 492["StartSketchOnFace<br>[603, 632, 4]"]
493["StartSketchOnFace<br>[953, 987, 4]"] 493["StartSketchOnFace<br>[865, 899, 4]"]
494["StartSketchOnFace<br>[1310, 1339, 4]"] 494["StartSketchOnFace<br>[1202, 1231, 4]"]
1 --- 2 1 --- 2
2 --- 3 2 --- 3
2 ---- 5 2 ---- 5

View File

@ -301,14 +301,14 @@ description: Result of parsing car-wheel-assembly.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 436, "commentStart": 438,
"end": 0, "end": 0,
"name": "arcDegrees", "name": "arcDegrees",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 449, "commentStart": 451,
"end": 0, "end": 0,
"raw": "360", "raw": "360",
"start": 0, "start": 0,
@ -323,17 +323,17 @@ description: Result of parsing car-wheel-assembly.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 459, "commentStart": 463,
"end": 0, "end": 0,
"name": "axis", "name": "axis",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 466, "commentStart": 470,
"elements": [ "elements": [
{ {
"commentStart": 467, "commentStart": 471,
"end": 0, "end": 0,
"raw": "0", "raw": "0",
"start": 0, "start": 0,
@ -345,7 +345,7 @@ description: Result of parsing car-wheel-assembly.kcl
} }
}, },
{ {
"commentStart": 470, "commentStart": 474,
"end": 0, "end": 0,
"raw": "1", "raw": "1",
"start": 0, "start": 0,
@ -357,7 +357,7 @@ description: Result of parsing car-wheel-assembly.kcl
} }
}, },
{ {
"commentStart": 473, "commentStart": 477,
"end": 0, "end": 0,
"raw": "0", "raw": "0",
"start": 0, "start": 0,
@ -378,39 +378,15 @@ description: Result of parsing car-wheel-assembly.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 482, "commentStart": 488,
"end": 0, "end": 0,
"name": "center", "name": "center",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 491, "commentStart": 497,
"elements": [ "elements": [
{
"commentStart": 492,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 495,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{ {
"commentStart": 498, "commentStart": 498,
"end": 0, "end": 0,
@ -422,6 +398,30 @@ description: Result of parsing car-wheel-assembly.kcl
"value": 0.0, "value": 0.0,
"suffix": "None" "suffix": "None"
} }
},
{
"commentStart": 501,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 504,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
} }
], ],
"end": 0, "end": 0,
@ -433,7 +433,7 @@ description: Result of parsing car-wheel-assembly.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 507, "commentStart": 515,
"end": 0, "end": 0,
"name": "instances", "name": "instances",
"start": 0, "start": 0,
@ -441,10 +441,10 @@ description: Result of parsing car-wheel-assembly.kcl
}, },
"arg": { "arg": {
"abs_path": false, "abs_path": false,
"commentStart": 519, "commentStart": 527,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 519, "commentStart": 527,
"end": 0, "end": 0,
"name": "lugCount", "name": "lugCount",
"start": 0, "start": 0,
@ -459,14 +459,14 @@ description: Result of parsing car-wheel-assembly.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 534, "commentStart": 544,
"end": 0, "end": 0,
"name": "rotateDuplicates", "name": "rotateDuplicates",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 553, "commentStart": 563,
"end": 0, "end": 0,
"raw": "false", "raw": "false",
"start": 0, "start": 0,
@ -510,16 +510,16 @@ description: Result of parsing car-wheel-assembly.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 564, "commentStart": 577,
"end": 0, "end": 0,
"expression": { "expression": {
"body": [ "body": [
{ {
"abs_path": false, "abs_path": false,
"commentStart": 564, "commentStart": 577,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 564, "commentStart": 577,
"end": 0, "end": 0,
"name": "brakeCaliper", "name": "brakeCaliper",
"start": 0, "start": 0,
@ -535,17 +535,17 @@ description: Result of parsing car-wheel-assembly.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 592, "commentStart": 605,
"end": 0, "end": 0,
"name": "translate", "name": "translate",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 604, "commentStart": 617,
"elements": [ "elements": [
{ {
"commentStart": 605, "commentStart": 618,
"end": 0, "end": 0,
"raw": "0", "raw": "0",
"start": 0, "start": 0,
@ -557,7 +557,7 @@ description: Result of parsing car-wheel-assembly.kcl
} }
}, },
{ {
"commentStart": 608, "commentStart": 621,
"end": 0, "end": 0,
"raw": "0.5", "raw": "0.5",
"start": 0, "start": 0,
@ -569,7 +569,7 @@ description: Result of parsing car-wheel-assembly.kcl
} }
}, },
{ {
"commentStart": 613, "commentStart": 626,
"end": 0, "end": 0,
"raw": "0", "raw": "0",
"start": 0, "start": 0,
@ -590,10 +590,10 @@ description: Result of parsing car-wheel-assembly.kcl
], ],
"callee": { "callee": {
"abs_path": false, "abs_path": false,
"commentStart": 582, "commentStart": 595,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 582, "commentStart": 595,
"end": 0, "end": 0,
"name": "translate", "name": "translate",
"start": 0, "start": 0,
@ -603,7 +603,7 @@ description: Result of parsing car-wheel-assembly.kcl
"start": 0, "start": 0,
"type": "Name" "type": "Name"
}, },
"commentStart": 582, "commentStart": 595,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
@ -611,7 +611,7 @@ description: Result of parsing car-wheel-assembly.kcl
"unlabeled": null "unlabeled": null
} }
], ],
"commentStart": 564, "commentStart": 577,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
@ -622,14 +622,14 @@ description: Result of parsing car-wheel-assembly.kcl
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"commentStart": 617, "commentStart": 630,
"end": 0, "end": 0,
"expression": { "expression": {
"abs_path": false, "abs_path": false,
"commentStart": 617, "commentStart": 630,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 617, "commentStart": 630,
"end": 0, "end": 0,
"name": "carTire", "name": "carTire",
"start": 0, "start": 0,

Some files were not shown because too many files have changed in this diff Show More