diff --git a/__pycache__/orange.cpython-312.pyc b/__pycache__/orange.cpython-312.pyc index b1baaf8..342cbe7 100644 Binary files a/__pycache__/orange.cpython-312.pyc and b/__pycache__/orange.cpython-312.pyc differ diff --git a/orange.py b/orange.py index 3fbc266..bb189c6 100644 --- a/orange.py +++ b/orange.py @@ -1,7 +1,6 @@ from build123d import * from ocp_vscode import * -set_port(3939) orange = import_step("./OrangePi-Box.step") orange = orange.rotate(Axis.X, -90).move(Location((0, 0, 37))) @@ -40,6 +39,12 @@ sz4o = 19.737 offset_x4 = 70.481 offset_y4 = 23.208 +# 5 otworek +dl5o = 15.400 +sz5o = 20.400 + +offset_x5 = 8.910 +offset_y5 = 16.720 # with Locations((front_left_edge_vertex.X + 0, 0)) @@ -67,7 +72,13 @@ with BuildPart() as box: with Locations((front_left_edge_vertex.X + offset_x4, -offset_y4)): Rectangle(dl4o, sz4o, align=(Align.MIN, Align.MIN, Align.CENTER)) extrude(amount=-scianka, mode=Mode.SUBTRACT) + back = box.faces().sort_by(Axis.Y)[-1] + back_left_edge_vertex = box.faces().sort_by(Axis.Y)[-1].edges().filter_by(Axis.Z).sort_by(Axis.X)[-1].vertices()[0] + with BuildSketch(back) as s6: + with Locations((back_left_edge_vertex.X - offset_x5, +offset_y5)): + Rectangle(dl5o, sz5o, align=(Align.MAX, Align.MAX)) + extrude(amount=-scianka, mode=Mode.SUBTRACT) # show_all() -show(box, orange) +show(box, orange, s6)