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
834699ac
Commit
834699ac
authored
Apr 27, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fix bug #1313076 (Filled Zones on technical layers) does not show up on 3D rendering
parent
29c8ec42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
17 deletions
+32
-17
3d_draw.cpp
3d-viewer/3d_draw.cpp
+25
-16
download_avhttp.cmake
CMakeModules/download_avhttp.cmake
+7
-1
No files found.
3d-viewer/3d_draw.cpp
View file @
834699ac
...
@@ -257,8 +257,8 @@ void EDA_3D_CANVAS::BuildBoard3DView()
...
@@ -257,8 +257,8 @@ void EDA_3D_CANVAS::BuildBoard3DView()
// Build a polygon from edge cut items
// Build a polygon from edge cut items
wxString
msg
;
wxString
msg
;
if
(
!
pcb
->
GetBoardPolygonOutlines
(
bufferPcbOutlines
,
allLayerHoles
,
&
msg
)
)
if
(
!
pcb
->
GetBoardPolygonOutlines
(
bufferPcbOutlines
,
allLayerHoles
,
&
msg
)
)
{
{
msg
<<
wxT
(
"
\n\n
"
)
<<
msg
<<
wxT
(
"
\n\n
"
)
<<
_
(
"Unable to calculate the board outlines.
\n
"
_
(
"Unable to calculate the board outlines.
\n
"
...
@@ -432,7 +432,7 @@ void EDA_3D_CANVAS::BuildBoard3DView()
...
@@ -432,7 +432,7 @@ void EDA_3D_CANVAS::BuildBoard3DView()
}
}
// Draw vias holes (vertical cylinders)
// Draw vias holes (vertical cylinders)
for
(
TRACK
*
track
=
pcb
->
m_Track
;
track
!=
NULL
;
track
=
track
->
Next
()
)
for
(
const
TRACK
*
track
=
pcb
->
m_Track
;
track
!=
NULL
;
track
=
track
->
Next
()
)
{
{
const
VIA
*
via
=
dynamic_cast
<
const
VIA
*>
(
track
);
const
VIA
*
via
=
dynamic_cast
<
const
VIA
*>
(
track
);
...
@@ -441,7 +441,7 @@ void EDA_3D_CANVAS::BuildBoard3DView()
...
@@ -441,7 +441,7 @@ void EDA_3D_CANVAS::BuildBoard3DView()
}
}
// Draw pads holes (vertical cylinders)
// Draw pads holes (vertical cylinders)
for
(
MODULE
*
module
=
pcb
->
m_Modules
;
module
!=
NULL
;
module
=
module
->
Next
()
)
for
(
const
MODULE
*
module
=
pcb
->
m_Modules
;
module
!=
NULL
;
module
=
module
->
Next
()
)
{
{
for
(
D_PAD
*
pad
=
module
->
Pads
();
pad
!=
NULL
;
pad
=
pad
->
Next
()
)
for
(
D_PAD
*
pad
=
module
->
Pads
();
pad
!=
NULL
;
pad
=
pad
->
Next
()
)
Draw3DPadHole
(
pad
);
Draw3DPadHole
(
pad
);
...
@@ -508,6 +508,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
...
@@ -508,6 +508,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
// to reduce time calculations
// to reduce time calculations
// for holes and items which do not need
// for holes and items which do not need
// a fine representation
// a fine representation
double
correctionFactorLQ
=
1.0
/
cos
(
M_PI
/
(
segcountLowQuality
*
2
)
);
CPOLYGONS_LIST
bufferPolys
;
CPOLYGONS_LIST
bufferPolys
;
bufferPolys
.
reserve
(
100000
);
// Reserve for large board
bufferPolys
.
reserve
(
100000
);
// Reserve for large board
...
@@ -517,8 +518,8 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
...
@@ -517,8 +518,8 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
CPOLYGONS_LIST
bufferPcbOutlines
;
// stores the board main outlines
CPOLYGONS_LIST
bufferPcbOutlines
;
// stores the board main outlines
// Build a polygon from edge cut items
// Build a polygon from edge cut items
wxString
msg
;
wxString
msg
;
if
(
!
pcb
->
GetBoardPolygonOutlines
(
bufferPcbOutlines
,
allLayerHoles
,
&
msg
)
)
if
(
!
pcb
->
GetBoardPolygonOutlines
(
bufferPcbOutlines
,
allLayerHoles
,
&
msg
)
)
{
{
msg
<<
wxT
(
"
\n\n
"
)
<<
msg
<<
wxT
(
"
\n\n
"
)
<<
_
(
"Unable to calculate the board outlines.
\n
"
_
(
"Unable to calculate the board outlines.
\n
"
...
@@ -610,22 +611,30 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
...
@@ -610,22 +611,30 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
continue
;
continue
;
BuildPadShapeThickOutlineAsPolygon
(
pad
,
bufferPolys
,
BuildPadShapeThickOutlineAsPolygon
(
pad
,
bufferPolys
,
linewidth
,
linewidth
,
segcountforcircle
,
correctionFactor
);
segcountforcircle
,
correctionFactor
);
}
}
}
}
else
else
module
->
TransformPadsShapesWithClearanceToPolygon
(
layer
,
module
->
TransformPadsShapesWithClearanceToPolygon
(
layer
,
bufferPolys
,
bufferPolys
,
0
,
segcountforcircle
,
correctionFactor
);
0
,
segcountforcircle
,
correctionFactor
);
module
->
TransformGraphicShapesWithClearanceToPolygonSet
(
layer
,
module
->
TransformGraphicShapesWithClearanceToPolygonSet
(
layer
,
bufferPolys
,
bufferPolys
,
0
,
segcountforcircle
,
correctionFactor
);
0
,
}
segcountforcircle
,
correctionFactor
);
// Draw non copper zones
if
(
g_Parm_3D_Visu
.
GetFlag
(
FL_ZONE
)
)
{
for
(
int
ii
=
0
;
ii
<
pcb
->
GetAreaCount
();
ii
++
)
{
ZONE_CONTAINER
*
zone
=
pcb
->
GetArea
(
ii
);
if
(
!
zone
->
IsOnLayer
(
layer
)
)
continue
;
zone
->
TransformSolidAreasShapesToPolygonSet
(
bufferPolys
,
segcountLowQuality
,
correctionFactorLQ
);
}
}
}
// bufferPolys contains polygons to merge. Many overlaps .
// bufferPolys contains polygons to merge. Many overlaps .
...
...
CMakeModules/download_avhttp.cmake
View file @
834699ac
...
@@ -38,6 +38,12 @@
...
@@ -38,6 +38,12 @@
# Where the library is to be installed.
# Where the library is to be installed.
set
(
PREFIX
${
DOWNLOAD_DIR
}
/avhttp
)
set
(
PREFIX
${
DOWNLOAD_DIR
}
/avhttp
)
if
(
KICAD_SKIP_BOOST
)
set
(
AVHTTP_DEPEND
""
)
else
()
set
(
AVHTTP_DEPEND
"boost"
)
endif
()
# Install the AVHTTP header only library ${PREFIX}
# Install the AVHTTP header only library ${PREFIX}
ExternalProject_Add
(
avhttp
ExternalProject_Add
(
avhttp
...
@@ -46,7 +52,7 @@ ExternalProject_Add( avhttp
...
@@ -46,7 +52,7 @@ ExternalProject_Add( avhttp
# grab it from a local zip file for now, cmake caller's source dir
# grab it from a local zip file for now, cmake caller's source dir
URL
${
CMAKE_CURRENT_SOURCE_DIR
}
/avhttp-master.zip
URL
${
CMAKE_CURRENT_SOURCE_DIR
}
/avhttp-master.zip
DEPENDS
boost
DEPENDS
${
AVHTTP_DEPEND
}
CONFIGURE_COMMAND
""
CONFIGURE_COMMAND
""
...
...
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