Commit Graph

145 Commits

Author SHA1 Message Date
jean-pierre charras 07568f87c3 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

From Master branch, commits a9feb1c and 5db7580
2021-01-03 14:52:42 +01:00
Mikołaj Wielgus 267e510071 Update PCBMODEL::SetMinDistance to set BRepBuilderAPI precision
Fixes #3818
2021-01-03 13:39:38 +01:00
Seth Hillbrand 77caf50265 Remove OGLTest
We don't use this utility nor do we have plans to

(cherry picked from commit de12d40ee6)
2020-09-12 06:49:51 -07:00
Adam Wolf 305ed0b65a For macOS, fix KICAD_BUNDLE_LIBS in ogltest.
(Cherry-picked from e143ecbf40)
2020-04-10 20:09:34 +01:00
Adam Wolf 0ba08f57f2 Add macOS KICAD_BUNDLE_LIBS search path for bundle fixup.
(cherry-picked from ac20428b82)
2020-04-03 01:39:31 +01:00
jean-pierre charras e2492f773d FILENAME_RESOLVER: fix missing conversion from UTF8 to wide chars.
Fixes #3742
https://gitlab.com/kicad/code/kicad/issues/3742
2020-01-08 10:47:14 +01:00
Seth Hillbrand 6f71183d0e Revert "kicad2step: scale models"
This reverts commit 5064df4ba2.

There were un-addressed issues with the VRML substitution and concerns
by MCAD folks that ECAD designers should not be allowed to perform this
action.  Full addressing in v6.
2019-10-20 10:06:43 -07:00
Simon Schubert 5064df4ba2 kicad2step: scale models
Fixes: lp:1784257
* https://bugs.launchpad.net/kicad/+bug/1784257

(cherry picked from commit a0ed40876d)
2019-08-15 14:32:32 -07:00
Ian McInerney ec9e0b2086 pcbnew: Fix export of edge.cuts layer to STEP format
Fixes: lp:1820841
* https://bugs.launchpad.net/kicad/+bug/1820841

(cherry picked from commit 55261eb223)
2019-05-29 19:43:16 -07:00
John Beard 3a744ad72f Use old-style boost includes
The Boost::boost style library dependencies don't work
on some CMake versions (couldn't find library -lBoost::boost)

Use ${Boost_INCLUDE_DIRS} in the target_include_dirs() instead.

Cherry-picked (with changes) from: 1a9aa2e92d
2019-04-22 01:10:50 +01:00
Simon Richter 6a7b1aa39a List Boost as a dependency for kicad2step
This is not technically correct (the Boost dependency is introduced through
libcommon), but less invasive as it doesn't pull in libcommon on the linker
command line.
2019-04-15 23:43:42 +01:00
John Beard 9092048dbc 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

(cherry picked from commit c135158364)
2019-04-15 15:01:57 +01:00
John Beard bb2ae8e13b Bitmaps: move bitmap defs to bitmaps library
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.

Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.

This avoids a circular dependency that was previously reported
by static analysis.

Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)

Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
2019-02-04 19:29:31 -08: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
Jeff Young 16925cc74e Implement RAII locking for GAL updating.
Fixes a crash when typing fast in the place footprint filter box.

Also adds a bunch more checking to GAL locking, including making
sure the same person unlocks as locked, and preventing piece-meal
calls (the RAII objects must be used).
2018-10-26 23:02:05 +01:00
Jeff Young 6c34fdefd7 Better exception handling and context locking for GAL.
This prevents deadlocks when exceptions are thrown and the context
ends up not getting unlocked.

It also removes an earlier hack to try and minimize this which
didn't work anyway.
2018-10-12 23:44:49 +01:00
jean-pierre charras 7372acdaa5 Fix:Step export not working when special characters (non UTF7) in filename or path
Fixes: lp:1785191
https://bugs.launchpad.net/kicad/+bug/1785191
2018-09-18 10:24:23 +02: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
Maciej Suminski 7037e422a8 kicad2step: Set correct file extension if no output file is specified 2018-09-11 09:22:10 +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
John Beard a88831d7a9 Fix -Wcatch-value in kicad2step.cpp 2018-08-15 12:39:33 -04:00
John Beard f0c571769c Fix -Wcatch-value in sexpr.cpp
This is fixed by catching bty const-ref, rather than by value.

Also a few trailing space deletions.
2018-07-23 14:40:16 -04:00
jean-pierre charras 7291059489 replace lib_dxf by dxflib from qcad in dxf2idf code 2018-07-22 18:39:47 +02: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 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 7ef97e0bca kicad2step: Simplified unit conversion
Instead of using 'm_inch' flag, dimensions are converted in place.
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
Seth Hillbrand e95d06e811 OCC: Fix issues for OpenCascade 7.3
OpenCascade 7.3 deprecates some TK libraries that were not required by
KiCad, therefore we should not include them in the compile.

Also correct missing compiles for STEP import/export induced by 584409b2e when using OCCT.  There is no effect on OCE to this change.
2018-06-12 10:03:13 -07: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 584409b2ef Make OpenCascade more secondary
The opencascade patch intrusively checked against libraries but broke
some build scripts.  This restores the default cmake OCE behavior that was
changed by 2bab30d9a and makes the OpenCascade search truly secondary.
2018-05-15 06:40:25 -07:00
Maciej Suminski 161b4a56fc kicad2step: Handle escaped quotes in sexpr parser 2018-05-14 17:58:24 +02: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
jean-pierre charras 91209e194c Remove useless tests after operator new 2018-04-25 12:07:43 +02: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
Seth Hillbrand c69db6cf8f Adding rounded rect and custom pad shapes to VRML export
Fixes: lp:1753552
* https://bugs.launchpad.net/kicad/+bug/1753552
2018-03-06 16:40:08 -08: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
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05: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