From 8a00982b9ab8cacf6d7ca2dd9d86105de2e09c96 Mon Sep 17 00:00:00 2001 From: h3n3 Date: Mon, 9 Dec 2024 16:34:21 +0100 Subject: [PATCH] Universal connector voor gereedschapbord toegevoegd --- connector.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 connector.py diff --git a/connector.py b/connector.py new file mode 100644 index 0000000..d0aded6 --- /dev/null +++ b/connector.py @@ -0,0 +1,35 @@ +from ocp_vscode import * +from build123d import * +set_port(3939) + +bc = breedte_connector = 20.0 +lrd = lengte_rechte_deel = 5.0 +dcr = dikte_connector_rand = 1.0 +ds = dikte_schuinezijde = 2.5 +drtb = dikte_rand_tot_bord = 0.5 +bbz = breedte_bord_zijde = 15.0 +dtc = dikte_totaal_connector = 4.0 +kb = klem_breedte = 9.8 +vk = verdraaiing_klem = 45.0 +dk = diepte_klem = 8.0 + +with BuildPart() as connector: + with BuildSketch() as connector_sk: + with BuildLine() as connector_ln: + l1 = Line(((bc/2), -(lrd/2)), ((bc/2), (lrd/2))) + l2 = ThreePointArc(((bc/2), (lrd/2)), (0, ((lrd/2) + (bc/2))), (-(bc/2), (lrd/2))) + l3 = Line((-(bc/2), (lrd/2)), (-(bc/2), -(lrd/2))) + l4 = ThreePointArc((-(bc/2), -(lrd/2)), (0, -((lrd/2) + (bc/2))), ((bc/2), -(lrd/2))) + make_face() + extrude(amount = dtc-drtb) + chamfer(connector.edges().group_by(Axis.Z)[-1], length = ds, length2 = ds) + extrude(connector.faces().sort_by(Axis.Z)[-1], amount = drtb) + with BuildSketch(connector.faces().sort_by(Axis.Z)[-1]): + Circle(kb/2) + extrude(amount = dcr) + with BuildSketch(connector.faces().sort_by(Axis.Z)[-1]): + Rectangle(kb, kb, rotation = vk) + extrude(amount = dk) + fillet(connector.vertices().filter_by(Axis.Z)[0], radius = 0.1) + +show(connector)