Commit Graph

198 Commits

Author SHA1 Message Date
Seth Hillbrand 6bcf1839b7 pcbnew: Add arc approximation setting to board
This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments.  This allows the user to customize their speed vs. accuracy
tradeoff.  The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
2019-05-24 21:21:06 -07:00
Seth Hillbrand 0a668ee550 pcbnew: Remove segment count from board file
This removes the setting for number of segments per circle from the zone
definition.  All segment counts are handled by absolute error allowed.
2019-05-24 21:13:53 -07:00
Seth Hillbrand f7c042a357 pcbnew: Allow curves in custom pads
Updates custom pad functions to permit adding arbitrary curves to the
primitives
2019-05-08 15:54:26 -07:00
Jeff Young dae41b7460 Remove legacy segment-based zones.
Give the user the option of cancelling a file open if there are
segment zones; otherwise they're converted to polygon fills.

Fixes: lp:1823087
* https://bugs.launchpad.net/kicad/+bug/1823087
2019-04-12 20:19:23 +01:00
Seth Hillbrand 6f4d1345f3 pcbnew: Handle old stable translated layers
This inserts a translation map in the layer names so that the old stable
files with Italian/French layer names get updated to the standard
English layer names (instead of not opening).

Fixes: lp:1370575
* https://bugs.launchpad.net/kicad/+bug/1370575
2019-04-01 13:54:25 -07:00
jean-pierre charras 7170720f3c Allow hatch pattern in filled zones
the filled areas can use a hatch pattern (crossing lines) using square holes.
The zone filler removes too small holes (truncated holes) from hatch pattern.
It avoid to create small holes when a hole pattern is truncated by the filled area base shape.
2019-03-31 08:21:40 +02:00
jean-pierre charras 353d9d7c9e Pcbnew, Zone refill: avoid useless refilling, when zone parameters are not modified.
Previously, in many cases the selected zone was refilled on exit selection, even if the zone was not modified.
This is annoying, because the zone fill can be really time consuming, and cannot be called without a good reason.
Now the refilling is made only if a zone parameter is actually modified.
2019-03-14 17:33:25 +01:00
jean-pierre charras d259459a14 Pcbnew: add a new primitive pad shape: chamfered round rect pad.
Allows 0 to 4 chamfered corners, not only one.

A custom shape allow this kind of shape. However because it is a primitive,
it is easier to edit and it support thermal reliefs.
2019-03-11 10:26:15 +01:00
Seth Hillbrand 0c723778f0 pcbnew: Set default missing soldermask min width
When loading an existing file, a missing value in the soldermask min
width value should not be interpreted as a default value but rather as a
0 value.  This corrects an issue introduced by 4d709d2392
2019-01-22 17:01:32 -08:00
Jeff Young 78daaa8825 Allow cancel, delete or rescue when opening pcbs with undefined layers.
Fixes: lp:1796596
* https://bugs.launchpad.net/kicad/+bug/1796596
2018-12-07 00:26:10 +00:00
jean-pierre charras d4e4359289 pcb_parser.cpp: allows 0 width line thickness for circles in custom shaped pads.
the commit 1100ccb032 broke DRAWSEGMENT filled circles (line width = 0) used only in custom pads.

Fixes: lp:1792791
https://bugs.launchpad.net/kicad/+bug/1792791
2018-09-16 15:21:18 +02:00
Seth Hillbrand 1100ccb032 pcbnew: Set default line width for invalids
Invalid graphical items that cannot be created in pcbnew may still be
created by external tools.  This synchronizes the pcbnew view display
with the gerber output and 3d viewer line widths for these types of
lines.  Only filled polygons are permitted 0-width lines.

Fixes: lp:1790534
* https://bugs.launchpad.net/kicad/+bug/1790534
2018-09-05 16:32:55 -07:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
jean-pierre charras 72d1597201 DXF import: add import of DXF splines that are converted to Bezier curves.
Fix also a lot of bugs related to Bezier curves (S_CURVE shape in DRAW_SEGMENT class) in Pcbnew code.
Add missing code to handle these Bezier curves
2018-07-22 18:39:47 +02: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 aab97c8385 Consolidate design rules UI.
Implement new Board Setup paged dialog which includes:
  Layers Setup
  Design Rules
  Solder Mask & Paste
  Text & Drawings

Moves line width and text properties to a layer-class-based
system.  Renames unlocked to upright (which also reverses the
logic).

New Edit Text and Graphic Properties dialog which replaces
Edit Footprint Text and adds layer-class-based editing and the
italic, upright and visibility properties.

Adds Import Settings functionality which allows settings to
be imported from another project at page granularity.

Also UNIT_BINDERizes the dialog and adds editing of pcb text.

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

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

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

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

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

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

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

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

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

(cherry picked from commit 3944a5e)
2018-07-17 15:12:34 +01:00
Jeff Young 2e4f50f206 Make sure segments read from file are in correct order.
Fixes: lp:1752033
* https://bugs.launchpad.net/kicad/+bug/1752033
2018-04-03 22:01:34 +01:00
Jeff Young e0e0687cd7 Revert "Allow 5.0 to read 6.0 files with hole-to-hole clearance settings."
This reverts commit 0a4c04530a.
2018-03-16 22:22:15 +00:00
Jeff Young b8fd2f3c79 Revert "Don't be pedantic about the file format."
This reverts commit 1537cbc59c.
2018-03-16 18:11:36 +00:00
Jeff Young 1537cbc59c Don't be pedantic about the file format.
It's just another form of nagging.
2018-03-16 16:57:38 +00:00
Jeff Young 0a4c04530a Allow 5.0 to read 6.0 files with hole-to-hole clearance settings. 2018-03-16 00:48:35 +00:00
Seth Hillbrand 33423fe88d Standardize capitalization
Messages should start with capitalized letter
2018-03-08 12:33:32 -08:00
jean-pierre charras b43dc7954c fix code after renaming files 2018-01-30 15:34:09 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
jean-pierre charras 270a63daac DRAWSEGMENT, S_POLYGON shape: remove useless copies or conversion to std::vector<wxPoint> of SHPE_POLY_SET polygon shape.
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)

Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
2018-01-24 14:22:43 +01:00
Oliver Walters 900ddca0b4 Changed default text size to 50mils
- Text size is now always written to file
- Unspecified text sizes are read as 60mils

Fixes lp:1737878

https://bugs.launchpad.net/kicad/+bug/1737878
2017-12-21 12:16:57 -05:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Tomasz Włostowski f34b86d39e pcbnew: made zone filling algorithm thread-safe.
- moved zone filling algo outside ZONE_CONTAINER class
- const'ified methods that don't need to modify zone's properties
- cleanup: m_FillMode -> enum
2017-12-05 14:54:57 +01:00
Oliver cb97f68e35 CHANGE file format for 3D model offset
- Reverts behaviour of 3e71ed2421
- 3D model offset now explicitly written in mm, using "offset" tag
- Any read "at" tag is converted from inches to mm
- This will not break any 3D model offset when reading files
- It will however render files incompatible with old versions
2017-12-01 16:21:49 +01:00
Chris Pavlina f576596375 Add "unlock" property to footprint texts
This property decouples the text orientation from the board orientation,
removing the restriction that it face the bottom or right side of the
board.
2017-11-27 18:21:00 -07:00
jean-pierre charras 48a37c2998 Fix minor bug: pcbnew file save: dimensions timestamp updated on every save
Fixes: lp:1733872
https://bugs.launchpad.net/kicad/+bug/1733872
2017-11-26 14:31:15 +01:00
jean-pierre charras f17f604072 Add warning message in dialog_edit_components_libid 2017-11-21 13:09:13 +01:00
Oliver 3e71ed2421 Changed model offset in file to mm
- Written in mm
- Read as mm if newer than 20171114
- Read as inches if older than 20171114
- Added some documentation
2017-11-20 17:46:16 -05:00
jean-pierre charras 25f9c6e4f9 Incorrect default value (not saved in file) of DRAWSEGMENT width, for the S_POLYGON shape.
The value of the width is now always saved to avoid this kind of issue.

Also Fixes: lp:173257
2017-11-16 09:38:26 +01:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 90ab5860dc refactoring: removed dependency of libpcbcommon on 3d-viewer. 2017-11-03 20:01:42 +01:00
jean-pierre charras df830dab4c Add comments and a comment asking to fix a call to a GUI inside a io plugin, that is not allowed 2017-09-27 18:59:17 +02:00
Oliver Walters c977c88a10 Zone keepout exclusion now works on multiple layers!
Bug fixes for keepout layers

- Changed LSET::size() -> LSET::count()
- Save/load functions no longer depend on zone being a keepout
2017-09-27 10:35:00 +02:00
Oliver Walters 0f6ec7632b Enable multi-layer for keepout zones
- Load / save from PCB file correctly
- Doesn't display properly yet
- Keepout only actually applies to one layer (for now)
2017-09-27 10:34:59 +02:00
jean-pierre charras a43f3ab1fe replace "BasicShape" by "Primitive" in code, a better name 2017-09-20 12:51:10 +02:00
Maciej Suminski cca63801bf Renamed D_PAD::{Set,Get}PadName() to D_PAD::{Set,Get}Name() 2017-09-19 18:23:50 +02:00
jean-pierre charras e2d3fcec02 Add support for custom pad shape. Full support in DRC and PnS.
add option to use shape or convex hull as clearance area in zones.
simplify code to handle clearance area
2017-09-19 09:02:53 +02:00
Dick Hollenbeck 4e7de8a761 Reverse commit 4011ed4e31.
This commit was too broad and not cognizant of the purpose of the class
UTF8.

Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.

Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
2017-07-26 08:26:56 -04:00
jean-pierre charras c311e63f0d fix minor issues, and change ZONE_CONTAINER::GetDefaultHatchPitchMils() to ZONE_CONTAINER::GetDefaultHatchPitch()
as using mil in a value has no meaning now in pcbnew
2017-07-01 15:17:30 +02:00
Maciej Suminski f1d650d5be Use node & unconnected count from CONNECTIVITY object 2017-06-23 18:51:00 +02:00
Tomasz Włostowski 3b16d3cffe further DLIST/Iterators cleanup, some code formatting 2017-06-23 11:12:37 +02:00
Kristoffer Ödmark 19d5cc7548 Removed all exception specifiers since deprecated.
Exception specifiers are deprecated in cpp11, so went through them all
and removed them from the code.
2017-06-12 13:54:55 -04:00
jean-pierre charras 70c961fe6a Pcbnew: fix serious issues (broken files) when saving and loading .kicad_pcb files when zones have holes in outlines. 2017-04-07 08:02:26 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Chris Pavlina 4011ed4e31 Convert UTF8 to/from wxString correctly around LIB_ID
Fixes: lp:1675942
* https://bugs.launchpad.net/kicad/+bug/1675942
2017-03-24 21:38:00 -04:00