Commit Graph

53 Commits

Author SHA1 Message Date
jean-pierre charras fd6c9c7685 kicad2step: fix a bug when the board has no hole.
kicad2step was trying to remove an empty hole list, generating a OCC error.

Fixes #4242
https://gitlab.com/kicad/code/kicad/issues/x4242
2020-04-22 10:43:28 +02: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
Yegor Yefremov 99a28fa3e5 Fix typos in comments. 2020-03-24 16:24:53 +00:00
jean-pierre charras ad3c4b37ab Fix a few coverity warnings 2020-02-01 15:15:51 +01:00
Ian McInerney 39b1f0e1ff Replace wxCriticalSection with std::mutex 2020-01-15 23:42:16 +00:00
jean-pierre charras a46abcd2dc FILENAME_RESOLVER: fix missing conversion from UTF8 to wide chars.
Fixes #3742
https://gitlab.com/kicad/code/kicad/issues/3742
2020-01-07 13:35:37 +01:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
jean-pierre charras d77ba30a95 Replace __WXDEBUG__ (improperly used) by DEBUG in some #define.
__WXDEBUG__ comes from a build option of wxWidgets,
and is not related to a Debug versus Release Kicad build.
2019-10-14 11:17:38 +02:00
Simon Schubert a0ed40876d kicad2step: scale models
Fixes: lp:1784257
* https://bugs.launchpad.net/kicad/+bug/1784257
2019-08-15 14:29:03 -07:00
Ian McInerney 55261eb223 pcbnew: Fix export of edge.cuts layer to STEP format
Fixes: lp:1820841
* https://bugs.launchpad.net/kicad/+bug/1820841
2019-05-29 19:42:46 -07:00
John Beard 4bd661add7 QA: Add test on GetLayerName function
This adds a test to the recent GetLayerName function, and moves
it to the base.h file for re-use for any code that needs a
layer name.

This test covers the case that caused lp:1824750 [1].

[1]: https://bugs.launchpad.net/kicad/+bug/1824750
2019-04-17 10:52:56 +01:00
John Beard 03214b5dea Sexpr/QA: Split out the sexpr classes into a reusable lib and test
The SEXPR class is a useful general-purpose S-Expression library
class and can (maybe) be used else where. It also should get
test coverage, as even if noone else uses it, it's critical for the
kicad2step exporter.

Also add some test coverage for some kicad2step routines. For now,
they're not useful outside kicad2step, but they are at least a useful
reference for S-Expression parsing.
2019-04-17 10:52:56 +01:00
John Beard c135158364 Kicad2Step: handle quoted layers
More recent Kicad_pcb files have quoted layer names (i.e.
strings, not symbols). The importer in K2S doesn't handle that,
so it chokes on elements like (layer "Edge.Cuts").

Fixes: lp:1824750
* https://bugs.launchpad.net/kicad/+bug/1824750
2019-04-15 15:00:17 +01:00
Seth Hillbrand 214d8d3703 kicad2step: Handle quoted layers
Quoted layers are parsed by kicad2step as strings but were only
expecting symbols.  This threw an error when exporting.
2018-12-18 10:17:22 -08:00
Maciej Suminski c120ae9e9d kicad2step: Implement overwrite protection, handle 'force overwrite' flag
Fixes: lp:1791826
* https://bugs.launchpad.net/kicad/+bug/1791826
2018-09-11 09:23:31 +02:00
Seth Hillbrand d3c82b0b57 kicad2step: limit small segment add/remove
The addition of very small segments in OCE triggers sliver
removal/cleanup in the BREP generation that can get stuck in a very long
loop during STEP export of boards.  These were introduced to ensure
closure of boards with small gaps that were too big for OCE to consider
joined.

Removing the small segments allows STEP export to proceed in a
reasonable time.  This also decreases the default minimum gap size that
kicad2step uses to determine curve matching.  This prevents mis-matching
small curves

Fixes: lp:1784626
* https://bugs.launchpad.net/kicad/+bug/1784626
2018-09-06 18:44:09 -07:00
Jeff Young 8f0aa68ab8 Fold 3D Search Paths dialog into Configure Paths.
Use in-place editing for both.

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

(cherry picked from commit 33622cd)
2018-07-17 15:11:01 +01:00
Maciej Suminski a08c0ac08c kicad2step: Added minimum distance parameter 2018-06-19 10:37:07 +02:00
Maciej Suminski 04a462e48f kicad2step: Converted #defines to constexprs 2018-06-19 10:37:07 +02:00
Maciej Suminski 1541cbdf04 kicad2step: Add short segments to fix outline contiguity for arcs
STEP exporter keeps outline contiguous by storing the last point
coordinates and using them as the starting point for the next segment. It
might create a problem for arcs, as one of the arc end points may become
translated (changed to the last outline point), while the remaining
points (center and the other endpoint) are kept original. For large
deltas it renders an arc invalid, as it cannot pass through a modified
endpoint anymore.

To fix this, short segments are added to link the last outline point
with an arc endpoint, but only if the distance between the two is below
a certain threshold. This way the outline is kept contiguous and the arc
end point is unmodified, warranting its correctness.

Fixes: lp:1774351
* https://bugs.launchpad.net/kicad/+bug/1774351
2018-06-19 10:29:18 +02:00
Maciej Suminski ba3f2b30ee kicad2step: More diagnostic messages to determine export issues 2018-06-18 17:51:22 +02:00
jean-pierre charras 6d77e594b5 Python binding: fix pcbnew.Refresh() to make a better re-initialization.
Minor fixes in comments.

Fixes: lp:1775003
https://bugs.launchpad.net/kicad/+bug/1775003
2018-06-07 10:04:29 +02:00
Jeff Young 6a2dc8d4eb Roll back last 2 commits meant for the other resolver only.
Fixes: lp:1772255
* https://bugs.launchpad.net/kicad/+bug/1772255
2018-05-21 16:25:44 +01:00
Jeff Young 10ec39a107 Move 3D file error messages to tracePathsAndFiles key.
Fixes: lp:1772255
* https://bugs.launchpad.net/kicad/+bug/1772255
2018-05-21 13:18:41 +01:00
Jeff Young c48e5b6423 Remove unhelpful warning message.
It appears far too often with the new libraries.

Fixes: lp:1772255
* https://bugs.launchpad.net/kicad/+bug/1772255
2018-05-20 23:48:29 +01:00
Seth Hillbrand 2bab30d9ac Allow Kicad to use OpenCascade
Adds the option of using OpenCascade not just the community edition.

Fixes: lp:1628950
* https://bugs.launchpad.net/kicad/+bug/1628950
2018-05-11 17:04:32 -07:00
Jeff Young aa7da5dfcd Treat ${...} and $(...) envvar references uniformly.
Fixes: lp:1769282
* https://bugs.launchpad.net/kicad/+bug/1769282
2018-05-05 23:40:40 +01:00
Maciej Suminski eebabf165b kicad2step: Report lack of model definition rather than empty file names 2018-03-19 17:04:38 +01:00
Maciej Suminski 47e4798423 kicad2step: Report function name and line number only in debug builds 2018-03-19 17:04:38 +01:00
Maciej Suminski ce610f33a2 Coverity fixes
resource leak: #172233
negative array index write: #102363
uninitialized scalar field: #174540 #174539
structurally dead code: #169334 #169331
2018-03-19 10:02:05 +01:00
jean-pierre charras b327da6e5a Fix incorrect parsing in kicad2step when a footprint has both locked and placed options activated.
Fixes: lp:1742700
https://bugs.launchpad.net/kicad/+bug/1742700
2018-01-15 11:24:09 +01:00
Oliver 76f5df8a43 Decode "offset" in STEP export tool
- Read "at" as inches
- Read "offset" as mm
2017-12-01 16:21:50 +01:00
Oliver b80449b069 Fixes for 3D model offset
- Display offset units in 3D preview window (inches or mm)
- Fix offset in 3D renderer
- Fix offset in Raytracing renderer
- Fix offset in STEP export
- Fix offset in VRML export
2017-11-20 17:46:03 -05:00
Wayne Stambaugh f3908bd87c Revert premature commit of 17ab319b, "Fixes for 3D model offset".
This reverts commit 17ab319b99.
2017-11-11 20:04:46 -05:00
Oliver 17ab319b99 Fixes for 3D model offset
- Display offset units in 3D preview window (inches or mm)
- Fix offset in 3D renderer
- Fix offset in Raytracing renderer
- Fix offset in STEP export
- Fix offset in VRML export
2017-11-11 15:08:08 -05:00
Oliver c932e4af1b Added IGES replacement option
- If no STEP substitute is found, look for IGES
2017-11-07 08:34:38 -05:00
Oliver 30455092c8 Replace WRL files with STEP equivalent
- Use simple filename matching
- If a STEP file is found, use that instead
- Similar behaviour to the infamous StepUp tool

Fixes lp:1710796

https://bugs.launchpad.net/kicad/+bug/1710796
2017-11-06 18:41:40 -05:00
jean-pierre charras 33e0758636 Fixes: lp:1696204 3D STEP export doesn't handle B.Cu rename
https://bugs.launchpad.net/kicad/+bug/1696204
2017-06-08 08:33:14 +02:00
Cirilo Bernardo 960c139064 Fix UTF8 filename issues in kicad2step 2017-03-14 18:33:14 -04:00
Cirilo Bernardo 4a1e2644a4 kicad2step was not accepting module names which are valid numbers.
Fixes: lp:1660841

https://bugs.launchpad.net/kicad/+bug/1660841
2017-02-01 20:14:57 -05:00
Cirilo Bernardo cf1003955d Added more info to kicad2step parsing failures 2017-02-01 19:43:44 -05:00
Morgan Quigley 1b9c8676df Fix bug in STEP import with curve intersections.
Set BRL precision to 10 nanometers to prevent floating point round errors
from creating arcs that leave gaps in the board outlines.  Note: it may
be prudent to make this setting 100 nanometers if there are gerber export
issues.

Fixes lp:1652406

https://bugs.launchpad.net/kicad/+bug/1652406
2017-02-01 19:32:27 -05:00
Cirilo Bernardo 451cbedd2c Change KICADMODEL definition from struct to class for consistency 2016-09-26 23:54:34 -04:00
Cirilo Bernardo 8b8626ceeb Removed wxT() from kicad2step modules and made modifications to the STEP Export GUI 2016-09-22 08:37:16 -04:00
Cirilo Bernardo 34fef23bd4 Reworked cmdline options and added output filename option 2016-09-22 08:37:16 -04:00
Cirilo Bernardo a9cb10c947 Added --no-virtual option to suppress inclusion of 3D models from components with the virtual attribute 2016-09-22 08:37:16 -04:00
Cirilo Bernardo 375741eeaa Modified parser to skip drill specifications for SMD pads 2016-09-22 08:37:16 -04:00