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
e30ceb0a
Commit
e30ceb0a
authored
Feb 16, 2011
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 3d drawing of board edges defined in modules, now pcb edge layer is always drawn.
parent
314aa18e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
3d_draw.cpp
3d-viewer/3d_draw.cpp
+20
-15
No files found.
3d-viewer/3d_draw.cpp
View file @
e30ceb0a
...
@@ -661,6 +661,7 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
...
@@ -661,6 +661,7 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
/* Draw module shape: 3D shape if exists (or module outlines if not exists) */
/* Draw module shape: 3D shape if exists (or module outlines if not exists) */
S3D_MASTER
*
Struct3D
=
m_3D_Drawings
;
S3D_MASTER
*
Struct3D
=
m_3D_Drawings
;
bool
As3dShape
=
FALSE
;
bool
As3dShape
=
FALSE
;
if
(
g_Parm_3D_Visu
.
m_Draw3DModule
)
if
(
g_Parm_3D_Visu
.
m_Draw3DModule
)
{
{
glPushMatrix
();
glPushMatrix
();
...
@@ -673,6 +674,7 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
...
@@ -673,6 +674,7 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
{
{
glRotatef
(
(
double
)
m_Orient
/
10
,
0.0
,
0.0
,
1.0
);
glRotatef
(
(
double
)
m_Orient
/
10
,
0.0
,
0.0
,
1.0
);
}
}
if
(
m_Layer
==
LAYER_N_BACK
)
if
(
m_Layer
==
LAYER_N_BACK
)
{
{
glRotatef
(
180.0
,
0.0
,
1.0
,
0.0
);
glRotatef
(
180.0
,
0.0
,
1.0
,
0.0
);
...
@@ -692,26 +694,29 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
...
@@ -692,26 +694,29 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
glPopMatrix
();
glPopMatrix
();
}
}
if
(
!
As3dShape
)
EDA_ITEM
*
Struct
=
m_Drawings
;
glNormal3f
(
0.0
,
0.0
,
1.0
);
// Normal is Z axis
for
(
;
Struct
!=
NULL
;
Struct
=
Struct
->
Next
()
)
{
{
// The footprint does not have a 3D shape, draw its 2D shape instead
switch
(
Struct
->
Type
()
)
EDA_ITEM
*
Struct
=
m_Drawings
;
{
glNormal3f
(
0.0
,
0.0
,
1.0
);
// Normal is Z axis
case
TYPE_TEXTE_MODULE
:
break
;
for
(
;
Struct
!=
NULL
;
Struct
=
Struct
->
Next
()
)
case
TYPE_EDGE_MODULE
:
{
{
switch
(
Struct
->
Type
()
)
EDGE_MODULE
*
edge
=
(
EDGE_MODULE
*
)
Struct
;
{
case
TYPE_TEXTE_MODULE
:
break
;
case
TYPE_EDGE_MODULE
:
// Draw module edges when no 3d shape exists.
(
(
EDGE_MODULE
*
)
Struct
)
->
Draw3D
(
glcanvas
);
// Always draw pcb edges.
break
;
if
(
!
As3dShape
||
edge
->
GetLayer
()
==
EDGE_N
)
edge
->
Draw3D
(
glcanvas
);
}
break
;
default
:
default
:
break
;
break
;
}
}
}
}
}
}
}
...
...
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