Commit Graph

248 Commits

Author SHA1 Message Date
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
Jeff Young 4736578793 Fix long-standing typo. 2021-08-14 13:16:11 +01:00
Jeff Young 507b386c79 Rationalize STEP file warnings
1) Use consistent terminology and formatting
2) Capitalize STEP
3) Don't double-report errors in MessageBox and REPORTER

Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-08-14 11:08:49 +01:00
Wayne Stambaugh d36fbb864f KiCad2Step code cleaning. 2021-07-29 07:10:58 -04:00
Wayne Stambaugh 05a5a2416a IDF code housekeeping. 2021-07-28 07:14:27 -04:00
Wayne Stambaugh 369d813a32 Pass std::string by reference instead of on the stack where applicable. 2021-07-27 13:30:05 -04:00
Marek Roszko c794a6ce7a Add pdb install option for msvc 2021-07-14 23:42:45 -04:00
jean-pierre charras 702c0d6f72 Step export: shows a report message if a 3D model is not loadable:
- When a vrml model is specified and model substitution is not allowed
- When the model substitution is allowed but the step model is not found
2021-07-08 17:22:33 +02:00
Jeff Young 4025603a1f Formatting. 2021-07-06 21:36:27 +01: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
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00: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
Marek Roszko ab82b01714 Evict the last bits of wx.h 2021-06-07 20:23:27 -04:00
Marek Roszko 6b1dfca0ba Silence the msvc warning about double to int conversion 2021-06-06 09:45:03 -04:00
Marek Roszko 82e306bec3 Remove wx/wx.h from idf_helpers.h 2021-06-06 09:37:29 -04:00
jean-pierre charras d7616fdca8 Fix a few compil or coverity warnings. 2021-06-01 09:04:37 +02:00
Marcus A. Romer 1632707d9b Replace tabs with spaces 2021-04-05 01:13:39 +00:00
jean-pierre charras 6b1658a098 kicad2step: fix incorrect Bezier curve handling.
Fixes #7930
https://gitlab.com/kicad/code/kicad/issues/7930
2021-03-22 11:08:40 +01:00
jean-pierre charras 4a53917efa wrml exporter: optimize circle to segment approximation. 2021-03-20 18:16:58 +01:00
Karl Palsson 658bc2f4b2 kicad2step: provide a basic default product name
It would be ideal if it would use the s-expr
kicad_pcb.general.title_block.title by default, and then fall back to
something based on the output step file, but even just the output step
file is a far better default than the "open cascade step translator
version..." text it uses at the moment.

Similar improvements using the title_block would be future work.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2021-03-04 17:01:07 +00:00
Seth Hillbrand 1d3159c1cb Add support for PKZIP-based stpZ files
FreeCAD uses gzip-based stpZ files but many programs will compress using
the archive format of PKZIP (e.g. WinZIP).  This handles the archive
format, taking the first file from the archive, which by the standard
should be the STEP file

Fixes https://gitlab.com/kicad/code/kicad/issues/5376
2021-02-27 16:44:54 -08:00
Seth Hillbrand b823c49a95 Handle polygons in step export
Fixes https://gitlab.com/kicad/code/kicad/issues/7707
2021-02-25 09:50:01 -08:00