Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
strandstring
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Erik Strand
strandstring
Compare Revisions
b72c7efca05410cbdfa19807f095a5ca36038dd4...483c714a362254eae88d0088730a2fc770f27030
Source
483c714a362254eae88d0088730a2fc770f27030
Select Git revision
...
Target
b72c7efca05410cbdfa19807f095a5ca36038dd4
Select Git revision
Compare
Commits (2)
Extend pad divisions a little off the board
· 620432a9
Erik Strand
authored
May 11, 2019
This ensures that the pads get completely divided.
620432a9
Make the board longer (18mm instead of 14mm)
· 483c714a
Erik Strand
authored
May 11, 2019
483c714a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
node_board/main.cpp
node_board/main.cpp
+27
-5
No files found.
node_board/main.cpp
View file @
483c714a
...
...
@@ -28,6 +28,10 @@ public:
}
void
set_pixel
(
int32_t
x
,
int32_t
y
,
uint8_t
value
=
255
)
{
x
=
std
::
max
(
-
2
*
min_cut_thickness_px_
,
x
);
x
=
std
::
min
(
width_px_
+
2
*
min_cut_thickness_px_
,
x
);
y
=
std
::
max
(
-
2
*
min_cut_thickness_px_
,
y
);
y
=
std
::
min
(
height_px_
+
2
*
min_cut_thickness_px_
,
y
);
png_writer_
.
set_pixel
(
2
*
min_cut_thickness_px_
+
x
,
2
*
min_cut_thickness_px_
+
height_px_
-
y
-
1
,
value
);
...
...
@@ -36,10 +40,6 @@ public:
void
draw_int_rectangle
(
int32_t
x_min
,
int32_t
x_max
,
int32_t
y_min
,
int32_t
y_max
,
uint8_t
value
=
255
)
{
x_min
=
std
::
max
(
0
,
x_min
);
x_max
=
std
::
min
(
width_px_
,
x_max
);
y_min
=
std
::
max
(
0
,
y_min
);
y_max
=
std
::
min
(
height_px_
,
y_max
);
for
(
int32_t
x
=
x_min
;
x
<
x_max
;
++
x
)
{
for
(
int32_t
y
=
y_min
;
y
<
y_max
;
++
y
)
{
set_pixel
(
x
,
y
,
value
);
...
...
@@ -96,7 +96,7 @@ int main() {
// board params
// width is deduced later
double
const
height
=
1
4
;
double
const
height
=
1
8
;
double
const
ppmm
=
50
;
// equivalent to 1270 ppi
double
const
min_cut_thickness
=
0.38
;
double
const
min_trace_thickness
=
0.35
;
...
...
@@ -197,6 +197,28 @@ int main() {
soic_top_y
-
pad_height
-
min_cut_thickness
,
soic_top_y
);
// Extend pad divisions
board
.
draw_rectangle
(
cable_pad_width
,
cable_pad_width
+
min_cut_thickness
,
-
min_cut_thickness
,
0
,
0
);
board
.
draw_rectangle
(
cable_pad_width
,
cable_pad_width
+
min_cut_thickness
,
height
,
height
+
min_cut_thickness
,
0
);
board
.
draw_rectangle
(
width
-
cable_pad_width
-
min_cut_thickness
,
width
-
cable_pad_width
,
-
min_cut_thickness
,
0
,
0
);
board
.
draw_rectangle
(
width
-
cable_pad_width
-
min_cut_thickness
,
width
-
cable_pad_width
,
height
,
height
+
min_cut_thickness
,
0
);
board
.
save
(
"node_board_traces.png"
);
board
.
save_outline
(
"node_board_outline.png"
);
...
...