Commit Graph

63 Commits

Author SHA1 Message Date
jean-pierre charras 2ff2a6ffcd Kicad2step: fix STEP export from Pcbnew, broken by changes in commit 8456d6c
also: DIALOG_EXPORT_STEP: remember tolerance option during a session.
2022-07-01 09:56:15 +02:00
Jeff Young 378a2de37c Formatting. 2022-04-14 17:09:27 +01:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
jean-pierre charras 93e163b98d Do not replace delimiter " by ' inside a command string.
Fixes #9528
https://gitlab.com/kicad/code/kicad/issues/9528
2021-11-05 13:24:38 +01:00
Seth Hillbrand cf6b18ec7e Remove escaped double-quotes
For some reason, escaped double quotes in wxString::Format cause issues
on Mac.  We can replace them with single quotes in most places without
loss of clarity
2021-11-03 17:03:14 -07:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Marek Roszko 74fd23f573 Add (off by default) build option to link kicad2step directly into pcbnew
Because debugging it separately is annoying.
2021-09-11 22:56:16 -04:00
jean-pierre charras e2a1e5d4a1 DIALOG_EXPORT_STEP: fix regression: missing default filename initilization 2021-09-03 16:22:32 +02:00
Seth Hillbrand db5ce824af Use wildcard routine for extension matching
Move STEP export dialog wildcard to extension matching
2021-08-20 17:24:05 -07:00
Seth Hillbrand 4cd9278041 Remove most wxFilepicker wildcards from translations
This prevents translation errors from preventing user actions such as
opening the correct file
2021-08-20 12:56:47 -07:00
Jeff Young 886dc2f43e Do-not-show-again section for common prefs & zone fill warning infobar.
Note that the dialogs which have mutliple options were not moved over
as it seems perahps not the right choice to have them save state between
sessions.

Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-27 15:15:49 +01:00
jean-pierre charras 5d9ff0b9b7 Step export dialog: save 2 options in config file.
2 options (overwrite file and replace 3d shapes) were not saved previously.
2021-06-15 09:33:37 +02:00
Jeff Young 2c1da70181 Write all variables to temp config file and have Kicad2Step use that.
Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-06-14 16:54:45 +01:00
Seth Hillbrand c650d47626 Add warning message on non-unity scaling
When exporting STEP model, warn the user if one of their footprints has
a non-unity scaled model as this compromises the integrity of the STEP
export.

Fixes https://gitlab.com/kicad/code/kicad/issues/1781
2021-06-08 16:38:47 -07:00
Seth Hillbrand b891b5e1e2 Do not blindly substitute model names
Makes model substitution (VRML->STEP in STEP Export) optional.  This can
prevent nasty surprises where the user doesn't see/can't affect the
outcome

Also, when substituting models, do not maintain scale factor.  So a VRML
model with non-unity scaling will not be export as a STEP file (of the
same name) with non-unity scaling.  This is the first step to address
https://gitlab.com/kicad/code/kicad/-/issues/1781
2021-06-08 16:38:47 -07:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
jean-pierre charras a1d7a959f7 more fixes and enhancements in DIALOG_EXPORT_STEP. 2021-01-03 11:38:09 +01:00
jean-pierre charras 5db75805bd Step exporter: better values for min distance between 2 points to merge them.
- The default value is 0.01 mm (according to comments and similar to the 3D viewer
 settings that uses 0.02 mm)
- The export dialog  has now 3 values 1 micron, 0.01mm (default) and 0.1 mm
The 0.1 micron option is removed: it makes no sense for a mechanical tolerance.
2021-01-03 11:01:03 +01:00
Jeff Young 2f3f4c209e Make sure DRC reports a missing board outline.
Fixes https://gitlab.com/kicad/code/kicad/issues/6481
2020-11-24 14:22:27 +00:00
Jeff Young b123318cf6 Encourage use of full DRC for board & footprint malformed outlines.
It shows much more detail.  Removes some nag dialogs and places
hypertext links in others.

Also fixes the auto-layer-showing to correctly show Edge.Cuts or
F.CrtYd or B.CrtYd for errors relating to them.

Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-20 17:24:52 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Marek Roszko 1d559108c8 Move LOCALE_IO out of common.h 2020-10-23 21:49:42 -04: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
Jeff Young 6488260185 Fix another signed/unsigned compare which will never work. 2020-08-31 17:29:44 +01:00
Jon Evans c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jon Evans 51eac3e3e6 Split pcbnew and footprint editor settings getters for clarity 2020-05-05 21:46:00 -04:00
jean-pierre charras 5143f87678 Kicad2step: Many fixes in oce_utils.
- Better code and messages.
- Speedup calculations when removing cutouts and holes from main board.
- Do not stop step generation when trying to load a 3D modele having issues.
2020-04-15 11:44:12 +02:00
jean-pierre charras b68bdc22d7 Fix in kicadpcb reader. Update dialog export step
kicad2step: code cleanup, and more activity messages displayed
2020-04-15 10:51:35 +02:00
jean-pierre charras 110b05fe78 kicad2step: convert it from a wxAppConsole to a wxApp, using a wxFrame/wxPanel 2020-04-15 10:51:35 +02:00
jean-pierre charras b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00: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
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jeff Young 01e78b04c6 Save last-used-paths in export dialogs.
Also fixes the export GenCAD dialog so that browse correctly updates
the textbox.

Fixes: lp:1793761
* https://bugs.launchpad.net/kicad/+bug/1793761
2019-08-02 21:03:48 -06:00
jean-pierre charras 73a0cbff62 pcbnew, export to STEP: fix error in command line tolerance option (--min-distance="0.0100 mm") is some countries
In countries using a comma as floating point separator, the --min-distance="0.0100 mm" was passed as --min-distance="0,0100 mm"
This is incorrect and broke the command line.

Fixes: lp:1814559
https://bugs.launchpad.net/kicad/+bug/1814559
2019-02-04 18:05:49 +01:00
Jeff Young 2dea3a49c8 Fix compile error in std::pow useage. 2019-01-30 16:38:34 +00:00
Seth Hillbrand 914596fcbb pcbnew: Allow STEP export tolerancing
kicad2step has a tolerance level that sets whether two points are at the
same location or not.  This allows KiCad to access these levels to some
degree, permitting a looser interpretation of a closed board outline.
2019-01-29 13:05:23 -08:00
Seth Hillbrand 26765161c1 drc: Add board outline and edge crossing
This adds a check for contiguous board outlines to the DRC.  It also
uses the calculated outline to ensure that traces are not crossing the
outlines.

Fixes: lp:1648055
* https://bugs.launchpad.net/kicad/+bug/1648055
2018-12-02 07:54:52 -08:00
Wayne Stambaugh 282e37b2bf Pcbnew: change step export dialog action button text.
Change "OK" to "Export" so user is not surprised by the fact that the
dialog does not close after the step file is created..

Fixes lp:1784260

https://bugs.launchpad.net/kicad/+bug/1784260
2018-09-24 14:57:02 -04:00
Seth Hillbrand 525e26eb82 kicad2step: Provide floats separated
Clang++ seems to be in left-field here as it processes a stringstream
1.0X1.0 >> double as a hexadecimal floating point ('X' character) and
throws an error rather than converting 1.0 and stopping when it reaches
a non-numeric character.  This causes errors when exporting step on Mac,
which uses clang++ by default.

Adding spaces to the string is more explicit and doesn't break gcc.  It
will be sufficient until we get rid of kicad2step as an external
utility.

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

(cherry picked from commit e7a9643b37)
2018-09-22 08:52:46 -07:00
Maciej Suminski f0b3cf8077 STEP export: Stricter contiguity check
Stricter contiguity check points the user to gaps in the outline.

Fixes: lp:1774351
* https://bugs.launchpad.net/kicad/+bug/1774351
2018-06-19 10:36:21 +02:00
Wayne Stambaugh 11c248a463 Fix a typo made in commit 52734058. 2018-06-18 14:57:01 -04:00
Wayne Stambaugh 52734058a7 Remove string translation wrappers used in commit 94891b75.
Translating internal file name and path strings will almost certainly
result in a bug on MacOS.
2018-06-18 12:14:48 -04:00
Adam Wolf 94891b75f9 Handle STEP export properly on MacOS when launched from standalone pcbnew. 2018-06-17 13:09:33 -04:00
Seth Hillbrand 8c5037a48b Optionally sort reporter messages
It can be useful to have similar class messages grouped together so that
error messages in a larger report don't get lost among the
warning/info/action messages.

This patch allows sorting of messages for dialogs that benefit from
organization.  Default behavior of reporter messages remains
unchanged by this patch.

Fixes: lp:1772090
* https://bugs.launchpad.net/kicad/+bug/1772090
2018-05-22 13:55:02 -07:00
Maciej Suminski 23a9fcd91d Fixed a typo in the STEP generator message 2018-05-14 10:59:48 +02:00
jean-pierre charras b9808da0a8 Use wxStdDialogButtonSizer in dialog.
Use .step instead of .stp as step file extension.
2018-05-09 18:14:49 +02:00
Maciej Suminski 33dcc080ea STEP exporter: check board outline continuity 2018-03-19 17:34:11 +01:00