Commit Graph

639 Commits

Author SHA1 Message Date
Jeff Young 25c5c35176 Fix compile error on Linux. 2020-06-30 19:15:11 +01:00
Jeff Young 40a72d9530 Add SH_RECT handling to 3D shape conversion.
Also add some debugging for not-implemented shape cases in other
places to catch simmilar issues in future.

Fixes https://gitlab.com/kicad/code/kicad/issues/4757
2020-06-30 18:32:31 +01:00
Jeff Young da2b7071b4 WYSISYG custom pad editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2153

Fixes https://gitlab.com/kicad/code/kicad/issues/2305
2020-06-27 14:37:01 +01:00
Jeff Young d01b29ab37 Cleanup pad geometry handling.
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).
2020-06-22 22:28:37 +01:00
Jeff Young d89f8407e0 Const fixes. 2020-06-22 20:36:54 +01:00
Seth Hillbrand 08c61e6788 Ensure triangulation follows moving zone
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.
2020-06-17 19:43:11 -07:00
Seth Hillbrand a5500973a2 Fix SHAPE_ARC hittest and adjust radius return
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
2020-06-13 11:23:21 -07:00
Seth Hillbrand a8ab668122 Move SHAPE_ARC to start->mid->end format
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.
2020-06-13 11:23:14 -07:00
Seth Hillbrand df7b67e109 Fix missing virtual dtor 2020-06-11 11:26:55 -07:00
jean-pierre charras 64231a8491 fix a minor wxWidgets alert and a outdated comment. 2020-06-09 14:12:38 +02:00
Jeff Young 13493437d0 Add hole-inside-courtyard DRC checks.
One for NPTH and one for PTH; both default to "ignore".

Fixes https://gitlab.com/kicad/code/kicad/issues/3434
2020-05-14 22:02:47 +01:00
Jeff Young dfe4a00d43 Add distance reporting for copper item DRC tests.
Also adds some performance improvements.
2020-05-01 18:49:42 +01:00
Jeff Young a56191b658 Add distances to a bunch of DRC violation reports. 2020-05-01 18:49:42 +01:00
jean-pierre charras 25d7c0cae2 Opencascade: fix min version: OCE=0.18, OCC=6.9.0
Fix also a few minor Coverity warnings.
2020-04-16 10:22:20 +02:00
Tomasz Wlostowski 88d0092e43 libs: added POINT_INSIDE_TRACKER, a state-based class to track if a point is inside/outisde a dynamically built closed polyline 2020-04-15 13:00:48 +02:00
Tomasz Wlostowski 9b2fbae706 geometry: don't copy stuff in SHAPE_POLY_SET::GetRelativeIndices. Huge performance improvement for large polygons 2020-04-15 13:00:48 +02:00
Ian McInerney 37a4dd927b Allow deletion of zone cutout areas
ADDED: Ability to delete zone cutout areas

Fixes https://gitlab.com/kicad/code/kicad/issues/4188
2020-04-14 17:57:47 +01:00
jean-pierre charras 3e247a70d5 Gerber plot: new algo to generate solder mask layers with non 0 min thickness mask
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.
2020-03-28 16:32:46 +01:00
jean-pierre charras 78a7c7dfe0 Zones: fix a crash when adding a zone cutout to a zone having already holes.
Fixes #4039
https://gitlab.com/kicad/code/kicad/issues/4039
2020-03-12 14:42:32 +01:00
Wayne Stambaugh bc7df3239c Start unit tests for math library trigonometry functions.
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.
2020-03-05 07:34:26 -05:00
Wayne Stambaugh 9d6f64da9a Implement symbol library s-expression parser.
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.
2020-03-03 08:06:23 -05:00
Tomasz Wlostowski b7aea6f14c kimath: fix warning 2020-02-28 23:17:15 +01:00
Seth Hillbrand 797ff00367 Cleanup header
Missing function causes issues in Python now that the routine is gone.
2020-02-27 14:25:43 -08:00
Tomasz Wlostowski a42b86d3ac geometry: missing return in SEG::Contains() 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski f8f21ea81c geometry: SHAPE_LINE_CHAIN::Intersect should report each unique intersection only once 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 7b8fe9c1af geometry: allow constructing SHAPE_LINE_CHAINs from a flat vector of ints 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski fa04174ecf geometry: Contains(SEG) method in SEG 2020-02-27 22:02:56 +01:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Seth Hillbrand c52b3ce0e4 SHAPE_LINE_CHAIN: Add ability to insert arcs
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
2020-02-21 23:51:58 +00:00
jean-pierre charras 0ae3d0216a Fix a compil warning 2020-02-16 09:47:33 +01:00
Ian McInerney a0698723b9 Auto-rotate sheet pins onto the top and bottom when moving
Fixes https://gitlab.com/kicad/code/kicad/issues/2178
2020-02-15 18:45:10 +00:00
jean-pierre charras 48ae188b15 Zone filler: fix a few issues, in Smoothed Polygons mode.
- 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 #3812
https://gitlab.com/kicad/code/kicad/issues/3812
2020-01-26 18:19:24 +01:00
Seth Hillbrand c4fff95078 PNS: Detect collisions including newline width
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
2020-01-17 11:23:08 -08:00
Jeff Young 45ca0a5ab8 Avoid divide-by-zero. 2020-01-15 18:50:47 +00:00
Ian McInerney 6e8f06e042 Fixup some issues in libkimath
* Perform floating-point computations when needed
* Specify to use the default equality operator
2020-01-11 21:27:38 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Ian McInerney 9e5d52f92d Cleanup 2020-01-08 01:49:51 +00:00
Ian McInerney ffa30d75a3 Replace round_nearest with KiROUND 2020-01-07 23:27:29 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* 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.
2020-01-07 17:12:59 +00:00