Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Footprint Pads for sizing, add 0603 resistor footprint + 3d model #7

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"enabled": true,
"indentStyle": "space"
},
"files": {
"ignore": ["cosmos-export", "dist", "package.json"]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
Expand Down
4 changes: 3 additions & 1 deletion examples/DIP.example.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { DIP } from "../lib/DIP"
import { JsCadFixture } from "jscad-fiber"
import { ExtrudedPads } from "../src/lib/ExtrudedPads"

export default () => {
return (
<JsCadFixture>
<DIP />
{/* <DIP /> */}
<ExtrudedPads footprint="dip8" />
</JsCadFixture>
)
}
12 changes: 12 additions & 0 deletions examples/a0603.example.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { A0603 } from "../lib/A0603"
import { JsCadFixture } from "jscad-fiber"
import { ExtrudedPads } from "../src/lib/ExtrudedPads"

export default () => {
return (
<JsCadFixture>
<A0603 />
<ExtrudedPads footprint="0603" />
</JsCadFixture>
)
}
33 changes: 32 additions & 1 deletion lib/A0603.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
// TODO
import { Cube, Cuboid, Translate, Union } from "jscad-fiber"

// TERMINATORS are the two gray metal boxes on the ends of the resistor
// BODY is the black box middle part

const fullLength = 1.6
const bodyLength = fullLength - 0.3 * 2
const terminatorLength = 0.3
const width = 0.85
const height = 0.6

export const A0603 = () => {
return (
<>
<Cuboid
size={[bodyLength, height, width]}
offset={[0, height / 2, 0]}
color="#333"
/>
<Cuboid
size={[terminatorLength, height, width]}
offset={[fullLength / 2 - terminatorLength / 2, height / 2, 0]}
color="#ccc"
/>
<Cuboid
size={[terminatorLength, height, width]}
offset={[-fullLength / 2 + terminatorLength / 2, height / 2, 0]}
color="#ccc"
/>
</>
)
}
Loading