Commit Graph

370 Commits

Author SHA1 Message Date
jean-pierre charras 536bba294b Do not round a rotation angle to 0.1 degree.
Also ensure the rotation angle is not truncated when displaying
info for Footprints and Pads

Fixes #6058
https://gitlab.com/kicad/code/kicad/issues/6058
2020-10-30 17:59:04 +01:00
jean-pierre charras 2cb23277f3 Fix bounding box update after rotation. 2020-10-27 14:18:29 +01:00
Werni a7d5d1f091 Add more consts all over the place 2020-10-27 11:03:35 +00:00
Jeff Young d1c73cb1d5 Clean up MODULE effective shape memory handling. 2020-10-25 23:38:21 +00:00
Jeff Young ccfa0f5189 fixup! Implement MODULE::GetEffectiveShape() 2020-10-25 20:18:33 +00:00
Jeff Young 0e686d377b Implement MODULE::GetEffectiveShape() 2020-10-25 19:51:03 +00:00
Jeff Young 386cefbe84 Do footprint keepouts by courtyard.
Fixes https://gitlab.com/kicad/code/kicad/issues/6162
2020-10-25 18:17:58 +00:00
jean-pierre charras 15369915cc Minor code cleanup: move "extern" declarations to convert_drawsegment_list_to_polygon.h 2020-10-23 08:48:52 +02:00
Jeff Young cce557b9ad Redo the board-edge-building logic to return better error reports.
Fixes https://gitlab.com/kicad/code/kicad/issues/6119
2020-10-22 21:29:04 +01:00
Seth Hillbrand 4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Jeff Young ebc8e2c921 Move property manager tokens to HKI macro.
This leaves them untranslated internally but makes sure their
translation strings exist so they can be dynamically translated
at the GUI level.

Fixes https://gitlab.com/kicad/code/kicad/issues/6020
2020-10-16 16:59:52 +01:00
Marek Roszko a1c75748a0 Remove GetChars(), a wxWidgets 2.9 compatibility hack 2020-10-15 20:53:25 -04:00
Marek Roszko 52a12c6ccd Remove kicad_string.h from footprint_info.h 2020-10-15 18:39:43 -04:00
Jeff Young 92d84b0d67 Naming updates. 2020-10-15 01:35:16 +01:00
Jeff Young 04f61fb1f2 Rebuild groups as a separate pass (required for nested groups).
Fixes https://gitlab.com/kicad/code/kicad/issues/5858
2020-10-13 17:58:24 +01:00
jean-pierre charras 57da733f56 Avoid loss of data when saving a board having duplicate UUID
Some  (old) boards used for panelisation can have duplicate UUID
(timestamp). duplicate timestamps create loss of data when saving these boards.

Fixes #5969
https://gitlab.com/kicad/code/kicad/issues/5969
2020-10-11 19:07:28 +02:00
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
Mark Roszko a28a0e14ba Fix conversion warnings 2020-10-05 10:41:14 +00:00
Jeff Young 7a4900b8dc PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
Jeff Young ba26e056ec Implement groups for modedit.
This uncovered a memory corruption bug in MODULE's move operator,
several bugs in MODULE's move and copy constructors, and a bug in
BOARD's GetItem() call.

It also bumps the file format for saving/restoring groups inside
footprints.
2020-10-03 12:19:50 +01:00
jean-pierre charras 87a220b8e2 more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
Seth Hillbrand bf3cb0b1d0 Standardize pad type enums 2020-09-30 08:38:35 -07:00
jean-pierre charras 456735f803 VIEW::ViewGetLOD() returns double now instead of int.
ViewGetLOD() returns the minimal value of a zoom to show an item.
However a zoom is a double, and using int as minimal value does not
allows setting a correct value in some cases.
2020-09-21 17:55:24 +02:00
jean-pierre charras 4db4a0a46f Pcbnew, PCB_PAINTER: very minor enhancement for commit 2751c677 2020-09-21 08:56:53 +02: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
jean-pierre charras 121ccc3a10 Fix broken MODULE::HitTest()
HitTest was using a rotated bounding box, but the bounding box
is already right.
2020-09-19 19:37:58 +02:00
PJM f3586ccd45 Pcbnew: Make 'GetBoundingBox' return correct answer when passed false
CHANGED: 'GetBoundingBox' has a variant that accepts a boolean that
determines if invisible text is included in the Bbox calculations.  The
'IsVisible' function for the value and reference strings doesn't
factor in if the layer it's on is visible or even in the PCB stackup,
so 'GetBoundingBox' returns a bbox that factors in invisible text
regardless of what it's passed.  This MR fixes that problem.

CHANGED: Refactored the original 'GetBoundingBox' function that doesn't
take a parameter.  It now just calls the variant that does take a
parameter and passes it 'true'.  The two versions had a lot of
duplicate code and this eliminates it.

Note: Issue 5629 might be better solved at the PCB module level, but this
does fix the known problems caused by it which were discovered in
'GetBoundingBox'.

Fixes https://gitlab.com/kicad/code/kicad/issues/5629
2020-09-17 00:59:07 +00:00
Marek Roszko a82edb60fe Rotate the bounding box for hit tests on the fly 2020-09-16 23:29:21 +00:00
Marek Roszko 721c30e464 Make SetPosition and SetOrientation simply adjust the bounding box rather than continously recalculate it.
SetPosition is called on every pixel of a move operation which could be performance impacting on some systems.
2020-09-16 23:29:21 +00:00
Tomasz Wlostowski 2c1bd645b2 pcbnew: initial support for GetEffectiveShape() for zones and modules 2020-09-08 01:31:42 +02:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01: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 14a9c8dc42 Fix printing for introduction of zone layers and meta items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5298
2020-08-30 22:49:27 +01:00
Jeff Young beb370a3e5 Another typo. 2020-08-28 14:42:30 +01:00
Jeff Young e7db43285f ADDED new footprint fabrication attributes.
This commit also adds mapping of the new symbol properties
"exclude from BOM" and "exclude from board" to be correctly
handled in Update Board from Schematic.

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/2233
2020-08-28 11:05:58 +01:00
Seth Hillbrand 35eda030a2 pcbnew: Ensure we are cloning pads
When calling MODULE::Clone() we need to clone the pads as well or we
will end up with scm churn when running undo/redo operations
2020-08-24 19:40:08 -07:00
Jeff Young 5589cdf921 Copy properties in module operator= and copy constructors.
Fixes https://gitlab.com/kicad/code/kicad/issues/5256
2020-08-19 22:45:40 +01:00
Ian McInerney 8bca145b75 Initialize the PCB_LAYER_T enum in the property manager
Since all the property descriptions are static initialization, each instance
should contain the code to initially populate the enum if it is empty,
otherwise an assert is thrown warning the enum may be empty.
2020-08-18 22:42:56 +01:00
Jeff Young 7342532276 Remove auto. 2020-08-15 17:32:13 +01:00
Jeff Young 692aeff334 Fix a bunch of usages of copy ctor that really meant duplicate.
In particular, "duplicate" means "with a new KIID".

Fixes https://gitlab.com/kicad/code/kicad/issues/5127
2020-08-10 14:23:11 +01:00
Jeff Young 6b7503be8e ADDED properties passed between eescema and pcbnew.
And referencable from textVars.

Fixes https://gitlab.com/kicad/code/kicad/issues/5079
2020-08-08 22:49:04 +01:00
Seth Hillbrand 0a5f11fb37 Keep item ordering as much as possible
The ordering goes first by type and then by uuid.  In the case of
DRAWSEGMENT and EDGE_MODULE, we also sort by shape type before UUID.

Fixes https://gitlab.com/kicad/code/kicad/issues/4068
2020-07-25 12:56:19 -07:00
Jeff Young 095937563b Hook libeval compiler up to rule parser
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
  board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
  don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
Ian McInerney 5ba0855c36 Add move operators to MODULE
This fixes a memory leak in the std:: containers in MODULE
that is noticable when moving a module on the board and cancelling
the operation.
2020-07-16 02:11:51 +01:00
jean-pierre charras 0ff866895a module and pad display info: add rotation angle.
This is a useful parameter, so it must be displayed on the pmessage panel.
2020-07-06 15:00:36 +02:00
Tomasz Wlostowski 539984229d Temporarily disable D_PAD/MODULE GetLocalClearance property in introspection engine 2020-07-05 22:44:38 +02:00
Maciej Suminski 04728278c0 Updated classes meta-data to take advantage of property replacement 2020-07-05 22:44:38 +02:00
Maciej Suminski a289056a9e Properties meta-data for pcbnew classes 2020-07-05 22:44:38 +02:00
Jeff Young 304328ca13 Fix Linux compile error. 2020-06-27 22:27:49 +01:00
Jeff Young 6acd35c981 Cleanup. 2020-06-27 20:07:26 +01:00