Jeff Young
07013d00e1
More EDA_ANGLE.
2022-01-14 16:08:19 +00:00
Tomasz Wlostowski
78968f75c0
SHAPE_POLY_SET: polysets can now be built from a bunch of arbitraily ordered oriented outlines. Used by the SVG hole support
2021-12-31 17:04:16 +01:00
jean-pierre charras
29c3601061
SHAPE_POLY_SET: add FullPointCount(), mainly for statistics and debug.
2021-10-24 15:06:24 +02:00
Roberto Fernandez Bautista
4b8ca18bf7
Remove unfinished code for handling arcs in SHAPE_POLY_SET::booleanOp
...
Boolean Ops on polygons with arcs are not supported (the only exception
is Simplify)
Also fix a bug in SHAPE_LINE_CHAIN::splitArc that resulted in an
exception
Partially fixes https://gitlab.com/kicad/code/kicad/-/issues/9380
2021-10-13 18:29:32 +01:00
Seth Hillbrand
c1e6fdfb47
Polygon triangulation: Check for broken remainders
...
If the last three points of a tesselation are concave, we will never be
able to triangulate them. They were likely formed from a bad polygon,
so we will drop the triangle and return completed
Fixes https://gitlab.com/kicad/code/kicad/issues/9380
2021-10-12 12:14:42 -07:00
Jon Evans
e2368b733c
Allow selection of NPTH pads with zero copper size
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9249
2021-09-26 18:17:50 -04:00
Jeff Young
46949abe4a
Don't scroll to highlight an object already visible.
2021-09-25 15:31:52 +01:00
Seth Hillbrand
28bd734313
Prevent invalid paths in fracture
...
We are not always sure of the path validity in fracture. Nominally, the
Clipper Simplify routine should remove invalid parts but in the case
where it doesn't, we need to recover gracefully, even if the output
polygon is not valid.
Fixes https://gitlab.com/kicad/code/kicad/issues/9199
2021-09-21 10:49:39 -07:00
Jeff Young
f64abcba36
Restore BBoxCache usage for zone fill performance.
2021-09-09 16:43:47 +01:00
Jeff Young
c00f4ed5d2
Add regression tests for track cleaner.
2021-08-03 16:17:18 +01:00
Wayne Stambaugh
78e5e98ea0
Pass VECTOR2I objects by reference instead of on the stack.
2021-07-27 08:41:27 -04:00
Wayne Stambaugh
4c457b5ed3
More NULL expunging.
2021-07-18 14:31:55 -04:00
Jon Evans
3103ff9aa3
Fix display of filled polygons with arcs in the outline
2021-07-04 12:10:59 -04:00
Jon Evans
ddc20dadc0
Formatting and spelling tweaks
2021-07-03 15:43:40 -04:00
Roberto Fernandez Bautista
cee5920d5c
Remove dead code (SHAPE_LINE_CHAIN::DetectArcs)
2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista
778c64de88
Implement ClearArcs() and check curved polys don't get a booleanOp
...
We cannot (yet) support passing several curved outlines through clipper.
In these cases, the caller should ClearArcs() before processing.
2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista
260a9d0540
Use ZFillFunction to modify arcs post clipper (does not fully work yet)
...
Added a unit test to verify union and intersection of polygons result
in desired results: subject + clip - intersect == union
2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista
437e2783fb
Use Clipper Z value to detect arcs post clipper
2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista
c1361ae173
SHAPE_POLY_SET: Detect arcs after boolean operations
2021-07-03 19:37:50 +00:00
Seth Hillbrand
8521deb38d
De-scope ClipperLib namespace
2021-07-03 19:37:50 +00:00
Seth Hillbrand
4f4deece6d
ADDED support for reading/writing arcs in polys
...
This adds support for reading and writing arc elements in polygons.
2021-07-03 19:37:50 +00:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Jeff Young
976e756b02
Formatting.
2021-06-03 18:33:59 +01:00
Jon Evans
2c05d99d9f
SHAPE_POLY_SET: Fix segment collision testing
...
It appears as though there was an optimization to skip testing segments if
one of their endpoints (and only the A point) was inside. Unclear the reason
for this, but I'm going to assume that it was intended to optimize the case
where both points are inside (like the point case above it).
2021-04-04 20:12:45 -04:00
Jon Evans
bd6539885b
Fix SHAPE_POLY_SET::SquaredDistanceToPolygon ignoring aNearest if unlucky
2021-04-04 19:38:54 -04:00
Dominik Wernberger
e2aa7be4b3
Added a lot of consts and refactored a few lines
2021-03-08 12:49:48 -08:00
Jeff Young
e89f9db438
Footprint disallow layer checking needs to be based on courtyards.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7620
2021-02-20 14:13:36 +00:00
Roberto Fernandez Bautista
2d66abdc89
CADSTAR PCB Archive Importer: More improvements to loading of zones
...
Adds a new function Area() to SHAPE_POLY_SET
2021-02-10 18:49:21 +00:00
Seth Hillbrand
73886aecb1
Ensure partially triangulated polys are not valid
...
Moves rule area triangulation outside of layer iterator and keeps the
triangulation_valid flag false until the triangulation has been
completed.
Fixes https://gitlab.com/kicad/code/kicad/issues/7032
2021-01-29 16:33:57 -08:00
Jon Evans
ea351fde69
Recache polygon triangulation when mirroring
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6265
2020-12-20 10:45:24 -05:00
Jeff Young
bc484784fc
Make sure zones are triangulated for DRC.
...
Normally this happens as a side-effect of rendering them but if done
from a script (or test case) this won't happen.
Fixes https://gitlab.com/kicad/code/kicad/issues/6635
2020-12-12 15:27:46 +00:00
Ian McInerney
be4b6ec06a
Cleanup compiler warnings
2020-12-09 23:13:33 +00:00
Jeff Young
791a50b493
Remove work-around in favour of real fix in Clipper.
2020-11-04 11:21:45 +00:00
Jeff Young
55c25f3cc4
Work around a round-off bug in Clipper.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6260
2020-11-02 17:43:13 +00:00
Tomasz Wlostowski
5b4f463c38
kimath: SHAPE_POLY_SET::Format() outputs C++-like code now, like other shapes
2020-10-23 01:18:01 +02:00
Wayne Stambaugh
8185a416b9
Fix broken build on Linux with gcc.
2020-10-22 08:36:28 -04:00
Jeff Young
9ff49277e1
Add implicit rule generation for keepout areas.
...
Also implements collision detection for SHAPE_POLY_SET.
Fixes https://gitlab.com/kicad/code/kicad/issues/6105
2020-10-22 10:41:21 +01:00
Jeff Young
bfd04926b5
Performance improvement for polyset fracture.
2020-10-20 22:26:47 +01:00
Ian McInerney
48a5907412
Remove extraneous debug statements
2020-10-08 17:56:54 +01:00
Tomasz Wlostowski
db9e111838
kimath: SHAPE_POLY_SET should re-parent triangulated polygons when copied/cloned
2020-10-08 15:22:17 +02:00
Jeff Young
bf67648562
Support optional location reporting in SHAPE collisions.
...
Also fixes a few bugs in the collision routines.
2020-09-28 23:28:33 +01:00
Tomasz Wlostowski
482767a850
libs/kimath: implement indexable subshape support for SHAPE_COMPOUND and SHAPE_POLY_SET
2020-09-27 16:45:46 +02:00
Jeff Young
0f3d2147aa
Performance enhancements for DRC.
2020-09-17 20:13:39 +01:00
jean-pierre charras
9f85730987
Make SHAPE_POLY_SET::CacheTriangulation() behavior same as previously.
...
Previously, SHAPE_POLY_SET::CacheTriangulation() was able to handle polygons
with holes.
Due to recent changes, CacheTriangulation( true ) handle polygons with holes,
but CacheTriangulation( false ) did not handle polygons with holes, due to a
missing call to Fracture(), lost in latest changes.
This is now fixed.
Fixes #5606
https://gitlab.com/kicad/code/kicad/issues/5606
2020-09-13 17:55:59 +02:00
Seth Hillbrand
03f510ff0d
Ensure segmented polys have outlines
...
In the event the calculation removes outlines, we need to keep the
original polygon
Fixes https://gitlab.com/kicad/code/kicad/issues/5594
2020-09-11 08:45:11 -07:00
Seth Hillbrand
08d4e91f3b
Change partitions to fixed size
...
Partititioning small polygons causes excessive partitions when we use a
fixed number of cells per side. Partitioning by size keeps the
partition count limited and speeds the calculations.
Also adds an option to not partition the grid for elements (like 3d
raytracing) that do not need it.
Fixes https://gitlab.com/kicad/code/kicad/issues/5579
2020-09-10 09:31:20 -07:00
Seth Hillbrand
37e268c162
Remove incorrect short-circuit of rotate
2020-09-08 14:10:23 -07:00
Seth Hillbrand
efb03b7482
Optimize loading new footprints
...
When loading footprints, we need to skip the triangulation trigger in
rotate. If the triangulation cache is invalid when starting the
rotation, do not retriangulate after the rotation.
2020-09-08 11:17:50 -07:00
Tomasz Wlostowski
aee06e46b0
SHAPE_POLY_SET: split polygons into rectangular cell grids to obtain more regular triangulations
2020-09-08 01:31:42 +02:00
Jeff Young
463100d67f
Remove a long-standing hack to keep divots out of adjacent zones.
...
The new algorithm unions any adjacent zones before doing the
chamfer/fillet and then subtracts the other zones back out afterwards.
Fixes https://gitlab.com/kicad/code/kicad/issues/3812
2020-08-12 22:20:08 +01:00