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
ea5a03f9
Commit
ea5a03f9
authored
Mar 14, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3D viewer: fix very minor issues (better rendering of 3D view).
parent
155a53dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
+21
-12
3d_draw.cpp
3d-viewer/3d_draw.cpp
+2
-2
3d_draw_basic_functions.cpp
3d-viewer/3d_draw_basic_functions.cpp
+1
-1
info3d_visu.cpp
3d-viewer/info3d_visu.cpp
+16
-0
info3d_visu.h
3d-viewer/info3d_visu.h
+2
-9
No files found.
3d-viewer/3d_draw.cpp
View file @
ea5a03f9
...
...
@@ -506,7 +506,7 @@ void EDA_3D_CANVAS::Draw3D_Via( SEGVIA* via )
Draw3D_ZaxisCylinder
(
via
->
GetStart
(),
(
outer_radius
+
inner_radius
)
/
2
,
thickness
,
outer_radius
-
inner_radius
,
zpos
,
biu_to_3Dunits
);
zpos
-
(
thickness
/
2
)
,
biu_to_3Dunits
);
if
(
layer
>=
top_layer
)
break
;
}
...
...
@@ -515,7 +515,7 @@ void EDA_3D_CANVAS::Draw3D_Via( SEGVIA* via )
color
=
g_ColorsSettings
.
GetItemColor
(
VIAS_VISIBLE
+
via
->
GetShape
()
);
SetGLColor
(
color
);
int
height
=
g_Parm_3D_Visu
.
GetLayerZcoordBIU
(
top_layer
)
-
g_Parm_3D_Visu
.
GetLayerZcoordBIU
(
bottom_layer
);
g_Parm_3D_Visu
.
GetLayerZcoordBIU
(
bottom_layer
)
-
thickness
;
int
zpos
=
g_Parm_3D_Visu
.
GetLayerZcoordBIU
(
bottom_layer
)
+
thickness
/
2
;
Draw3D_ZaxisCylinder
(
via
->
GetStart
(),
inner_radius
+
thickness
/
2
,
height
,
...
...
3d-viewer/3d_draw_basic_functions.cpp
View file @
ea5a03f9
...
...
@@ -212,7 +212,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const std::vector<CPolyPt>& aPolysList,
return
;
// Build the 3D data : vertical side
Draw3D_VerticalPolygonalCylinder
(
polylist
,
aThickness
,
aZpos
,
false
,
aBiuTo3DUnits
);
Draw3D_VerticalPolygonalCylinder
(
polylist
,
aThickness
,
aZpos
-
(
aThickness
/
2
)
,
false
,
aBiuTo3DUnits
);
}
...
...
3d-viewer/info3d_visu.cpp
View file @
ea5a03f9
...
...
@@ -192,3 +192,19 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
m_LayerZcoord
[
layer_id
]
=
zpos
;
}
}
/* return the Z position of 3D shapes, in 3D Units
* aIsFlipped: true for modules on Front (top) layer, false
* if on back (bottom) layer
* Note: in draw functions, the copper has a thickness = m_CopperThickness
* Vias and tracks are draw with the top side position = m_CopperThickness/2
* and the bottom side position = -m_CopperThickness/2 from the Z layer position
*/
double
INFO3D_VISU
::
GetModulesZcoord3DIU
(
bool
aIsFlipped
)
{
if
(
aIsFlipped
)
return
m_LayerZcoord
[
LAYER_N_BACK
]
-
(
m_CopperThickness
/
2
);
else
return
m_LayerZcoord
[
LAYER_N_FRONT
]
+
(
m_CopperThickness
/
2
);
}
3d-viewer/info3d_visu.h
View file @
ea5a03f9
...
...
@@ -110,18 +110,11 @@ public: INFO3D_VISU();
/**
* function GetModulesZcoord3DIU
* @return the Z
coordinate of the module
, in 3D Units
* @return the Z
position of 3D shapes
, in 3D Units
* @param aIsFlipped: true for modules on Front (top) layer, false
* if on back (bottom) layer
* Used to know the Z position of 3D shapes
*/
double
GetModulesZcoord3DIU
(
bool
aIsFlipped
)
{
if
(
aIsFlipped
)
return
m_LayerZcoord
[
ADHESIVE_N_BACK
]
-
m_NonCopperLayerThickness
;
else
return
m_LayerZcoord
[
ADHESIVE_N_FRONT
]
+
m_NonCopperLayerThickness
;
}
double
GetModulesZcoord3DIU
(
bool
aIsFlipped
);
/**
* function GetLayerZcoordBIU
...
...
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