Commit Graph

199 Commits

Author SHA1 Message Date
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Jeff Young 1539fa5af2 Move SHAPE_ARC to EDA_ANGLE. 2022-01-16 01:19:45 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Seth Hillbrand e7d0318fb2 Plot fonts in outline mode, not triangulated
Putting 1,000s of tiny triangles on a gerber file will cause mfg fits.
Instead, we use easy outline plotting for plots and triangulation for
everything else.
2022-01-13 17:04:14 -08:00
jean-pierre charras 0aca35bcab Eeschema, plot: fix missing initialization that created 0 size texts.
0 sized texts are hard to read
2022-01-11 20:47:16 +01:00
Seth Hillbrand 7ef8843545 Assign font if null
Fixes https://gitlab.com/kicad/code/kicad/issues/10370
2022-01-11 11:05:38 -08:00
Marek Roszko fcfe42d67c Continue the war on wxPoint 2022-01-10 19:52:26 -05:00
Jeff Young 236feeb592 Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.

Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 14:17:11 +00:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young 438c63f587 Fix outline font boundingbox issues. 2022-01-08 16:47:45 +00:00
Brian Mayton e4f73c8dc9 Add ORANGE to DXF output
Matches the schematic color options to DXF layers

Fixes https://gitlab.com/kicad/code/kicad/issues/10281

Signed-off-by: Seth Hillbrand <seth@kipro-pcb.com>
(cherry picked from commit d014f0307b)
2022-01-06 11:06:31 -08:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Mark Roszko 44dc602d6b Yeet wxPoint/wxSize out of PLOTTER 2021-12-29 19:02:50 +00:00
Jeff Young ccb94fd1a7 APIs for passing KIFONT::FONT pointers around.
Also some clean-up and bug fixes.
2021-12-29 17:32:19 +00:00
Jeff Young dd6cd7d184 Pull some more improvements in from rockola/kicad-strokefont.
This one is primarily about pushing TEXT_ATTRIBUTES in to the GAL
API, but it also includes adding EDA_ANGLE signatures to some trig
routines to ease integration.
2021-12-29 17:32:19 +00:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jonathan Haas 24472ff9e3 Add simple implementation of FILL_T::FILLED_WITH_COLOR for SVG plotter (custom color is ignored at this point) 2021-12-24 21:21:08 +00:00
Jeff Young b84a85f648 Cleanup dead code and stale TODOs. 2021-12-24 21:10:28 +00:00
Jeff Young 150dedbb83 Add dash-dot-dot lines for HPGL.
Also converts HPGL line types to fixed (rather than adaptive).  Varying
the pattern to fit each segment is going to look bad most of the time,
but particularly when stroking arcs or circles where HPGL will try to
repeat it for each chord segment.
2021-12-23 23:48:01 +00:00
Jeff Young 295a6408c3 User-configureable dash styles (and dash-dot-dot).
ADDED: Schematic Setup properties for dash length and gap length.
ADDED: dash-dot-dot line style

Fixes https://gitlab.com/kicad/code/kicad/issues/2206
2021-12-23 20:36:24 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
ADDED arc, circle and rectangle shapes for schematic.  Shapes support
line styles and fill colors.

CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).

Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Seth Hillbrand 52bbfb9109 Remove dependency of dot size on linear mils
Changes a dot to be a square pixel (linewidth x linewidth).  This allows
the removal of IU dependencies and ensures that a dot is always visible
on screen.  Also makes sure that cairo is setting the current linewidth
during its stroke routines

Fixes https://gitlab.com/kicad/code/kicad/issues/9362
2021-10-10 09:40:26 -07:00
Seth Hillbrand 548e5f49bd Clean up unused variable usage
Unused variables in function calls can be commented out.  Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Wayne Stambaugh 6427197962 Remove duplicate headers in plot and associated code. 2021-08-17 15:41:25 -04:00
Wayne Stambaugh 8f30404e42 Plot code cleaning. 2021-08-17 13:44:11 -04:00
jean-pierre charras 5f84071cfa Gerber plotter, GERBER_PLOTTER::plotArc( SHAPE_ARC& aArc ): fix missing G75 command 2021-08-06 17:45:57 +02: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 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh bcd6bddfd4 Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
david-beinder 8b3ccab0a3 Implement explicit polygon construction for most pad shapes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8650
2021-07-13 14:51:58 +00:00
jean-pierre charras 1151783a34 Gerbview: fix an issue (Debug only) with RoundRect aperture macro.
When a RoundRect aperture macro was used with a radius = 0, a wxWidget assert
was generated, due to incorrect polygonal shape to draw.
2021-07-13 10:23:55 +02:00
Mikolaj Wielgus 3d520ebe1e Replace `~...~` overbar syntax with `~{...}`
Fixes https://gitlab.com/kicad/code/kicad/issues/8134

Fixes https://gitlab.com/kicad/code/kicad/issues/4227
2021-06-11 18:40:57 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 20134e4a1b Evict some more eda_item.h includes 2021-06-08 19:12:29 -04:00
Wayne Stambaugh 08e8b17029 Minor plotter code improvements. 2021-06-07 14:32:27 -04:00
Seth Hillbrand cccdaddd50 Adding SHAPE_ARC direct plotting 2021-06-03 17:12:56 -07:00
Seth Hillbrand 3d4ce0796e Add Gerber plot for SHAPE_ARC and SHAPE_LINE_CHAIN 2021-06-03 17:12:56 -07:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
jean-pierre charras aee1593678 Fix wxWidgets alerts
Fixes #8346
https://gitlab.com/kicad/code/kicad/issues/8346
2021-05-02 16:02:33 +02:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
jean-pierre charras fc04ece458 PDF plotter: fix a incorrect item in the header.
Fixes #5593
https://gitlab.com/kicad/code/kicad/issues/5593
2021-04-06 11:28:56 +02:00
Jonathan Haas 55679be2e3 Fix some typos across the codebase 2021-04-05 16:15:25 +02:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Jeff Young 2ad5108e7d Don't depend on wxWidgets dotted and dashed line styles.
Turns out they're buggy on OSX.

Fixes https://gitlab.com/kicad/code/kicad/issues/7144
2021-02-05 16:18:28 +00:00
jean-pierre charras fabafe719d Use aperture macro for custom pads. Optimize aperture macros for free polygons.
These aperture macros were previously used but only for chamfered round rect.
They are now also used for custom pads (previously drawn as regions).
They are also optimized, i.e. only one aperture macro is created for a given shape.
(previously, one aperture macro was created for each chamfered round rect pad.)

So now all pads are flashed.
2021-01-30 18:14:58 +01:00