127 Commits

Author SHA1 Message Date
Jeff Young
6a3f52dbaf Ignore negative layers when exporting Gerbers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16871
2025-02-19 23:43:53 +00:00
jean-pierre charras
89e80586cd Gerber export to pcb: handle rect aperture to draw lines on non copper layers
On copper layers, all lines are exported as tracks, so they always use a round
aperture.
Note also rect aperture to draw lines and arcs are deprecated since 2020

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19553
2025-01-09 11:02:15 +01:00
Seth Hillbrand
066380ffeb Clean up a few gerbview export to pcbnew layers
There's a lot of hard coded stuff in gerbview.  This removes a few
duplicated functions and gets the layer export back into working shape

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19552
2025-01-08 16:00:44 -08:00
jean-pierre charras
162d87f271 Gerber export to pcb fixes: update to use recent changes in Pcbnew V9
Use new layers id, arcs in tracks, and some recent changes in Sexpr
2025-01-08 20:32:53 +01: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
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
John Beard
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01:00
Marek Roszko
d1ecf3790c Add generator version 2023-11-29 16:17:41 +00:00
jean-pierre charras
79d750e883 Gerbview, export to PCB: fix incorrect export of flashed shapes on non copper layers.
Fixes #15613
https://gitlab.com/kicad/code/kicad/-/issues/15613
2023-09-11 14:19:27 +02:00
Jeff Young
140f76b870 Export rectangular aperture GBR_SEGMENTS as polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/14136
2023-04-15 22:32:26 +01:00
jean-pierre charras
00374f0a75 Gerbview: code refactor: change name of a member:
GERBER_DRAW_ITEM::m_Polygon -> m_ShapeAsPolygon
No actual code change.
2023-02-10 11:50:20 +01:00
jean-pierre charras
0d0c9aee3a Gerbview: code refactor: change name and type of a member:
GERBER_DRAW_ITEM::m_Shape -> m_ShapeType of type GBR_BASIC_SHAPES
Minor coding style fix.
2023-02-10 10:09:35 +01:00
jean-pierre charras
504adb3467 Eeschema Back annotation: fix broken handling of full sheet paths of symbols.
Fixes #12767
https://gitlab.com/kicad/code/kicad/issues/12767
2022-11-03 11:15:23 +01:00
Bevan Weiss
38b54b62e0 Fixes ability for Export to PCB new to handle plain Gerber drill files (gbr).
In addition to Excellon.

Also fixes issue with layer mapping dialogue text colors not updating on selection.


Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
2022-11-01 11:32:25 +00:00
jean-pierre charras
8963e4187a Gerbview,export_to_pcbnew: fix a crash and incorrect export of some shapes 2022-10-31 17:45:29 +01:00
Marek Roszko
ece23d434b Split up Double2Str to a format function to make its use case clear 2022-09-17 00:10:22 -04:00
jean-pierre charras
0b233d593a Gerbview: fix missing pad shapes when exporting to Pcbnew. 2022-09-08 18:43:07 +02:00
jean-pierre charras
7eeefdb3c5 Gerbview export to kicad_pcb file: remove calls to Simplify and Fracture.
They are not needed to export polygons because they are already fractured,
and these calls are very time consuming.
2022-05-05 19:26:31 +02:00
Jeff Young
65185f53a1 Rotate fp zones before comparing with library versions.
Also includes some performance fixes to not copy around triangulation
data when it's not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
Jeff Young
78385f7ab5 Clean some more tenths-of-degrees out of GerbView. 2022-01-18 02:14:09 +00:00
Marek Roszko
c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young
4ba3937f8a Cleanup. 2021-12-24 15:43:24 +00:00
Jeff Young
e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Jeff Young
6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh
cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Jeff Young
a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Jeff Young
1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
jean-pierre charras
a297e8f202 Gerbview, export to pcbnew: use gr_circle instead of polygon for flashed round shapes 2021-06-12 09:26:36 +02:00
luz paz
f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Jeff Young
2aaec31832 Don't put up "old version" warning for gerbview-generated PCBs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8574
2021-06-08 22:12:44 +01:00
Jon Evans
433e148e08 Move some string formatting functions out of base_units
Keeping them in base_units means that we can't introduce
any dependence on these functions to anything that needs to
compile without one of the unit defines (EESCHEMA, PCBNEW, etc)
2021-04-14 23:21:10 -04:00
Werni
0e44f5128c Add const specifiers 2020-11-18 19:50:36 +00:00
Jeff Young
522d64968e Yet more module -> footprint. 2020-11-13 15:16:24 +00:00
Marek Roszko
1d559108c8 Move LOCALE_IO out of common.h 2020-10-23 21:49:42 -04:00
Seth Hillbrand
f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
Ian McInerney
565bb268bb gerbview: Move more items to actions and tools
* Create a new inspection tool to hold the measure tool and
  the other inspection items
* Move some control functions from the frame to a tool and
  rearrange the code to be cleaner.
2020-10-09 01:55:31 +01:00
jean-pierre charras
04aa5519d0 Gerbview: code cleanup. Remove many include, now useless. 2020-09-30 12:56:55 +02:00
Jeff Young
88635ee5b6 Clean up error messages.
Convert a lot of nags to InfoBar errors/warnings/messages, and some
that never should have been exposed to wxFAIL_MSGs.
2020-08-31 14:19:57 +01:00
Jeff Young
39d4e422ea Better approximation for pads in Export Gerber to Pcbnew
We can't get all the way there because we can't create pads outside
of modules and the Gerbers don't store any grouping/footprint info.
This change moves us from outputing a via for every flashed item
(some of which don't even have holes) to synthesizing pads from
flashed items using a via (when they have holes) and a copper polygon.

This is much better for SMD pads, perhaps better for regular pads,
and no worse for vias.
2020-06-06 16:38:14 +01:00
Jeff Young
2043c8da8f Fix handling of flashed items in Gerber export to Pcbnew. 2020-05-20 19:50:39 +01:00
Ian McInerney
88e0ef548d gerbview: Add default filename to export to pcbnew function
Some platforms (such as Linux) don't automatically append file
extensions, so we should ensure extensions are correct and the user is
prompted accordingly.

Fixes https://gitlab.com/kicad/code/kicad/issues/3817
2020-01-26 15:44:30 +00:00
jean-pierre charras
8d649b5351 Gerbview: cleanup code.
Remove GERBER_FILE_IMAGE_LIST dependency to EDA_ITEM, useless.
GERBER_FILE_IMAGE: replace DLIST by std::deque to store gerber draw items.
Remove dead code
2019-12-31 11:58:43 +01:00
jean-pierre charras
25504319df Gerbview,export to pcbnew: avoid exporting not valid polygons.
Gerber regions are exported as polygons (they are filled polygon).
The fix ensure the polygons are simple and valid.
2019-12-15 11:50:19 +01:00
Seth Hillbrand
c4d853c1e8 SHAPE_LINE_CHAIN: Remove element access
This is the first step to allowing non-segments in the line chain.
External routines cannot be allowed to change the line chain without
going through the internal routines.  To accomplish this, we remove the
Vertex() and Point() access routines and only leave the const versions.
Transformations are given for both points as well as the chain itself.
2019-12-12 13:54:48 +00:00
jean-pierre charras
9dedbc74a3 Gerbview exporter: fix a wxASSERT. 2018-12-21 13:48:00 +01:00
jean-pierre charras
fa39acfc2f Gerbview, export to pcbnew : export polygons as new DRAWSEGMENT polygonal shape.
It can creates issues on copper layers, but the only one other alternative is to ignore polygons in export,
and this is worst.
2018-03-31 18:43:12 +02:00
jean-pierre charras
a0ac1a48c2 Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
Simon Richter
a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Wayne Stambaugh
652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Jon Evans
3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00