KiCad PCB EDA Suite
|
Go to the source code of this file.
Macros | |
#define | MAX_NR_DIVISIONS 96 |
Typedefs | |
typedef std::vector< SFVEC2F > | KF_POINTS |
Functions | |
static bool | polygon_IsPointInside (const SEGMENTS &aSegments, const SFVEC2F &aPoint) |
static bool | intersect (const SEGMENT_WITH_NORMALS &aSeg, const SFVEC2F &aStart, const SFVEC2F &aEnd) |
static void | extractPathsFrom (const SEGMENTS_WIDTH_NORMALS &aSegList, const BBOX_2D &aBBox, SEGMENTS_WIDTH_NORMALS &aOutSegThatIntersect) |
static void | polygon_Convert (const SHAPE_LINE_CHAIN &aPath, SEGMENTS &aOutSegment, float aBiuTo3dUnitsScale) |
void | ConvertPolygonToBlocks (const SHAPE_POLY_SET &aMainPath, CONTAINER_2D_BASE &aDstContainer, float aBiuTo3dUnitsScale, float aDivFactor, const BOARD_ITEM &aBoardItem, int aPolyIndex) |
Use a polygon in the format of the ClipperLib::Path and process it and create multiple 2d objects (POLYGON_2D and DUMMY_BLOCK_2D) that can be used to represent this polygon area. | |
#define MAX_NR_DIVISIONS 96 |
Definition at line 270 of file polygon_2d.cpp.
Definition at line 268 of file polygon_2d.cpp.
void ConvertPolygonToBlocks | ( | const SHAPE_POLY_SET & | aMainPath, |
CONTAINER_2D_BASE & | aDstContainer, | ||
float | aBiuTo3dUnitsScale, | ||
float | aDivFactor, | ||
const BOARD_ITEM & | aBoardItem, | ||
int | aPolyIndex | ||
) |
Use a polygon in the format of the ClipperLib::Path and process it and create multiple 2d objects (POLYGON_2D and DUMMY_BLOCK_2D) that can be used to represent this polygon area.
aMainPath | the polygon are that was converted from the pcb board |
aDstContainer | the destination container to put the created sub blocks |
aBiuTo3dUnitsScale | the rendering target 3d scale |
aDivFactor | a division factor (in 3Dunits) to divide the polygon plane, 0.0f will use the internal polygon segm statistics |
Definition at line 378 of file polygon_2d.cpp.
References CONTAINER_2D_BASE::Add(), SHAPE_POLY_SET::AddOutline(), SHAPE_POLY_SET::BooleanIntersection(), SHAPE_POLY_SET::COutline(), extractPathsFrom(), BOX2< Vec >::GetBottom(), BBOX_2D::GetExtent(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), SHAPE_POLY_SET::Hole(), SHAPE_POLY_SET::HoleCount(), OUTERS_AND_HOLES::m_Holes, OUTERS_AND_HOLES::m_Outers, POLYSEGMENT::m_Start, SEGMENT_WITH_NORMALS::m_Start, BBOX_2D::Max(), MAX_NR_DIVISIONS, BBOX_2D::Min(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), path, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, polygon_Convert(), polygon_IsPointInside(), BBOX_2D::Reset(), BBOX_2D::ScaleNextUp(), SHAPE_LINE_CHAIN::SetClosed(), BBOX_2D::Union(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by RENDER_3D_RAYTRACE_BASE::Reload().
|
static |
Definition at line 305 of file polygon_2d.cpp.
References BBOX_2D::Inside(), intersect(), BBOX_2D::Intersects(), BBOX_2D::Max(), and BBOX_2D::Min().
Referenced by ConvertPolygonToBlocks().
|
static |
Definition at line 273 of file polygon_2d.cpp.
References SEGMENT_WITH_NORMALS::m_Precalc_slope, and SEGMENT_WITH_NORMALS::m_Start.
Referenced by EC_PERPLINE::Apply(), EC_LINE::Apply(), CornerListToPolygon(), and extractPathsFrom().
|
static |
Definition at line 351 of file polygon_2d.cpp.
References SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::PointCount(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ConvertPolygonToBlocks().
Definition at line 34 of file polygon_2d.cpp.
Referenced by ConvertPolygonToBlocks(), and POLYGON_2D::IsPointInside().