The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
This implements a copper-layer RTree with functions for iterating over
the elements in a copper layer and providing Nearest Neighbor returns
for BOARD_CONNECTED_ITEMS
A 360° arc will have the mid point on the opposite side of the circle
from both the start and end points. This will make both slopes the
same, leading to a degeneracy in the calculation. We address this by
noting that the center will be halfway between the midpoint and the
start point.
Returning the poly index is not useful as it does not allow the use of
other SHAPE_POLY_SET Hole* functions that expect to get the indices of
holes rather than the outline
the old calculations was creating a slightly too small shape for rounded corners.
Now the polygon is outside the perfect shape (as required to create a shape with clearance)
Fixes#4805https://gitlab.com/kicad/code/kicad/issues/4805
1) An actual distance of 0 is still a collision, even if the allowed
distance is 0.
2) Be consitent about edges and interiors. Everyone expect the edge
of a RECT to be part of the RECT; same with a CIRCLE. SHAPE_POLY_SET
shouldn't be any different. (And SHAPE_LINE_CHAIN was a split-
personality with the edge considered part of it for Collide() but not
for PointInside()).
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.
This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
Dragging filled zones in OpenGL was extremely slow due to the
invalidated triangulation cache. Moving the zone should also move the
triangles and keep the cache valid.
The hittest needs to use distance calc rather than squared distance.
This also adjusts the radius value to be double as to avoid unneeded
loss of precision
The arc shapes need to connect with their adjacent points. By storing
the relevant points, we allow exact point matching on both ends of the
arc as well as localize point storage.
Previously, all overlapping polygons (pads and min thickness areas to remove) were
merged.
Drawback: pads attributes are lost. In Gerber this is annoying.
Now the pads are plot as flashed or Regions items, and min thickness areas are added
but shapes are not merged and keep their attributes.
This only tests the InterceptsPositiveX() and InterceptsNegativeX() used
for finding the midpoint of an arc.
Tidy up some of the trigo.h header Doxygen comments.
This implements all existing symbol library object support and the ability
to save and load symbol library files between file formats for round robin
testing.
Creates new substructure for arc management. Existing functions provide
wrapper to use SHAPE_LINE_CHAIN as normal, without arcs while also
permitting the addition of arcs into the chain
- Fix non optimal shape of solid polygons after inflate transform.
- Add a small extra clearance ((2 microns) when creating clearance areas
(especially, convert arc to polygons create small differences)
- Add a small threshold (1 micron) in drc test distances to avoid false positives
- fix a minor issue in TransformOvalToPolygon that created sometimes a not perfect shape
Fixes#3812https://gitlab.com/kicad/code/kicad/issues/3812
The new line collision search uses BBox() to check for colliding
objects. BBox in the SHAPE_LINE_CHAIN did not include width as the
chains were assumed to be zero-width. This is not the case for
PNS::LINE elements.
We mostly don't notice this because DRC checks for SEGMENT collisions
but it becomes obvious/annoying when we cannot place a track for unknown
reasons and the snap-back doesn't take line width into account.
Fixes#3776 | https://gitlab.com/kicad/code/kicad/issues/3776
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.