Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
speaker-plotting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Calisch
speaker-plotting
Commits
b4a747ac
Commit
b4a747ac
authored
6 years ago
by
Sam Calisch
Browse files
Options
Downloads
Patches
Plain Diff
add coil to hex spiral
parent
375ed272
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
model/hex-spiral.3dm
+0
-0
0 additions, 0 deletions
model/hex-spiral.3dm
model/hex-spiral.dxf
+37071
-1213
37071 additions, 1213 deletions
model/hex-spiral.dxf
script/2018.12.8-hex-speaker-spiral.py
+39
-7
39 additions, 7 deletions
script/2018.12.8-hex-speaker-spiral.py
with
37110 additions
and
1220 deletions
model/hex-spiral.3dm
+
0
−
0
View file @
b4a747ac
No preview for this file type
This diff is collapsed.
Click to expand it.
model/hex-spiral.dxf
+
37071
−
1213
View file @
b4a747ac
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
script/2018.12.8-hex-speaker-spiral.py
+
39
−
7
View file @
b4a747ac
...
...
@@ -127,8 +127,9 @@ def main():
frame_bolt_d
=
4.1
#mm, diameter of bolt holes
wire_pitch
=
2
*
.
088
#mm, pitch, .088 = measured diameter (.080) + .008 mm slop (10% applied)
N
=
1
1
#number of turns
N
=
1
9
#number of turns
, must be odd
Nr
=
4
#number of radial layers in the hex lattice
lead_length
=
20
#make frame
frame
=
[]
...
...
@@ -142,21 +143,52 @@ def main():
circle
(.
5
*
(
v0
+
v1
),
frame_bolt_d
,
'
frame
'
),
]
#make magnet grid and air hole grid
magnets
=
[];
magnets
+=
[
circle
(
V2
(
0
,
0
),
mag_d
,
'
magnets_a
'
)]
#for each of the (2*Nr-1)*(Nr) points in the grid, what are the starting and ending angles
coil_params
=
[
[(
90
,
330
),
(
150
,
30
),
(
210
,
360
+
90
),
(
270
,
360
+
30
),
(
210
,
90
),
(
270
,
30
),
(
210
,
360
+
90
),
(
150
,
270
)],
[(
90
,
330
),
(
270
,
360
+
150
),
(
330
,
450
),
(
270
,
150
),
(
330
,
90
),
(
270
,
360
+
150
),
(
330
,
360
+
90
),
(
150
,
270
)],
[(
210
,
330
),
(
360
+
150
,
270
),
(
330
,
450
),
(
270
,
150
),
(
330
,
90
),
(
270
,
360
+
150
),
(
330
,
360
+
90
),
(
150
,
270
)],
[(
360
+
210
,
330
),
(
150
,
360
+
30
),
(
360
+
210
,
330
),
(
270
,
150
),
(
330
,
90
),
(
270
,
360
+
150
),
(
330
,
360
+
90
),
(
150
,
270
)],
]
#make magnet grid, air holes, and coils
crvs
=
[];
crvs
+=
[
circle
(
V2
(
0
,
0
),
mag_d
,
'
magnets_a
'
)]
for
i
in
range
(
3
):
#3-fold angular symmetry
vr
=
V2
(
cos
(
i
*
2
*
pi
/
3
),
sin
(
i
*
2
*
pi
/
3
))
vth
=
V2
(
cos
(
i
*
2
*
pi
/
3
+
pi
/
2
),
sin
(
i
*
2
*
pi
/
3
+
pi
/
2
))
vk
=
V2
(
cos
((
i
+
1
)
*
2
*
pi
/
3
),
sin
((
i
+
1
)
*
2
*
pi
/
3
))
for
j
in
range
(
Nr
):
for
k
in
range
(
Nr
+
1
):
magnet
s
+=
[
circle
(
2
*
s32
*
vr
*
(
j
+
1
)
+
2
*
s32
*
vk
*
k
,
mag_d
,
'
magnets_a
'
)]
crv
s
+=
[
circle
(
2
*
s32
*
vr
*
(
j
+
1
)
+
2
*
s32
*
vk
*
k
,
mag_d
,
'
magnets_a
'
)]
if
k
<
Nr
:
magnet
s
+=
[
crv
s
+=
[
circle
(
2
*
s32
*
vr
*
(
j
+
.
5
)
+
2
*
s32
*
vk
*
k
+
.
5
*
s
*
vth
,
mag_d
,
'
magnets_b
'
),
circle
(
2
*
s32
*
vr
*
j
+
2
*
s32
*
vk
*
k
+
s
*
vth
,
hole_d
,
'
holes
'
),
]
#coils
for
l
in
range
(
N
):
dd
=
(
l
-
(
N
-
1
)
/
2
)
*
wire_pitch
crvs
+=
[
arc
(
2
*
s32
*
vr
*
(
j
+
.
5
)
+
2
*
s32
*
vk
*
k
+
.
5
*
s
*
vth
,
s
+
dd
,
coil_params
[
k
][
2
*
j
][
0
]
+
i
*
120
,
coil_params
[
k
][
2
*
j
][
1
]
+
i
*
120
,
'
coils
'
)
]
if
j
<
Nr
-
1
or
k
>
0
:
crvs
+=
[
arc
(
2
*
s32
*
vr
*
(
j
+
1
)
+
2
*
s32
*
vk
*
k
,
s
+
dd
,
coil_params
[
k
][
2
*
j
+
1
][
0
]
+
i
*
120
,
coil_params
[
k
][
2
*
j
+
1
][
1
]
+
i
*
120
,
'
coils
'
)
]
#make traverses
for
l
in
range
(
N
):
dd
=
(
l
-
(
N
-
1
)
/
2
)
*
wire_pitch
crvs
+=
[
arc
(
2
*
s32
*
(
vr
+
vk
)
*
Nr
,
s
+
dd
,
270
+
i
*
120
,
180
+
i
*
120
,
'
coils
'
)
]
crvs
+=
[
arc
(
2
*
s32
*
vr
*
(
Nr
-
1
)
+
2
*
s32
*
Nr
*
vk
,
s
+
dd
,
270
+
i
*
120
,
360
+
i
*
120
,
'
coils
'
)
]
if
l
<
N
-
1
:
crvs
+=
[
arc
(
2
*
s32
*
vr
*
(
Nr
-
.
5
)
+
2
*
s32
*
Nr
*
vk
-
.
25
*
wire_pitch
*
vr
,
s
*
(
sqrt
(
3
)
-
1
)
+
dd
+
.
5
*
wire_pitch
,
180
+
i
*
120
,
0
+
i
*
120
,
'
coils
'
)
]
#make leads
v0
=
2
*
s32
*
vr
*
(
Nr
-
.
5
)
+
2
*
s32
*
Nr
*
vk
-
.
25
*
wire_pitch
*
vr
r0
=
.
5
*
(
s
*
(
sqrt
(
3
)
-
1
)
-
N
/
2.
*
wire_pitch
)
*
vr
r1
=
.
5
*
(
s
*
(
sqrt
(
3
)
-
1
)
+
N
/
2.
*
wire_pitch
)
*
vr
crvs
+=
[
line
(
v0
-
r0
,
v0
-
r0
+
lead_length
*
vth
,
'
coils
'
),
line
(
v0
+
r1
,
v0
+
r1
+
lead_length
*
vth
,
'
coils
'
),
]
if
__name__
==
'
__main__
'
:
main
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment