Commit Graph

133 Commits

Author SHA1 Message Date
Jeff Young 37906511f5 Class renaming.
DRAWSEGMENT  -> PCB_SHAPE
EDGE_MODULE  -> FP_SHAPE
TEXTE_PCB    -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Mikolaj Wielgus d14761bee6 Fix inches being sometimes used instead of mils 2020-10-03 20:06:56 +00:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
jean-pierre charras e76736b7bf Fix a few Coverity warnings 2020-10-03 12:47:41 +02:00
jean-pierre charras 87a220b8e2 more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
Ian McInerney ff463842a8 Fix memory management with DIMENSION shapes
The previous way leaked the temporary SHAPE that was used
to construct the shared_ptr. Also, emplace_back shouldn't
be used with make_shared - since we already have the shared_ptr
and emplace_back will try to construct a new one.
2020-10-01 20:11:35 +01:00
Jeff Young 4165ae6df1 Make zero-stripping sensitive to locale separator.
Fixes https://gitlab.com/kicad/code/kicad/issues/5813
2020-09-30 23:27:03 +01:00
Jeff Young ae3ef90f7d Add location points to dimension message bar info.
Fixes https://gitlab.com/kicad/code/kicad/issues/5673
2020-09-25 00:43:30 +01:00
Jeff Young e16b7626cd Implement GetMsgPanelInfo for dimensions.
Fixes https://gitlab.com/kicad/code/kicad/issues/5673
2020-09-24 22:23:59 +01:00
Jon Evans acf13a1869 ADDED: Orthogonal dimension object 2020-09-21 23:55:02 -04:00
Jeff Young 13f1de8e73 Forgot a bunch of files from last commit. 2020-09-19 19:53:58 +01:00
Jeff Young 64fa400b19 Ease translation a bit.
Also improves the SNR and consistency of the menu item text.  For
instance, a position is rarely useful, while relative sizes can be.

Also removes some unnecessary repitition, such as "Graphic Rectangle"
when "Rectangle" communicates the necessary information.
2020-09-19 18:49:06 +01:00
Jeff Young d402d93487 Implement shape routines for DIMENSION_Ts.
This allows them to participate in DRC and PNS.

Fixes https://gitlab.com/kicad/code/kicad/issues/5712
2020-09-19 14:16:00 +01:00
jean-pierre charras a1439881b7 Fix a collision name with a Windows header. 2020-09-17 07:46:02 +02:00
Jon Evans e9b627bfd8 ADDED: Center marker dimension type 2020-09-16 20:55:11 -04:00
Jon Evans 75ffce1a0b ADDED: Leader dimension object
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5555
2020-09-15 23:37:38 -04:00
Jon Evans 0347515cec Support text expansion in dimensions 2020-09-12 10:23:19 -04:00
Jon Evans 30a428677f Change rotation command to only impact dimension text 2020-09-11 21:12:36 -04:00
Jon Evans 76c4c959e6 Implement new dimension properties
- Automatic units mode (follow UI units)
- New text and number formatting options
- Automatic/manual text orientation control
- New text positioning options (inline and manual)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4280
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4497
2020-09-11 21:12:36 -04:00
Jon Evans f1b7903a7d WIP: Implement new dimension properties 2020-09-11 21:12:36 -04:00
Jon Evans b11e315d10 Refactor DIMENSION to hide internal details; add some new properties
This is a board file format change to account for the new properties.
Also, we now only store the critical information about the dimension's
geometry in the board, rather than storing every drawn line.

The DIMENSION object is now an abstract base, and ALIGNED_DIMENSION
is the implementation that exists today (we will add more dimension
types in the future)
2020-09-11 21:12:36 -04:00
Maciej Suminski a289056a9e Properties meta-data for pcbnew classes 2020-07-05 22:44:38 +02:00
Maciej Suminski 89698a727b Removed const modifier for returned non-reference types 2020-07-05 22:44:38 +02:00
Jeff Young 6acd35c981 Cleanup. 2020-06-27 20:07:26 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young 7f1b409305 Remove dead legacy print code. 2020-04-20 17:03:38 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05: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
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Jeff Young 1c153c55c0 Add default units and precision for new dimension objects.
Fixes: lp:1846376
* https://bugs.launchpad.net/kicad/+bug/1846376
2019-11-05 17:22:51 +00:00
Jeff Young 37af3adffb Add preference for flip axis.
Fixes: lp:1836267
* https://bugs.launchpad.net/kicad/+bug/1836267
2019-07-14 10:36:48 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young fd546da640 Homogenize hit testing and selection return types.
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Jeff Young 5c646119a7 Allow user-specification of dimension units.
Also fixes a units bug when round-tripping a dimension through
the file format.

Fixes: lp:1782797
* https://bugs.launchpad.net/kicad/+bug/1782797
2018-07-21 13:50:21 +01:00
Jeff Young 5ce0f8ba54 Kill off a few more g_UserUnit references.
(cherry picked from commit 452b1a7)
2018-07-17 15:12:07 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young b99ea159c8 Rationalize select menu texts.
Be consistent with order, formatting, etc.
Remove debug stuff such as zone timestamp and net code.
Clean up misleading pad messages.

(cherry picked from commit 2132109)
2018-07-17 15:09:48 +01:00
Jon Evans a8b1c2a8f2 Change dimension style to improve display and be more standard 2018-03-25 21:50:57 -04:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
Tomasz Włostowski a4528988ca pcbnew: fix graphical polygon movement, rotation, flipping and edit points synchronization.
Fixes: lp:1738449
* https://bugs.launchpad.net/kicad/+bug/1738449

Fixes: lp:1738032
* https://bugs.launchpad.net/kicad/+bug/1738032
2017-12-18 18:25:45 +01:00
Tomasz Włostowski 0245912c34 refactoring: split BOARD_ITEM::SwapData to use polymorphic per-item methods 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 81d1e17f02 refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00