Commit Graph

269 Commits

Author SHA1 Message Date
Seth Hillbrand 535982f245 Avoid scaling unity models
There is no benefit to applying the identity transformation to models
when exporting the board to STEP

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

(cherry picked from commit 98431eed79)

Fixes https://gitlab.com/kicad/code/kicad/issues/10232
2022-10-14 13:08:13 -07:00
Wayne Stambaugh cfde5300d7 Fix wxWidgets 3.1 and later deprecated build warnings.
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize().  This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.

(cherry picked from commit 898ec0d094)
2022-08-17 14:07:06 -04:00
jean-pierre charras 650caae323 Avoid changing a translated string when not mandatory. 2022-07-29 20:04:52 +02:00
jean-pierre charras 06e612661c Kicad2step: fix STEP export from Pcbnew, broken by changes in commit 8456d6c
also: DIALOG_EXPORT_STEP: remember tolerance option during a session.
From Master branch.
Fixes #12119
https://gitlab.com/kicad/code/kicad/issues/12119
2022-07-29 19:46:34 +02:00
Wayne Stambaugh b2855e6288 Fix KiCad2Step virtual keyword handling.
The "virtual" keyword has been deprecated from the board file format so
use "exclude_from_bom" as the flag for the old virtual behavior.  This
is only a partial fix.  Full support for the "exclude_from_bom" will be
added later for V7.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10563
(cherry picked from commit 497061de35)
2022-07-05 09:30:59 -04:00
Adam Wahab 29d58ae063 Corrected syntax in kicad2step's help message regarding user-specified origin.
(cherry picked from commit 8456d6cea9)
2022-06-28 16:24:44 -07:00
Jeff Young 68d9b3cbf7 Add board stackup parsing to Kicad2Step.
Fixes https://gitlab.com/kicad/code/kicad/issues/11565

(cherry picked from commit e85105a907)
2022-05-31 23:21:43 +01:00
jean-pierre charras ef798f446f STEP export: handle polygons with arcs (and convert arcs to segments).
From Master branch
Fixes #11389
https://gitlab.com/kicad/code/kicad/issues/11389
2022-04-14 16:31:56 +02:00
Seth Hillbrand 861589d837 Use wxEmptyString instead of wxT( "" )
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Jeff Young 209d593ca0 wxT-ify utils. 2022-02-08 22:24:29 +00:00
Marek Roszko 132358211e Fix a set of odd null on new checks PVS V668
(cherry picked from commit 1c77eb14d7)
2022-02-05 19:43:21 +00:00
Marek Roszko b2c99dd953 Fix some leaking objects identified by PVS Studio V773
(cherry picked from commit a7ebfc31f9)
2022-02-05 18:30:24 +00:00
Steven A. Falco 8b6a166698 Missing include file
(cherry picked from commit 042f584859)
2022-01-21 09:01:33 -08:00
Ian McInerney abaee94109 Revert caf406943e and don't install the kicad2step lib
This fixes https://gitlab.com/kicad/code/kicad/-/issues/9944 and reverts
caf406943e. The original fix caused issues
with some CMake versions because it tried to give library dependencies
to an object library, which can't have any library dependencies.
Instead, we need it as a static library, and since there is no need to
actually have it as an end-user library, it shouldn't be in the install
command.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9944

(Cherry-picked from commit fb36e1b582)
2022-01-05 19:45:27 +00:00
jean-pierre charras 5622a51193 Fix linking issue in kicad2step (double definition of some symbols) 2021-12-12 08:52:41 +01:00
Wayne Stambaugh caf406943e Do not install kicad2step build library object file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9944
2021-12-11 08:48:47 -05:00
Seth Hillbrand 1b1bf8a17b Better handling of escaped characters in STEP parser
Fixes https://gitlab.com/kicad/code/kicad/issues/9897
2021-12-08 15:55:42 -08:00
Ian McInerney e57bde6582 Remove last vestiges of the KICAD_USE_OCE build flag
This build flag was removed in a previous commit, but some last uses
remained.
2021-12-01 15:53:00 +00:00
jean-pierre charras a93c2c24fa kicad2step: fix compatibility with OCC versions < 7.5 2021-11-21 17:27:18 +01:00
Seth Hillbrand b3e2206377 Create specific writer for OpenCascade messages
Needed later for integration, so good idea to get framework set now

Fixes https://gitlab.com/kicad/code/kicad/issues/9694
2021-11-20 09:12:55 -08:00
jean-pierre charras 38d8e00d10 kicad2step, 3d_resolver: show a debug message only in DEBUG mode... 2021-11-07 09:39:33 +01:00
jean-pierre charras 5e6f490959 Fix kicad2step, incorrect export of oval holes in pads. 2021-10-17 18:30:03 +02:00
jean-pierre charras 6632cb056c Fix issues with arcs in kicad2step, due to last kicad_pcb format changes.
Fixes #9409
https://gitlab.com/kicad/code/kicad/issues/9409
2021-10-17 17:45:12 +02:00
Marek Roszko 08940acf01 Fix compile error due 2021-09-22 07:46:53 -04:00
Jeff Young 5eb6b488f3 Formatting. 2021-09-22 12:19:29 +01:00
Jeff Young d11c10252d More changes to file resolvers.
Copy Kicad2Step fixes back to Kicad's file resolver.

Remove Kicad2Step's autogeneration of some variables in favour of
just reading the config file passed by Kicad verbatim.

Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-09-22 11:28:45 +01:00
Marek Roszko a6fb687a0e Fix rejection of default variables from exportpaths.cfg
Fix #7670
2021-09-21 19:43:41 -04:00
Jeff Young 9d35c551ba More debug output for models that are not found.
Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-09-21 17:52:57 +01:00
Jeff Young 490cc42cb5 Remove vestiges of m_ConfigDir from Kicad2Step.
The converter uses paths passed in via a config file in the OS's
temp directory.

Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-09-21 13:39:33 +01:00
Jeff Young 24f3c49631 Fix logic error in FileResolvers.
If Normalize() was not needed after finding a searchpath then we were
never updating tname and just blindly returning it.

Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-09-21 12:35:16 +01:00
Jean-Samuel Reynaud aa85bb27fa
Fix configuration phase on Ubuntu 18.04 (bionic).
Error messsage was:
"CMake Error at utils/kicad2step/CMakeLists.txt:68 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target"

 Perhaps cmake version (3.10.2 on bionic) need that since on ubuntu focal (20.04) there is no error (cmake is 3.16.3 on focal). As I see cmake 3.14 add an autodetection mecanism to find the destinations.
2021-09-20 11:52:31 +02:00
Marek Roszko 347e6f914d Add OK button to close step export dialog
Because someone out there might shrink their titlebar to absurdly small sizes and then wonder why suddenly the UX is poor.

Fix #9192
2021-09-19 23:11:11 -04:00
Marek Roszko b2ba86578b Don't erroneously print "step file written"
Fix #9193
2021-09-19 20:55:04 -04:00
Jeff Young a71d856e94 Ignore the drill oval keyword; x either equals y or it doesn't.
Fixes https://gitlab.com/kicad/code/kicad/issues/9193
2021-09-19 20:45:40 +01:00
Jeff Young 21313a4c1a Don't exit when we fail to find a 3D model: there may be more.
Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-09-15 21:53:15 +01:00
Jeff Young 0ae17f1e63 Update Kicad2Step error messages to current terminology. 2021-09-14 13:35:31 +01:00
Jeff Young 48082e3234 Improve debugability of 3D file resolver failures.
Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-09-14 12:28:17 +01:00
Marek Roszko ebda02255c Fix step pcb coloring 2021-09-13 21:18:22 -04:00
Marek Roszko 4f861e084d Give the board boards unique names in STEP exports 2021-09-12 17:43:26 -04:00
Marek Roszko c84619cd7f Undo APIEXPORT thats not required
I was doing a dll before a static and well. Our unit test system isnt setup to handle DLLs at all. Ugh
2021-09-11 23:08:33 -04: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
Marek Roszko f42505b422 Expand the board in the step export to an assembly always 2021-09-11 22:56:16 -04:00
Jeff Young 61ef431c56 Apply fixes from Kicad2Step filename resolver back to Kicad. 2021-09-09 11:17:21 +01:00
Jeff Young 0e96ac4d7b Improve logic and error reporting of Kicad2Step file resolver. 2021-09-08 15:29:41 +01:00
Simon Schaak 58dceb143f kicad2step: fix "ignore virtual components" option
There isn't a "virtual" attribute any more, virtual components are now
saved without the "smd" and "through_hole" attributes.
2021-09-07 19:10:21 +00:00
Seth Hillbrand 7312bb4584 Fix compile error 2021-09-06 07:02:10 -07:00
Jeff Young c861fadc31 Make 3D path resolvers agnostic about alias syntax.
Some code seems to think it's :alias:path while other code thinks it's
alias:path.  This commit updates both the Kicad2Step resolver and the
KiCad internal resolver to be agnostic.

In 7.0 we should probably get rid of aliases entirely.  But that's a
story for another day....

Fixes https://gitlab.com/kicad/code/kicad/issues/9002
2021-09-06 14:26:24 +01:00
Jeff Young 6960ac04d4 Cleanup & formatting. 2021-09-04 18:10:25 +01:00
jean-pierre charras 47d5682b14 kicad2step: fix compatibility with wxWidgets 3.0
(commit 4670309 uses 2 functions existing only in 3.1.x)
2021-08-27 19:02:55 +02:00
jean-pierre charras 4670309ec1 kicad2step: fix broken handing of UTF8 filenames.
the conversion between UTF8 std::strings and wxString were missing in some places.
3D model: fix management of file having double ext .stp.gz
Fixes #9038
https://gitlab.com/kicad/code/kicad/issues/9038
2021-08-27 16:58:23 +02:00