3D viewer: Modify yhe way board items shapes are built:
* All items shapes are converted to polygons. * Polygons are merged layer by layer (for calculation time reasons,zones are not merged) * for copper layers, vias and pads holes are substracted from polygons (but, for calculation time reasons, not inside zones areas). * the look is better, mainly when displaying the copper thickness * solder and paste layers are now shown in 3D viewer. * the code was seriously cleaned (but still needs to be enhanced). * Note this is a work in progress which needs refinements.
This commit is contained in:
@@ -38,8 +38,24 @@
|
||||
#include <pcbnew.h>
|
||||
#include <zones.h>
|
||||
|
||||
/* Build the filled solid areas data from real outlines (stored in m_Poly)
|
||||
* The solid areas can be more than one on copper layers, and do not have holes
|
||||
( holes are linked by overlapping segments to the main outline)
|
||||
* aPcb: the current board (can be NULL for non copper zones)
|
||||
* aCornerBuffer: A reference to a buffer to store polygon corners, or NULL
|
||||
* if NULL:
|
||||
* - m_FilledPolysList is used to store solid areas polygons.
|
||||
* - on copper layers, tracks and other items shapes of other nets are
|
||||
* removed from solid areas
|
||||
* if not null:
|
||||
* Only the zone outline (with holes, if any) are stored in aCornerBuffer
|
||||
* with holes linked. Therfore only one polygon is created
|
||||
* This function calls AddClearanceAreasPolygonsToPolysList()
|
||||
* to add holes for pads and tracks and other items not in net.
|
||||
*/
|
||||
|
||||
int ZONE_CONTAINER::BuildFilledPolysListData( BOARD* aPcb, std::vector <CPolyPt>* aCornerBuffer )
|
||||
bool ZONE_CONTAINER::BuildFilledSolidAreasPolygons( BOARD* aPcb,
|
||||
std::vector <CPolyPt>* aCornerBuffer )
|
||||
{
|
||||
if( aCornerBuffer == NULL )
|
||||
m_FilledPolysList.clear();
|
||||
|
||||
Reference in New Issue
Block a user