Commit Graph

62 Commits

Author SHA1 Message Date
Alex Shvartzkop 82a0227c20 Don't plot polygon borders when they are disabled. 2024-01-15 22:35:35 +03: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
Wayne Stambaugh 50ec069a01 Fix build warnings. 2023-10-12 10:10:09 -04:00
Alex Shvartzkop b0f4adf052 Improve borderless items logic in schematic plotting. 2023-10-12 08:40:37 +03:00
Alex Shvartzkop d9c123b1ec HPGL plotting: write rects as polygons to prevent always filling. 2023-10-12 06:11:12 +03:00
Alex Shvartzkop 45791ff8d6 HPGL plotting: fix random lines connecting to circles. 2023-10-12 06:11:12 +03:00
Alex Shvartzkop 4c0a75cbd4 Fix an assert in HPGL plotter. 2023-10-12 06:11:11 +03:00
Alex Shvartzkop 10e2e4a12d Another try at fixing arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Alex Shvartzkop 717ee350c8 Support >180 deg arcs in schematic. 2023-08-07 14:18:38 +03:00
jean-pierre charras 88ffcec4b5 Plotters (especially DXF) add more precision when plotting arcs (and others)
- in DXF coordinates were using 6 digits for coordinate mantissa: this is not
enough for coord in inches. Now use 16 digits
- Arc( VECTOR2I& aCentre, EDA_ANGLE& aStartAngle, EDA_ANGLE& aEndAngle, ...)
was using integers for coord. This creates significant errors for start point
and end points of the arc. Now the center is given in double, and its position
is calculated from angle end points (and radius) to do not generate a position error
for these end points (previously the error could be 20 ... 50 nm)
Fixes #15056
https://gitlab.com/kicad/code/kicad/-/issues/15056
2023-07-06 18:09:38 +02:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Jeff Young 122a6d7f46 Move hypertext linking to user-page-numbers.
Also moves most navigation code to SCH_NAVIGATION_TOOL.
Also changes page number href to anchor syntax ('#foo').
Also adds hypertext processing to SCH_TEXTBOXes.
Also adds combobox with schematic pages to text properties dialog.
2022-08-27 19:17:43 +01:00
luz paz 79fa911e0e Fix various typos
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Jeff Young b512d64148 Naming conventions. 2022-06-29 07:34:46 -06:00
Jeff Young dbbdc9d2e6 Don't rely on the penWidth already being set when setting the dash style.
Fixes https://gitlab.com/kicad/code/kicad/issues/11908
2022-06-29 07:34:45 -06:00
jean-pierre charras 91dfa79a67 Plot pad outlines on Fab files: fix many issues.
Depending on plotter type and pad type, the plotted shapes were not always the outlines,
but a outline inside the pad shape (due to legacy reasons).
In many cases the plotted shape was in fact incorrect.
(only noticeable for very small pads)
Now the actual pad outlines are plotted without modification.
Fixes #11484
https://gitlab.com/kicad/code/kicad/issues/11484
2022-04-28 12:42:43 +02:00
jean-pierre charras d2cf68bcdd Plotters: add plot Arcs using EDA_SHAPE or center, start point and end point.
It avoid trying to calculate arc angles (start, end or arc angle) that
frequently create issues due to reverse Y axis, plot mirrored and/or
angle normalization with different criteria.
Fixes #10914
https://gitlab.com/kicad/code/kicad/issues/10914
2022-02-20 17:17:20 +01:00
Jeff Young fbab335128 Retire DPOINT and DSIZE. 2022-01-20 21:10:04 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Mark Roszko 44dc602d6b Yeet wxPoint/wxSize out of PLOTTER 2021-12-29 19:02:50 +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 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
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
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
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
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Wayne Stambaugh 08e8b17029 Minor plotter code improvements. 2021-06-07 14:32:27 -04:00
jean-pierre charras 15cc368918 Gerber plotter: prepare optimization of aperture macros type free polygons.
They are used for chamfered round rect pads, and can be used for custom shaped pads.
No actual change currently, but the shape rotation of custom pads and chamfered rr pads
can be now used in gerber plots.
2021-01-23 21:15:27 +01:00
Alexis Lockwood 6f228f9dea hpgl_plotter: correct formatting 2021-01-05 22:42:21 +00:00
Alexis Lockwood f5b7595675 Add user coordinate support to HPGL plotter 2021-01-05 22:42:21 +00:00
Alexis Lockwood f1aa82aad6 HPGL_PLOTTER: add missing include 2020-12-19 10:16:42 -07:00
jean-pierre charras bd7c3447e0 Fix a few compil issues.
Round 2: Fixes #6782
https://gitlab.com/kicad/code/kicad/issues/6782
2020-12-18 16:16:16 +01:00
jean-pierre charras 34fb55dc9c Fix a compil issue.
Fixes #6782
https://gitlab.com/kicad/code/kicad/issues/6782
2020-12-18 14:17:20 +01:00
Alexis Lockwood 4ce91d3e92 HPGL improvements and optimizations for physical plotters
- Sort HPGL plots for speed
- Reduce HPGL circle precision for tiny circles
- Teach HPGL plotter about filled rectangles
2020-12-18 07:21:59 +00:00
Alexis Lockwood 54d2748032 HPGL driver: collect graphics to plot later
This will later enable sorting the items for efficiency, which will then
facilitate things that would otherwise be impossibly slow (e.g.
switching pens)
2020-12-18 07:21:59 +00:00
Alexis Lockwood 5937b38312 HPGL: Fix bug when plotting negative line widths 2020-12-18 07:21:59 +00:00
Alexis Lockwood a59cab24b8 HPGL: Fix missing point in custom pad outline 2020-12-18 07:21:59 +00:00
Jeff Young 7933935b4a Naming conventions. 2020-11-16 00:04:55 +00:00
Marek Roszko b9f1601418 Rename PLOT_MODE to OUTLINE_MODE 2020-10-15 19:33:18 -04:00
Marek Roszko eb33c33f15 Rename EDA_DRAW_MODE_T to PLOT_MODE 2020-10-15 19:30:07 -04:00
Marek Roszko 1538d737e7 Split out FILL_T to its own header to avoid spreading eda_item everywhere 2020-10-14 21:51:23 -04:00
Marek Roszko 12d21e34e2 Remove trigo.h from eda_text.h 2020-10-13 23:37:48 -04:00
Marek Roszko b2e9f6987d Split base_struct into eda_item and eda_rect 2020-10-13 21:24:50 -04:00
Jeff Young 1703729269 Require explicit decl of maxError and errorLocations.
This should reduce both performance issues and clearance issues.
2020-10-13 13:49:07 +01:00
jean-pierre charras 6b958ff4e0 Move specialized plotter classes from plotter.h to specific plotter_xx.h
plotter.h contains now only a header common to all plotters.
The code does not actually change, but it allows modifying a specific plotter
without recompiling most of kicad files.
2020-09-27 09:54:39 +02:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01: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