Skip to content

Commit

Permalink
place origins for svg
Browse files Browse the repository at this point in the history
  • Loading branch information
willpuckett committed Sep 12, 2024
1 parent 0d23aae commit cd85438
Show file tree
Hide file tree
Showing 10 changed files with 10,481 additions and 31 deletions.
File renamed without changes.
21 changes: 0 additions & 21 deletions .devcontainer/cadquery/devcontainer.json

This file was deleted.

File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"python.analysis.extraPaths": [
"/root/.vscode-server/extensions/roipoussiere.cadquery-0.1.3/stubs"
]
],
"deno.enable": true
}
30 changes: 30 additions & 0 deletions case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env -S pkgx +pip python

# vpype read default/swoon-Edge_Cuts_LEFT.svg linemerge --tolerance 3mm linesort reloop linesimplify write default/swoon-Edge_Cuts_LEFT_vpype.svg

from build123d import *
from ocp_vscode import show_object as show, set_port

set_port(3939)

with BuildPart() as void:
with BuildSketch(Plane.XY.offset(3 * MM)) as edge_cuts:
with BuildLine() as line:
svg = import_svg("default/swoon-Edge_Cuts_LEFT_vpype.svg")
add(svg)
make_face()
extrude(amount = 3 * MM)

with BuildPart() as case:
with BuildSketch() as outline:
add(edge_cuts)
offset(amount=2 * MM, min_edge_length=3 * MM)
extrude(amount=6 * MM)

add(void, mode=Mode.SUBTRACT)
# top_face = case.faces().sort_by(Axis.Z)[-1]
# fillet(top_face.edges(), radius=0.3 * MM)

show(case)
export_step(case.part, file_path="case.step")
# export_stl(case.part, file_path="case.stl")
Loading

0 comments on commit cd85438

Please sign in to comment.