mirror of
https://github.com/Proteus-Typer/model-a.git
synced 2025-07-06 16:16:43 +00:00
Compare commits
9 Commits
5be0911e77
...
assemblies
Author | SHA1 | Date | |
---|---|---|---|
25c184723d | |||
c9c10d1c4a | |||
52a0e374d0 | |||
6f2e04b9b9 | |||
ab741ae02f | |||
69496f92f6 | |||
b31efd2c07 | |||
4a90e385e9 | |||
0a81747299 |
16
.vscode/extensions.json
vendored
Normal file
16
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": [
|
||||
"emeraldwalk.RunOnSave",
|
||||
"ms-vscode.makefile-tools",
|
||||
"ms-python.python",
|
||||
"mtsmfm.vscode-stl-viewer"
|
||||
],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": [
|
||||
|
||||
]
|
||||
}
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -7,5 +7,6 @@
|
||||
"isAsync": true,
|
||||
"cmd": "make"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
9
LICENSE.md
Normal file
9
LICENSE.md
Normal file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Roberto Alsina <roberto.alsina@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3
Makefile
3
Makefile
@ -7,7 +7,8 @@ all: $(STL_FILES) lint
|
||||
|
||||
lint: .lint
|
||||
|
||||
.lint: **.py
|
||||
.lint: *.py components/*.py
|
||||
flake8
|
||||
black *.py */*.py
|
||||
touch .lint
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Homemade Computer Project To Be Named Later
|
||||
# Model-A Homemade Computer Project
|
||||
|
||||
Here are the files used to build the case for my homemade
|
||||
computer. You can see a lot about it in [this article](http://ralsina.me/weblog/posts/so-i-built-a-laptop.html) (or at least about it as it was in early march 2023)
|
||||
@ -44,6 +44,7 @@ The basic concepts work, as proven by me building the damned things. But still:
|
||||
* The component library is very limited (just the things I am using in my build)
|
||||
|
||||
None of those things is an insurmountable problem, and I am working on them,
|
||||
and I have plans to fix it all. Eventually. Some day.
|
||||
and I have plans to fix it all. Eventually. Some day. I only do this on
|
||||
lunch breaks and weekends folks.
|
||||
|
||||
In the meantime, if you want to use any of this and need a hand, just contact me at roberto.alsina@gmail.com and I'll try to help.
|
||||
In the meantime, if you want to use any of this and need a hand, just contact me at roberto.alsina@gmail.com and I'll try to help.
|
||||
|
40
assembly.py
Normal file
40
assembly.py
Normal file
@ -0,0 +1,40 @@
|
||||
import cadquery as cq
|
||||
|
||||
import base
|
||||
import simple_lid
|
||||
|
||||
base = base.model()
|
||||
lid = simple_lid.model()
|
||||
# kbd =
|
||||
|
||||
compu = (
|
||||
cq.Assembly()
|
||||
.add(base, name="base", color=cq.Color("red"))
|
||||
.add(lid, name="lid", color=cq.Color("green"))
|
||||
)
|
||||
|
||||
compu.constrain("base@faces@<X", "lid@faces@<X", "Plane", param=0)
|
||||
# compu.constrain("base@faces@>Y", "lid@faces@>Y", "Plane", param=0)
|
||||
# compu.constrain("base@faces@>X", "lid@faces@>X", "Plane", param=0)
|
||||
compu.constrain("base@faces@>Z", "lid?bottom", "Plane")
|
||||
|
||||
|
||||
# def pk(p):
|
||||
# c = p.Center()
|
||||
# return (c.x, c.y, c.z)
|
||||
|
||||
|
||||
# lid_holes = sorted(
|
||||
# [x for x in lid.faces("|Z").edges("%CIRCLE").vals() if x.radius() == 2 and x.Closed()], key=pk
|
||||
# )
|
||||
# base_holes = sorted(
|
||||
# [x for x in base.faces(">Z").edges("%CIRCLE").vals() if x.radius() == 1.8], key=pk
|
||||
# )
|
||||
# print(len(lid_holes), len(base_holes))
|
||||
# # Holes of diam 2 on the top lid and 1.8 in the base
|
||||
# for a, b in list(zip(lid_holes, base_holes)):
|
||||
# compu.constrain("lid", a, "base", b, "Point")
|
||||
|
||||
|
||||
compu.solve(5)
|
||||
compu.save("compu.step")
|
2
base.py
2
base.py
@ -1,4 +1,5 @@
|
||||
import cadquery as cq
|
||||
|
||||
# from cq_warehouse.drafting import Draft
|
||||
|
||||
import components.audio_plug as audio_plug
|
||||
@ -109,6 +110,7 @@ def model():
|
||||
back_face=None,
|
||||
shell_t=dim.shell_t,
|
||||
)
|
||||
model.mounting_holes = [x for x in model.faces(">Z").edges("%CIRCLE").vals() if x.radius()==1.8]
|
||||
|
||||
model = keyboard.add(
|
||||
model=model,
|
||||
|
@ -25,7 +25,9 @@ def init():
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": kbd_pillar_offset_1,
|
||||
"shape": cq.Sketch().push(kbd_pillar_positions).circle(kbd_pillar_radius_1, mode="a"),
|
||||
"shape": cq.Sketch()
|
||||
.push(kbd_pillar_positions)
|
||||
.circle(kbd_pillar_radius_1, mode="a"),
|
||||
},
|
||||
# Taller pillars with holes for self-tapping screws
|
||||
{
|
||||
|
@ -141,4 +141,6 @@ screen_pillars.pillar_width = 12
|
||||
screen_pillars.pillar_height = 12
|
||||
screen_pillars.screw_head_radius = 3
|
||||
screen_pillars.screw_radius = 1.8
|
||||
screen_pillars.screw_head_depth = base_thickness - 13 # (screw thread length - threaded insert depth)
|
||||
screen_pillars.screw_head_depth = (
|
||||
base_thickness - 13
|
||||
) # (screw thread length - threaded insert depth)
|
||||
|
@ -297,7 +297,10 @@ def model():
|
||||
(0, 0),
|
||||
(0, keyboard.kbd_front_thickness),
|
||||
(dim.shell_t, keyboard.kbd_front_thickness),
|
||||
(keyboard.kbd_actual_height + dim.shell_t, keyboard.kbd_back_thickness),
|
||||
(
|
||||
keyboard.kbd_actual_height + dim.shell_t,
|
||||
keyboard.kbd_back_thickness,
|
||||
),
|
||||
(keyboard.kbd_actual_height + dim.shell_t, dim.base_thickness),
|
||||
(dim.height, dim.base_thickness),
|
||||
(dim.height, 0),
|
||||
|
BIN
hinged_lid.stl
BIN
hinged_lid.stl
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
cadquery
|
||||
git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse
|
||||
flake8
|
||||
black
|
||||
|
@ -12,6 +12,8 @@ def model():
|
||||
.box(dim.width, dim.sl_height, dim.sl_thickness)
|
||||
.edges("|Z and >Y")
|
||||
.fillet(2)
|
||||
.faces("<Z")
|
||||
.tag("bottom")
|
||||
)
|
||||
|
||||
# Make many holes
|
||||
@ -46,6 +48,9 @@ def model():
|
||||
)
|
||||
.cskHole(dim.m4_bottom, dim.m4_top, 82, depth=None)
|
||||
)
|
||||
model.mounting_holes = [
|
||||
x for x in model.faces("<Z").edges("%CIRCLE").vals() if x.radius() == 2
|
||||
]
|
||||
|
||||
# Add front lip
|
||||
|
BIN
simple_lid.stl
BIN
simple_lid.stl
Binary file not shown.
2410
simple_lid.svg
2410
simple_lid.svg
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 227 KiB After Width: | Height: | Size: 227 KiB |
Binary file not shown.
Binary file not shown.
BIN
tandy_lid.stl
BIN
tandy_lid.stl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user