Seth Hillbrand
01426d914a
Fix merge error in stpz import
...
Don't exit early when loading files. Also adds a busy cursor as STEP
loading can take a while.
2021-03-02 10:34:28 -08: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
Marek Roszko
404eb535be
Correct fix to the TranslateToSG empty matindex case
2021-02-02 00:25:51 -05:00
Marek Roszko
22aa9132a3
Replace crash path in vrml1_faceset with pink!
2021-02-01 20:13:49 -05:00
Marek Roszko
7565f60a03
Swap wxFileInputStream/wxFileOutputStream for the buffered kind
2020-12-12 18:52:02 -05:00
Seth Hillbrand
cce11e40a1
Remove errant printf
2020-10-23 12:36:53 -07:00
Seth Hillbrand
75c2d1a0bf
Be diligent in our search for color information
...
Just because we find a label reference does not mean that is where the
color is stored. We do an exhaustive search through the hierarchy for
the correct color data
Fixes https://gitlab.com/kicad/code/kicad/issues/6107
2020-10-21 15:40:19 -07:00
Seth Hillbrand
4085757aeb
Remove beginning/ending spaces in translations
...
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Ian McInerney
b59c7e8632
Add stp.gz as a valid compressed step extension in the chooser dialog
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5429
2020-10-17 23:20:13 +01:00
Seth Hillbrand
b51ca1ab0e
Bump OCE Plugin version
...
We modified how we search for color information. Changing the version
data will for models to reload instead of keeping the cached data with
(possibly) missing color information
2020-10-14 08:47:49 -07:00
Seth Hillbrand
a2168c6add
Seach full model for color information
...
Assemblies may not have their face information in the top level of the
file. Search recurses to get the explicit shape in sub assemblies as
well.
Fixes https://gitlab.com/kicad/code/kicad/issues/5163
2020-10-13 13:47:59 -07:00
Mark Roszko
a28a0e14ba
Fix conversion warnings
2020-10-05 10:41:14 +00:00
Seth Hillbrand
f1b1e59cf0
Catch error when decompressing
...
Make sure we catch errors when thrown by zlib
Fixes https://gitlab.com/kicad/code/kicad/issues/5376
2020-08-26 14:19:46 -07:00
Seth Hillbrand
17de78d1dd
3D: fix typo including extension '.'
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5360
2020-08-25 14:19:27 -07:00
Seth Hillbrand
ccdcdf5071
Deal with case-sensitive extensions
...
Standards that specify differing case in the extension were designed by
marketing departments and should be rejected on sight. But here we are.
2020-08-25 12:38:45 -07:00
Seth Hillbrand
a8ade66fb6
3d: correct expanded model location
...
When expanding WRZ, make sure we are reading the new file and that it
has been created in the user's temporary directory.
Fixes https://gitlab.com/kicad/code/kicad/issues/5360
2020-08-25 12:33:42 -07:00
Seth Hillbrand
f5371ee65d
Fix build issue on MacOS
2020-08-19 06:07:43 -07:00
Ian McInerney
c8917a0951
Cleamup some compiler warnings
2020-08-19 11:35:00 +01:00
Seth Hillbrand
a38c2aad1f
ADDED: Support compressed STEP and VRML files
...
This adds support for opening .stpZ, step.gz and .wrz files where the
files have been compressed using ZIP or gzip according to the "standard"
published by the MBx volunteer forum at
https://www.cax-if.org/documents/rec_prac_file_compression_v12.pdf
Fixes https://gitlab.com/kicad/code/kicad/issues/2479
2020-08-19 03:20:30 +00:00
Seth Hillbrand
9f09c3872f
Ensure file reads always use the C-locale variant
...
Str2Double assumes current locale. We usually switch the locale when
reading files but we should be using the function that explicitly gets
the C-locale conversion.
2020-07-12 20:03:50 -07:00
Ian McInerney
e4b6487fca
Overhaul compiler warnings infrastructure
...
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01:00
Ian McInerney
7bda8178d1
Move library includes to main CMake file
...
Placing them behind the SYSTEM directive tells CMake to tell
the compiler they are system libraries, so it shouldn't show
warnings created from them.
2020-04-19 01:11:56 +01:00
jean-pierre charras
5097d14875
More about do not mark translatable strings used in debug messages.
2020-04-05 14:10:06 +02:00
Seth Hillbrand
7c28c3838a
Comment-only changes
...
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Mark Roszko
ae785194ce
Silence/fix double to float conversion warnings
2019-12-12 21:51:21 +00:00
Seth Hillbrand
6983c56cf8
Use const references where possible
...
This avoids copy cost on local vars where we only read.
2019-12-05 14:40:22 -08:00
Seth Hillbrand
b5f021ff9f
Cleanup: Replace push_back with emplace_back
...
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -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
Seth Hillbrand
03813b3751
3d: Fix double-clear in oce loadmodel
2018-10-09 05:37:48 -07: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
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
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
Seth Hillbrand
6fb47faebd
Workaround for IGES import bug in OCE-0.18
...
This changes the IGES import parameter precision to be file-defined
instead of hard-coded in KiCad. OCE-0.18 does not handle faces with
a set of points whose approximation creates a single point.
By allowing the file to set the precision level, we leave it to the
generating program to create a file with non-degenerate faces.
Fixes: lp:1738872
* https://bugs.launchpad.net/kicad/+bug/1738872
2018-04-04 13:03:34 -07: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 Philippe EIMER
e0f7958dbd
Compatibility fixes for GLM 0.9.9
...
Fixes: lp:1746546
* https://bugs.launchpad.net/kicad/+bug/1746546
2018-02-06 13:30:13 +01:00
Camille
3168d03fe5
Fix unnecessary copy initialization detected by clang-tidy
2018-01-09 18:22:10 -05:00
Marvin Schmidt
69974b73db
Remove some extra semicolons
2017-11-09 19:52:18 +01:00
Cirilo Bernardo
5013ea2e8e
Added comments on skipped patterns in VRML2 parser
2017-04-25 20:24:44 -04:00
Cirilo Bernardo
68bcdec87e
Workaround for non-ASCII filenames in Windows
2017-03-03 14:30:47 -05:00
jean-pierre charras
11dcb76fc9
Add -Wshadow compil option, if exists to warn about shadowed variables.
...
Swig auto generated .cxx file has a lot of shadowed variables, so this option cannot be used to compil all files.
2017-02-23 13:17:23 +01:00
Cirilo Bernardo
2b2b73ee4b
Fix bug: Footprint add 3D shape recognizes only files with lower case ext on Windows
...
Fixes: lp:1659027
https://bugs.launchpad.net/kicad/+bug/1659027
2017-02-22 10:22:33 +01:00
Simon Richter
b0f9864bc4
Clean up warnings from exception handlers
...
The exception objects caught are either not referenced at all, or only in
debug builds. This avoids the warnings for the unused variables.
2016-10-10 11:08:49 -04:00
Cirilo Bernardo
44ba343a7b
Changed test for invalid numeric strings in VRML files
2016-10-09 08:43:36 -04:00
Simon Wells
7a1d39ccc6
Add system to OCE includes, Change order of local includes for kicad2step
2016-09-26 08:17:57 +02:00
Simon Richter
ad088db6d2
Add more "override" markers.
2016-09-25 13:59:41 -04:00
Simon Richter
59c81976dc
Explicitly mark overriding functions.
2016-09-24 14:53:15 -04:00
Cirilo Bernardo
d3771d53ef
Updated VRML exporter and fixed some VRML related bugs
2016-09-21 09:31:52 -04:00
Dick Hollenbeck
7311f07eaf
SWIG Improvements
...
*) Extend SWIG support deeper into the BOARD class.
*) Move swig *.i files into a directory identified for SWIG, in preparation
for a parallel universe involving Phoenix's SIP.
*) Move swig files which will be common to both eeschema and pcbnew into
common/swig.
*) Sketch out a "common" python module, and plan on dovetailing that into a
libkicad_shared.{dll,so}
*) Add common/swig/ki_exceptions.i and define a macro HANDLE_EXCEPTIONS()
which is to be applied to any function which needs C++ to python
exception translation.
*) Move the test for SWIG tool into top level CMakeLists.txt file for use
in all python modules beyond pcbnew, i.e. eeschema and common.
*) Add SWIG_MODULE_pcbnew_EXTRA_DEPS which generates a better Makefile, one
which rebuilds the swig generated *.cxx file when one of its dependencies
change.
*) Re-architect the board.i file so that it can be split into multiple *.i
files easily.
*) Make some KIWAY from python progress, in preparation for Modular KiCad
phase III.
2016-09-20 11:59:43 -04:00
Nick Østergaard
caafcde585
Add KICAD_ prefix to build switches
...
KICAD_ prefix was added to the USE_OCE and USE_SCH_IO_MANAGER build
switches together with a small description to the devdocs from
compiling.md.
2016-09-05 08:46:01 -04:00
Wayne Stambaugh
38e7debdec
Merge Cirilo's OCE plugin branch.
2016-09-01 16:36:45 -04:00
jp-charras
4a3cb050ed
Fix incorrect management of C locale in vrml plugin
2016-08-24 14:37:30 +02:00
Cirilo Bernardo
b656a8180a
Added 3D plugin for OCE; this plugin is activated by -DUSE_OCE=ON
2016-08-22 15:50:38 +10:00
Cirilo Bernardo
9b2dba2b1b
3D Viewer: fix swapped VRML material colors.
...
* Fix a bug in the VRML2 parser which exchanged the blue and green components
of the ambient lighting.
2016-06-13 12:50:42 -04:00
Cirilo Bernardo
dbef1d41c5
Remove dead code (Coverity CID 149046)
2016-06-03 06:30:47 -04:00
Cirilo Bernardo
47e2aab7de
PATCH: segfault in VRML2 plugin
...
The attached patch fixes a segfault in the VRML2 plugin
which is caused by Shape entities with empty vertex
lists.
2016-05-19 21:12:07 -04:00
Cirilo Bernardo
0ec15c9157
VRML plugin: VRML plugin. This patch modifies the behavior of the VRML name parser so that a name may be immediately succeeded by ] or }.
...
The previous behavior was to reject a valid name since the brace or bracket was considered an invalid character within a name.
2016-05-16 09:32:15 +02:00
Cirilo Bernardo
c2a60d14d7
3D: fix issues reported by Coverity scan
...
*** CID 143752: Incorrect expression (USELESS_CALL)
*** CID 143751: Incorrect expression (UNUSED_VALUE)
*** CID 143749: Uninitialized members (UNINIT_CTOR)
*** CID 143748: Uninitialized members (UNINIT_CTOR)
*** CID 143747: Uninitialized members (UNINIT_CTOR)
*** CID 143746: Uninitialized members (UNINIT_CTOR)
*** CID 143745: Uninitialized members (UNINIT_CTOR)
*** CID 143744: Uninitialized members (UNINIT_CTOR)
*** CID 143740: Null pointer dereferences (NULL_RETURNS)
*** CID 143739: Memory - corruptions (MISMATCHED_ITERATOR)
*** CID 143735: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
*** CID 143734: Error handling issues (CHECKED_RETURN)
2016-04-06 21:41:52 -04:00
Cirilo Bernardo
20b40aba1c
Fixed bad delete/delete [] invocations and other warnings and errors as suggested by cppcheck
2016-04-05 20:32:22 +10:00
Cirilo Bernardo
18bb852030
Removed incorrect special treatment of commas within VRML files
2016-04-03 10:56:41 +10:00
Cirilo Bernardo
2dfd8064d4
Fix filename resolution within VRML2 Inline{}
2016-04-03 10:55:22 +10:00
Cirilo Bernardo
5e0e2538d0
Added comments to 3D Plugin CMake files regarding debugging output
2016-03-02 10:25:21 +11:00
Bernhard Stegmaier
5b0a250609
Fix compilation and install for OSX plus general code cleanup
2016-03-01 10:08:19 +11:00
Cirilo Bernardo
611d5de179
Removed code stubs for WWWInline support in VRML1; the construct will not be supported
2016-02-25 13:30:21 +11:00
Cirilo Bernardo
9195451e12
Switched SG* classes and plugin loader logging code from stderr to wxLogTrace
2016-02-23 17:46:22 +11:00
Cirilo Bernardo
c5984b207b
Changed IDF plugin debug log from stderr to wxLogTrace
2016-02-23 13:42:51 +11:00
Cirilo Bernardo
b0a26f32ef
Fixed bugs in VRML/X3D parser log code
2016-02-23 13:37:35 +11:00
Cirilo Bernardo
d2a13efc12
Changed VRML2 parser debug output from stderr to wxLogTrace
2016-02-23 13:31:51 +11:00
Cirilo Bernardo
d6af042c64
Revert accidental change to VRML logging levels
2016-02-23 11:21:15 +11:00
Cirilo Bernardo
14178ee521
Change logging of X3D and VRML1 parsers from stderr to wxLogTrace
2016-02-23 11:20:34 +11:00
Cirilo Bernardo
0d14fd0f9b
Fix scaling bug in vrml2_box.cpp
2016-02-22 20:00:23 +11:00
Cirilo Bernardo
684e41358a
Added support for VRML2 Inline{}
2016-02-22 19:59:07 +11:00
Cirilo Bernardo
af0ac955b9
Merge with main branch r6576
2016-02-22 19:58:32 +11:00
Cirilo Bernardo
970955d1a2
Improved non-compliant VRML1 model support by processing all top-level nodes (spec. mandates single top-level node which must be a grouping node)
2016-02-22 11:57:16 +11:00
Cirilo Bernardo
52e093087e
Relaxed VRML1 parsing rules to support yet more non-compliant models
2016-02-22 09:42:47 +11:00
Cirilo Bernardo
7ffa20a668
Fixed bug: X3D models not scaled to conform to legacy expectation
2016-02-12 16:58:12 +11:00
Cirilo Bernardo
8e63862d7c
Fixed coloring bugs related to uninitialized variable
2016-02-12 10:23:21 +11:00
Cirilo Bernardo
3c22f0f48f
Bumped VRML plugin version number
2016-02-08 09:01:25 +11:00
Cirilo Bernardo
943c5d8ea8
Changed default creaseAngle from ~30deg (VRML spec) to ~42deg for prettier smoothing
2016-02-08 08:56:03 +11:00
Cirilo Bernardo
99aba8f261
Changed handling of ambientIntensity; change of major version in SG* lib
2016-02-07 08:41:27 +11:00
Cirilo Bernardo
67832dbc74
Removed temporary debug info message
2016-02-06 13:28:59 +11:00
Cirilo Bernardo
c180390a08
Converted WRLVEC2, WRLVEC3, WRLROTATION to GLM equivalents
2016-02-06 09:59:18 +11:00
Cirilo Bernardo
f52744b29c
Added back-pointers to referenced entities
2016-02-06 09:38:03 +11:00
Cirilo Bernardo
b7a8661a03
Sync with main branch r6538
2016-02-05 16:15:51 +11:00
Cirilo Bernardo
cd6b0fbef1
Added visualization of X3D models
2016-02-05 16:08:30 +11:00
Cirilo Bernardo
ffa0775074
Added preliminary X3D parser with no visualization data
2016-02-05 15:32:52 +11:00
Cirilo Bernardo
bf3d2b252e
Fixed VRML normals calculations
2016-02-03 11:44:48 +11:00
Cirilo Bernardo
b987445676
Forced smoothed normals calculations for VMRML2 parser
2016-02-02 16:50:46 +11:00
Cirilo Bernardo
ca9ada70a2
Deactivate SG* VRML output
2016-02-02 11:48:26 +11:00
Cirilo Bernardo
1f796ef494
Fixed normals calculations in wrlfacet
2016-02-02 11:23:15 +11:00
Cirilo Bernardo
eadb34e22e
Remove accidental activation of SG->VRML debug write
2016-02-01 18:19:16 +11:00
Cirilo Bernardo
8fa9e28e85
Fixed inverted normals bug in wrlfacet
2016-02-01 18:09:19 +11:00
Cirilo Bernardo
55c7c61458
Initial introduction of improved VRML normals calculations; working on VRML1
2016-02-01 17:27:50 +11:00
Cirilo Bernardo
8dd744f635
Improved 3D cache manager's ability to replace outdated cache models
2016-01-31 13:21:12 +11:00
Cirilo Bernardo
b1d35965f5
Relax VRML1 specifications conformance to support more non-conformant models
2016-01-30 13:50:17 +11:00
Cirilo Bernardo
dddc3d91e9
Cleaned up 3D SceneGraph API by removing references to wxString
2016-01-29 11:52:42 +11:00
Cirilo Bernardo
3cb1924750
Suppressed 3D plugin VRML file output from default DEBUG build
2016-01-23 16:58:22 +11:00
Cirilo Bernardo
fcd89c57ed
Change in VRML1 color retrieval rule for out-of-bounds index
2016-01-19 16:13:12 +11:00
Cirilo Bernardo
39ca807ac4
Improved VRML1 support, including relaxed rules to support poorly structured models
2016-01-19 15:21:00 +11:00
Cirilo Bernardo
9a0b020806
Added VRML conversion of 'translation' and 'center' to mm on read and 0.1 inch on write
2016-01-18 10:39:51 +11:00
Cirilo Bernardo
ef62a5f153
Ensure consistent use of mm within SG models and that SG models write VRML files using 0.1 inch units
2016-01-18 08:35:29 +11:00