Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
74df72e9
Commit
74df72e9
authored
Jul 02, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Bug #1336534 pcbnew 3D viewer wrong vertical model offset.
parent
8a1fd493
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
info3d_visu.cpp
3d-viewer/info3d_visu.cpp
+9
-6
No files found.
3d-viewer/info3d_visu.cpp
View file @
74df72e9
...
@@ -115,29 +115,32 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
...
@@ -115,29 +115,32 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
// Init Z position of each layer
// Init Z position of each layer
// calculate z position for each copper layer
// calculate z position for each copper layer
// Z = 0 is the z position of the back (bottom) layer (layer id = 31)
// Z = m_EpoxyThickness is the z position of the front (top) layer (layer id = 0)
// all unused copper layer z position are set to 0
int
layer
;
int
layer
;
int
copper_layers_cnt
=
m_CopperLayersCount
;
int
copper_layers_cnt
=
m_CopperLayersCount
;
for
(
layer
=
0
;
layer
<
copper_layers_cnt
;
layer
++
)
for
(
layer
=
0
;
layer
<
copper_layers_cnt
;
layer
++
)
{
{
m_LayerZcoord
[
layer
]
=
m_LayerZcoord
[
layer
]
=
m_EpoxyThickness
*
layer
/
(
copper_layers_cnt
-
1
);
m_EpoxyThickness
-
(
m_EpoxyThickness
*
layer
/
(
copper_layers_cnt
-
1
)
);
}
}
#define layerThicknessMargin 1.1
#define layerThicknessMargin 1.1
double
zpos_offset
=
m_NonCopperLayerThickness
*
layerThicknessMargin
;
double
zpos_offset
=
m_NonCopperLayerThickness
*
layerThicknessMargin
;
double
zpos_copper_back
=
m_LayerZcoord
[
0
]
-
layerThicknessMargin
*
m_CopperThickness
/
2
;
double
zpos_copper_back
=
-
layerThicknessMargin
*
m_CopperThickness
/
2
;
double
zpos_copper_front
=
m_EpoxyThickness
+
layerThicknessMargin
*
m_CopperThickness
/
2
;
double
zpos_copper_front
=
m_EpoxyThickness
+
layerThicknessMargin
*
m_CopperThickness
/
2
;
// Fill remaining unused copper layers and front layer zpos
// Fill remaining unused copper layers and back layer zpos
// with m_EpoxyThickness
// with 0
// Solder mask and Solder paste have the same Z position
for
(
;
layer
<
MAX_CU_LAYERS
;
layer
++
)
for
(
;
layer
<
MAX_CU_LAYERS
;
layer
++
)
{
{
m_LayerZcoord
[
layer
]
=
m_EpoxyThickness
;
m_LayerZcoord
[
layer
]
=
0
;
}
}
// calculate z position for each non copper layer
// calculate z position for each non copper layer
// Solder mask and Solder paste have the same Z position
for
(
int
layer_id
=
MAX_CU_LAYERS
;
layer_id
<
LAYER_ID_COUNT
;
layer_id
++
)
for
(
int
layer_id
=
MAX_CU_LAYERS
;
layer_id
<
LAYER_ID_COUNT
;
layer_id
++
)
{
{
double
zpos
;
double
zpos
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment