16 Commits

Author SHA1 Message Date
Wayne Stambaugh
f161d94521 Common folder housekeeping part 2. 2025-01-14 15:25:05 -05:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
John Beard
85552c7a4f SVG import: import beziers as beziers
This maintains a little bit more editability and avoid importing
thousands of tiny line segments when not required.
2025-01-01 01:14:41 +08:00
John Beard
3bd3b8073e SVG import: avoid duplicating points in line chains
Every new section duplicated the start/end points.

This saves half the points when importing. They're skipped later
before they end up as real items, but it's confusing to trace
through (and theoretically inefficent, but it'll be tiny).
2025-01-01 01:14:41 +08:00
John Beard
10485848b8 SVG import: import unclosed, filled shapes as a separate fill and stroke object
This means that validly unclosed paths can be imported correctly.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18477
2025-01-01 01:14:41 +08:00
Seth Hillbrand
a724b3d8b1 Handle DXF files with out of bounds values
First, ensure that we calculate the bbox of the imported elements.

If the total BBOX is outside our allowed value, refused to import.  This
needs to be scaled or addressed in an external editor

If the bbox fits, then make sure that we clamp it such that the largest
element is still within our bounds

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18523
2024-08-14 13:06:18 -07:00
Jeff Young
dba2fdb6d3 Don't import invalid polygons.
If we *do* get a 2-point polygon in SVG, import it as a segment.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17091
2024-02-25 12:28:19 +00:00
Jeff Young
df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00:00
Alex Shvartzkop
21adc0aac5 ADDED: Import vector graphics into Schematic editor (SVG, DXF). 2023-10-09 07:04:50 +03:00
Alex Shvartzkop
60d069757a ADDED: Import vector graphics into Symbol editor (SVG, DXF). 2023-10-09 07:04:50 +03:00
Alex Shvartzkop
bc846f5fca SVG import: skip shapes that are not stroked and not filled. 2023-09-08 14:46:04 +03:00
Alex Shvartzkop
024622b0f6 SVG import: skip invisible shapes. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop
3bd8ff442d SVG import: set C locale to make fractional units work. 2023-09-02 18:57:18 +03:00
Alex Shvartzkop
5131dae568 Graphics import improvements/fixes:
- add support for color
- support non-uniform scale
- add GetImageBBox()
- fix SVG GetImageWidth/Height not being in mm
- fix import offset not being in mm
- add graphics importer for LIB_SYMBOL
2023-08-18 22:52:49 +03:00
Alex Shvartzkop
4e43d4e0db Graphics import: support loading from memory buffer. 2023-08-18 22:52:40 +03:00
Alex Shvartzkop
26a52ecfe9 Move parts of import_gfx to common. 2023-08-18 22:43:54 +03:00