printbare bestanden gemaakt
This commit is contained in:
3
basis.py
3
basis.py
@@ -2,4 +2,5 @@ from ocp_vscode import *
|
|||||||
from build123d import *
|
from build123d import *
|
||||||
set_port(3939)
|
set_port(3939)
|
||||||
|
|
||||||
show()
|
|
||||||
|
show(box)
|
||||||
|
|||||||
21
blokMetAfgerondeHoeken.py
Normal file
21
blokMetAfgerondeHoeken.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
with BuildPart() as box:
|
||||||
|
Box(5, 7.5, 2, align=Align.MIN)
|
||||||
|
far_vertex = (
|
||||||
|
box.vertices().group_by(Axis.Z)[0].group_by(Axis.X)[-1].sort_by(Axis.Y)[-1]
|
||||||
|
)
|
||||||
|
w = Vector(far_vertex).length
|
||||||
|
|
||||||
|
# Intersect with a rounded corner
|
||||||
|
with BuildPart(mode=Mode.INTERSECT) as with_corners:
|
||||||
|
with BuildSketch(Plane.XZ.rotated((0, 0, 45))) as profile:
|
||||||
|
with BuildLine() as corner:
|
||||||
|
l1 = EllipticalCenterArc(
|
||||||
|
(w - 3, 2 - 1), 3, 1, start_angle=0, end_angle=90
|
||||||
|
)
|
||||||
|
Polyline(l1 @ 1, (0, 2), (0, 0), (w, 0), l1 @ 0)
|
||||||
|
make_face()
|
||||||
|
extrude(amount=w, both=True)
|
||||||
|
|
||||||
|
mirror(about=Plane.YZ)
|
||||||
|
mirror(about=Plane.XZ)
|
||||||
|
mirror(about=Plane.XY)
|
||||||
11
boxMetRondeHoeken.py
Normal file
11
boxMetRondeHoeken.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from ocp_vscode import *
|
||||||
|
import build123d as b3d
|
||||||
|
set_port(3939)
|
||||||
|
|
||||||
|
#with BuildPart() as box:
|
||||||
|
# with BuildSketch as sk_box:
|
||||||
|
# Rectangle(10, 10)
|
||||||
|
# extrude(4)
|
||||||
|
block = b3d.Box(10, 10, 4)
|
||||||
|
|
||||||
|
show(rounded_block)
|
||||||
31
example.py
31
example.py
@@ -2,10 +2,33 @@ from ocp_vscode import *
|
|||||||
from build123d import *
|
from build123d import *
|
||||||
set_port(3939)
|
set_port(3939)
|
||||||
|
|
||||||
|
length = 9.0
|
||||||
|
width = 4.0
|
||||||
|
height = 2.0
|
||||||
|
arc_l = 3.0
|
||||||
|
arc_h = 1.0
|
||||||
|
arc_m = 2.5
|
||||||
|
|
||||||
with BuildPart() as box:
|
with BuildPart() as box:
|
||||||
with BuildSketch() as sk_box:
|
Box(5, 7.5, 2, align=Align.MIN)
|
||||||
Rectangle(10.0, 15.0)
|
far_vertex = (
|
||||||
extrude(amount=4.0)
|
box.vertices().group_by(Axis.Z)[0].group_by(Axis.X)[-1].sort_by(Axis.Y)[-1]
|
||||||
fillet(box.edges().filter_by(Axis.Z), radius=2)
|
)
|
||||||
|
w = Vector(far_vertex).length
|
||||||
|
|
||||||
|
# Intersect with a rounded corner
|
||||||
|
with BuildPart(mode=Mode.INTERSECT) as with_corners:
|
||||||
|
with BuildSketch(Plane.XZ.rotated((0, 0, 45))) as profile:
|
||||||
|
with BuildLine() as corner:
|
||||||
|
l1 = EllipticalCenterArc(
|
||||||
|
(w - 3, 2 - 1), 3, 1, start_angle=0, end_angle=90
|
||||||
|
)
|
||||||
|
Polyline(l1 @ 1, (0, 2), (0, 0), (w, 0), l1 @ 0)
|
||||||
|
make_face()
|
||||||
|
extrude(amount=w, both=True)
|
||||||
|
|
||||||
|
mirror(about=Plane.YZ)
|
||||||
|
mirror(about=Plane.XZ)
|
||||||
|
mirror(about=Plane.XY)
|
||||||
|
|
||||||
show(box)
|
show(box)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ wbs = width_board_side = 15.0
|
|||||||
ttc = thickness_total_connector = 4.0
|
ttc = thickness_total_connector = 4.0
|
||||||
cw = clamp_width = 9.8
|
cw = clamp_width = 9.8
|
||||||
rc = rotation_clamp = 45.0
|
rc = rotation_clamp = 45.0
|
||||||
dc = depth_clamp = 8.0
|
dc = depth_clamp = 4.0
|
||||||
|
|
||||||
with BuildPart() as connector:
|
with BuildPart() as connector:
|
||||||
with BuildSketch() as connector_sk:
|
with BuildSketch() as connector_sk:
|
||||||
@@ -24,13 +24,34 @@ with BuildPart() as connector:
|
|||||||
extrude(amount = ttc-teub)
|
extrude(amount = ttc-teub)
|
||||||
chamfer(connector.edges().group_by(Axis.Z)[-1], length = tb, length2 = tb)
|
chamfer(connector.edges().group_by(Axis.Z)[-1], length = tb, length2 = tb)
|
||||||
extrude(connector.faces().sort_by(Axis.Z)[-1], amount = teub)
|
extrude(connector.faces().sort_by(Axis.Z)[-1], amount = teub)
|
||||||
with BuildSketch(connector.faces().sort_by(Axis.Z)[-1]) as metaal_sk:
|
with BuildSketch(connector.faces().sort_by(Axis.Z)[-1]) as metal_sk:
|
||||||
Circle(cw/2)
|
Circle(cw/2)
|
||||||
extrude(amount = tce)
|
extrude(amount = tce)
|
||||||
with BuildSketch(connector.faces().sort_by(Axis.Z)[-1]) as klem_sk:
|
with BuildSketch(connector.faces().sort_by(Axis.Z)[-1]) as klem_sk:
|
||||||
Rectangle(cw, cw, rotation = rc)
|
Rectangle(cw, cw, rotation = rc)
|
||||||
extrude(amount = dc)
|
extrude(amount = dc)
|
||||||
#corners = connector.edges().filter_by(Axis.X).group_by(Axis.Y)[0]
|
|
||||||
#fillet(corners, radius = 1)
|
|
||||||
|
|
||||||
show(connector)
|
# with BuildPart(connector.faces().sort_by(Axis.Z)[-1]) as clamp:
|
||||||
|
# Box(cw/2, cw/2, dc/2, align=Align.MIN)
|
||||||
|
# far_vertex = (
|
||||||
|
# clamp.vertices().group_by(Axis.Z)[0].group_by(Axis.X)[-1].sort_by(Axis.Y)[-1]
|
||||||
|
# )
|
||||||
|
# w = Vector(far_vertex).length
|
||||||
|
#
|
||||||
|
# # Intersect with a rounded corner
|
||||||
|
# with BuildPart(mode=Mode.INTERSECT) as with_corners:
|
||||||
|
# with BuildSketch(Plane.XZ.rotated((0, 0, 45))) as profile:
|
||||||
|
# with BuildLine() as corner:
|
||||||
|
# l1 = EllipticalCenterArc(
|
||||||
|
# (w - 1, 1 - 0.5), 1, 0.3, start_angle=0, end_angle=90
|
||||||
|
# )
|
||||||
|
# Polyline(l1 @ 1, (0, 2), (0, 0), (w, 0), l1 @ 0)
|
||||||
|
# make_face()
|
||||||
|
# extrude(amount=w, both=True)
|
||||||
|
#
|
||||||
|
# mirror(about=Plane.YZ)
|
||||||
|
# mirror(about=Plane.XZ)
|
||||||
|
# mirror(about=Plane.XY)
|
||||||
|
|
||||||
|
export_step(connector.part, "connector.stp")
|
||||||
|
show_all()
|
||||||
|
|||||||
BIN
multiconnect/connector.stl
Normal file
BIN
multiconnect/connector.stl
Normal file
Binary file not shown.
1637
multiconnect/connector.stp
Normal file
1637
multiconnect/connector.stp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user