Commit Graph

145 Commits

Author SHA1 Message Date
jean-pierre charras e46f706d4b Add Set/GetOrientationDegrees and GetOrientationRadians for texts, pads and footprints to avoid internal units to usual angle units conversion in code (and avoid mistakes).
It should help if (or when) the internal angle unit used in kicad will be changed from 0.1 degree (a relic of code written for PCs without fpu) to degree ( a more natural unit).
2016-05-02 12:49:14 +02:00
Wayne Stambaugh 2b6889bc7a Pcbnew: footprint text layer visibility improvements. (fixes lp:1527994)
* Always hide footprint text when the layer that the text resides is disabled
  in the layer manager.  There is no longer a difference between the value and
  reference text compared to other field text.
* The usual smattering of coding policy fixes and general code cleaning.
2016-04-20 11:28:44 -04:00
Patrick Pereira 342ba51e6d Allow arbitrary angles for footprint field texts 2016-04-08 19:18:44 -04:00
unknown 450c2e4371 fix Tickness typo 2016-02-11 16:02:37 +01:00
Maciej Suminski a4ffb065d4 Corrected TEXTE_MODULE:GetBoundingBox() function. 2015-08-07 18:17:51 +02:00
jean-pierre charras 9f61254839 Fix bug #1480619 (Moving silkscreen reference of rotated footprints glitches in GAL) 2015-08-02 11:19:01 +02:00
jean-pierre charras 4b4d9d9770 Plot solder mask layer: fix incorrect margin of zones drawn on this layer (zone areas were slighly larger than the actual areas)
Fix a few  minor and very minor other issues: coverity warnings and compil warning.
2015-08-01 12:20:23 +02:00
jean-pierre charras 75d02086ad Modedit: fix a minor bug in footprint transform (polygons not mirrored or rotated in global footprint transform).
Code cleaning: in class EDGE_MODULE and TEXTE_MODULE, remove duplicate methods for  fp edition (about rotation, mirroring and move) and add comments.
2015-07-31 21:04:30 +02:00
Maciej Suminski 74584e2081 Fixed crash on undo layer change in TEXTE_MODULE. 2015-07-24 09:42:46 +02:00
jean-pierre charras 351914da9d Fix minor and very minor compil and Cppcheck warnings. 2015-07-06 19:56:05 +02:00
Maciej Suminski d3b31316ba Fixed module text visibility settings (GAL). 2015-06-16 17:03:36 +02:00
Simon Schubert cfeabde282 Grey out text in high-contrast mode. 2015-05-27 22:13:51 +02:00
jean-pierre charras c9b9ccd2b6 Fix issue #1429665 (eeschema doesn't recognize .sch file when the LIBS section is empty. But the section is not used, just a comment, therefore can be empty).
Very minor other fixes.
2015-03-09 10:25:39 +01:00
John Beard 873e0740e8 Fix bug in footrpint editor when creating circular arrays. (fixes lp:1424331) 2015-02-28 12:39:05 -05:00
jean-pierre charras b1cd42cf08 Pcbnew: simplify draw code in default canvas and plot functions by removing the plot LINE option, which is not existing in all plotters, not existing in opengl/cairo canvas, and not usefull in default canvas. 2015-02-02 09:06:39 +01:00
jean-pierre charras 9cfb97d8b4 Add hight contrast option in Modedit. In hight contrast mode, solder masks and solder paste are shown.
this option was possible only by modifying the way display options are managed.
before these changes, display options were a global DISPLAY_OPTIONS class instance.
Now each EDA_DRAW_FRAME(and derivated classes)  includes its own DISPLAY_OPTIONS class instance.
As a consequence, some duplicate display option variables in these classes have been removed, because there were just duplicate variables of the  DISPLAY_OPTIONS class instance.
2015-01-10 11:27:49 +01:00
Wayne Stambaugh 1dc5178095 Message panel consistency improvements and coding policy fixes.
* Make title capitalization consistant.
* Replace some instances of module with footprint.
* Use angle instead of orientation where appropriate.
* Remove abbreviations where it made sense.
* Coding policy fixes.
2014-11-15 14:06:05 -05:00
jean-pierre charras 24f516f6ae Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc. 2014-11-02 17:25:04 +01:00
Marco Ciampa 40f044bd8d More renaming instances of module to footprint for consistency. 2014-11-02 07:44:57 -05:00
Lorenzo Marcantonio 94f8c2a276 Implemented TEXTE_MODULE::GetShownText
Handles % macro expansion in user texts inside pcb modules.
At the moment the following are available:
%%      A plain %
%R      Insert the reference
%V      Insert the value
2014-10-04 17:15:38 +02:00
jean-pierre charras b653da5e29 change name TEXTE_MODULE::MirrorWithModule to TEXTE_MODULE::MirrorTransformWithModule, because it is a function specific to a footprint transform in modedit.
change also name TEXTE_MODULE::RotateWithModule to TEXTE_MODULE::RotateTransformWithModule for same reason.
Pcbnew: fix Bug #1374484 (text changes position when module is flipped and rotated). Fix also some bugs in modedit, in block commands.
2014-09-27 18:39:18 +02:00
jean-pierre charras aa9de21cd7 Ref and Value for footprints: use now the layer color, not a specific color: this is needed by the fact these fields can be on an other layer than silk screen, and therefore must have the corresponding color
Also do not allow copper layers, solder paste and solder mask: put Ref or Value on these layers has no sense, and can create serious issues on the board.
2014-09-14 17:34:37 +02:00
Lorenzo Marcantonio 260ca0e79f Added support for decoupling stored text from shown text in EDA_TEXT
Factored out text ellipsing support to max 15 character (for generating menu items)
2014-09-13 20:15:45 +02:00
Lorenzo Marcantonio 0da38e5b62 More work on module texts, and especially on the collector
The members SetIgnoreMTextsOnCopper, SetIgnoreMTextsOnCmp,
SetIgnoreModulesOnCu, SetIgnoreModulesOnCmp in the collector guide are
renamed to the clearer SetIgnoreMTextsOnBack, SetIgnoreMTextsOnFront,
SetIgnoreModulesOnBack, SetIgnoreModulesOnFront

Modified the collector and drawing behaviour for text in modules as
discussed in the mailing list.

* Now module text on layers different than Silk should work! *

Still need UI support for setting the layer in the module editor.
2014-09-11 18:35:19 +02:00
Lorenzo Marcantonio 424aac6cf2 TEXTE_MODULE cleanup in preparation for text on different layers
- Removed the friends MODULE and FOOTPRINT_EDIT_FRAME from TEXTE_MODULE
  (as in the @todo comment)

- Refactored the Rotate/Flip/Mirror for text in modules into the
  TEXTE_MODULE class itself (members RotateWithModule, FlipWithModule,
  MirrorWithModule)

- New behaviour in coloring text on screen: reference and value still
  take the color from the MOD_TEXT_FR_VISIBLE and MOD_TEXT_BK_VISIBLE
  visibles; other text takes the color of the layer containing it
  (except when hidden, obviously) but still get its visibility
  controlled by those visibles (probably the most intuitive and useful
  behaviour)

- Still need to decide: should text on a layer be hidden when the layer
  is? Probably yes (still to be implemented);

- Some comment fixed and many cast converted to static_cast
2014-09-10 17:18:42 +02:00
jean-pierre charras 5a38d2b657 Rework on env. variable KISYS3DMOD. Until now, was used in different files using different ways, so no consistency between files.
code cleanup.
2014-08-24 09:05:07 +02:00
Maciej Suminski 953f71df3e Move() method updates local coordinates in EDGE_MODULE, D_PAD and TEXTE_MODULE classes. 2014-07-09 11:59:24 +02:00
Dick Hollenbeck 4578ea8b9e 1) Add 32 Cu Layers.
2) Change from legacy Cu stack to counting down from top=(F_Cu or 0).
   The old Cu stack required knowing the count of Cu layers to make
   sense of the layer number when converting to many exported file types.
   The new Cu stack is more commonly used, although ours still gives
   B_Cu a fixed number.
3) Introduce class LSET and enum LAYER_ID.
4) Change *.kicad_pcb file format version to 4 from 3.
5) Change fixed names Inner1_Cu-Inner14_Cu to In1_Cu-In30_Cu and their
   meanings are typically flipped.
6) Moved the #define LAYER_N_* stuff into legacy_plugin.cpp where they
   can die a quiet death, and switch to enum LAYER_ID symbols throughout.
7) Removed the LEGACY_PLUGIN::Save() and FootprintSave() functions.
   You will need to convert to the format immediately, *.kicad_pcb and
   *.kicad_mod (=pretty) since legacy format was never going to know
   about 32 Cu layers and additional technical layers and the reversed Cu
   stack.
2014-06-24 11:17:18 -05:00
Lorenzo Marcantonio 342016b692 Constification of HitTest and GetParent
In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect
2014-05-04 19:08:36 +02:00
Maciej Suminski 25dfbcd39f Upstream merged. 2014-02-07 09:52:47 +01:00
Maciej Suminski 8e6019748a GAL takes into account hidden module text settings. 2014-01-26 22:02:48 +01:00
Maciej Suminski 7784365b39 Fixed bounding box for module texts. 2014-01-07 14:09:27 +01:00
jean-pierre charras 5f01f123de All: GetBoundingBox returns now a const EDA_RECT.
Pcbnew: Code cleaning and bug fix in autoplace functions
Dialog exchange footprints has now a separate button to update the .cmp file, only on request.
2013-11-24 18:48:14 +01:00
jean-pierre charras 44d9607461 Pcbnew: Fix incorrect bounding box calculation of texts. Only noticeable with boards conveted from Eagle, which are using other text justification than center.
Eagle plugin: filter and replace not allowed chars in FPID(-':' and '/')  by _ or -, if they are used in Eagle footprint names (otherwise, boards converted and saved under kicad_pcb format are not readable by Pcbnew).
2013-11-05 18:12:27 +01:00
Maciej Suminski 460dcfc621 Removed SELECTION layer. 2013-10-02 11:39:08 +02:00
Maciej Suminski 000f1122b1 Moved selection marking boxes to a different layer. 2013-09-04 16:18:37 +02:00
Maciej Suminski 2a45987d46 Module texts are now moveable, rotatable and flippable. 2013-09-03 14:15:37 +02:00
Maciej Suminski d73d153665 Added selection boxes for texts. 2013-08-09 15:04:10 +02:00
Maciej Suminski 36f1147da1 Upstream merge. 2013-07-08 15:05:12 +02:00
jean-pierre charras 5c247857d3 Replace in EDA_TEXT::Draw the parameter EDA_DRAW_PANEL* aPanel by EDA_RECT* aClipBox, which is the actual parameter used by Draw.
This change make more easy to  use this function when a EDA_DRAW_PANEL canvas is not used to draw texts.
Remove dead code in worksheet.cpp.
2013-06-29 11:52:22 +02:00
Maciej Suminski e9ebdf2583 Upstream merge. 2013-06-05 10:01:53 +02:00
Lorenzo Marcantonio af5a9a8de9 Removed Show code from BOARD_ITEM derived classes (as requested by Dick) 2013-05-05 12:23:18 +02:00
Lorenzo Marcantonio d00c83cde9 Migrated the interfaces accepting angles to the double type
The plan goes like this:
- eeschema still uses int in decidegrees
- all the other things internally use double in decidegrees (or radians
  in temporaries)
- in pcbnew UI the unit is *still* int in decidegrees

The idea is to have better precision everywhere while keeping the user with int i
angles. Hopefully, if a fractional angle doesn't come in from the outside, everything
should *look* like an integer angle (unless I forgot something and it broke)

When the time comes, simply updating the UI for allowing doubles from the user should
be enough to get arbitrary angles in pcbnew.
2013-05-05 09:17:48 +02:00
Lorenzo Marcantonio 0e903dba5b Angle and distances cleanup (preparing for angles in doubles)
- Removed spurious int casts (these are truncated anyway and will break
  doubles)

- Applied the Distance, GetLineLength, EuclideanNorm, DEG2RAD, RAD2DEG
  ArcTangente and NORMALIZE* functions where possible

- ArcTangente now returns double and handles the 0,0 case like atan2, so
  it's no longer necessary to check for it before calling

- Small functions in trigo moved as inline
2013-05-01 19:32:36 +02:00
Maciej Suminski 07cd3bcb56 Upstream merged 2013-04-10 15:03:35 +02:00
Lorenzo Marcantonio 42709330e0 Better strings for the translators (converted concatenations to formats) 2013-04-09 19:49:01 +02:00
Lorenzo Marcantonio 20eaf66d5b Hunted down hardcoded pixel size thresholds for drawing
Dynamic contrast for netname and pin numbers ('halo' text)
Handle netname drawing even on diagonal tracks
2013-04-09 19:16:53 +02:00
Lorenzo Marcantonio b525e3be55 Factored out text anchor drawing
More layer classification cleanup
2013-04-09 18:00:46 +02:00
Lorenzo Marcantonio 204d085b64 More cleanup on layer code usage
Better description for entities on right click menu and panel
Typo fixes and some comment reformats
2013-04-07 13:55:18 +02:00
Maciej Suminski 4e4776c370 Showing module's value and reference text on proper layers. 2013-04-02 11:03:15 +02:00