Commit Graph

344 Commits

Author SHA1 Message Date
wmayer
1e830a8800 Import: fixes #9438: Crash when loading DXF file with a text element 2023-04-29 22:57:07 +02:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Yorik van Havre
5f0b58449d Merge pull request #9060 from kpemartin/master
Fix encoding error for import from older DXF files
2023-04-13 13:03:13 +02:00
easyw
6d56f3a9ab fixing stepZ for exporting 2023-04-05 18:15:10 +02:00
Kevin Martin
31f3458399 Add GIL locking for Python calls, alter cp mapping
Required GIL locking has been added where Python methods are
called.

The code mapping from codepage names like ansi_nnn to cpnnnn has
been altered a bit to shorten it.
2023-03-29 16:09:35 -04:00
Kevin Martin
3f195bb46b Replace "aci" with the lesss cryptic "colorIndex"
The "a" in "aci" refers to a trademark which we want to avoid mentioning
in code. These values are indices into a color table (plus two special
values for BYBLOCK and BYLAYER) so using the term colorIndex seems more
readable.
2023-03-27 09:48:16 -04:00
Kevin Martin
c155a9ea9c Remove reference to a trademarked name 2023-03-27 09:11:52 -04:00
Kevin Martin
dbf17376b7 Fix encoding error for import from older DXF files
The C++ importer incorrectly treated the contents of all TEXT and MTEXT
objects as beind encoded as UTF-8, but this is not true for DXF files
before AutoCAD 2007, where the encoding is "plain ASCII" plus some in-band
\U+dddd encoding. This would cause errors if the text contained non-ASCII
characters such as the Degree Sign.

This change causes the correct encoding to be used.
2023-03-27 07:14:07 -04:00
Pesc0
42cb756522 remove remaining six dependencies 2023-03-26 23:39:00 +02:00
Kevin Martin
048b358c01 [Import] DXF: correction to documentation
Correction to documentation comment noticed while addressing these issues.
The comment for readDXF did not document its fourth option_source argument.
2023-03-24 23:03:52 +01:00
wmayer
956a0f2531 Import: issue #8884: C++ DXF importer never imports text (annotations
This reverts commit e1ebcef39e
2023-03-22 20:09:20 +01:00
Kevin Martin
67411ec691 Issue 8968: Correct C++ DXF importer to get all of long MTEXT text
If the MTEXT exceeds 250 characters, the contents are broken up into
several records in the DXF file. The C++ importer has been changed
to collect all these pieces into a single string containing all the text.
2023-03-20 11:48:47 -04:00
wmayer
21d705ad4b Import/Part: [skip ci] restore some comments 2023-03-14 21:47:41 +01:00
Andrew
0833cbe7cc Clean mod/import folder
Clean mod/import folder

fix code not removed.
2023-03-14 16:02:01 +01:00
Abdullah Tahiri
c604d1741d Console/ILogger: Refactor and extension
=======================================

Refactor:
 - Substitute the use of variadic templates with parameter packs.
 - Use recently incorporated external library "fmt" to handle printf like formating.
 - Extensive cleaning of pragmas and unnecessary forward declarations.
 - Parameter packs and libfmt provide a much stronger type checking now, so
   conversions that are by standard implicit as bool to int need an explicit static_cast
   to avoid compilation warnings.

Extension:
 - Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
 - Include a new type of message called CriticalMessage, this message is intended to have
   special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
   It will be used to substitute the current signal/slot mechanism.
 - Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
   will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
   are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
   notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
   of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
   are already translated.

Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:

    Crt = FreeCAD.Console.PrintCritical
    Ntf = FreeCAD.Console.PrintNotification
    Tnf = FreeCAD.Console.PrintTranslatedNotification
2023-03-07 16:13:23 +01:00
wmayer
d196f8c496 Mod: catch exception raised by Rotation::setValue 2023-03-01 18:43:15 +01:00
wmayer
f66ec96a77 Import: enable multi-threading support of RWGltf_CafWriter for OCCT 7.7 2023-02-26 13:30:44 +01:00
wmayer
85ad88d101 Import: [skip ci] fix some minor Lint issues 2023-02-26 09:04:26 +01:00
wmayer
c3fc619b99 Import: support to export to glTF file in headless mode 2023-02-26 09:04:26 +01:00
luzpaz
c14f58d6f3 Fix various trailing whitespace issues and typos 2023-02-19 10:59:14 -06:00
luzpaz
23af228b87 Fix various indentation issues (tabs->spaces) 2023-01-23 16:59:28 +01:00
wmayer
2ff9ff02d7 Import: move to new style connect() 2023-01-13 15:58:56 +01:00
luz paz
fa98553775 Fix various typos and grammatical issues 2022-11-30 12:45:29 +01:00
luz paz
95d89622de Fix header uniformity for various workbenches/directories
Also includes some trailing whitespace fixes
2022-11-29 04:48:57 +01:00
Uwe
625d291f50 [Import] Gui: remove unused includes
- also some sorting
- also put some includes to precompiled headers
2022-11-28 02:11:30 +01:00
wmayer
b44d70f646 Import: [skip ci] fix warning about trailing whitespaces, fix parsing errors 2022-11-25 11:55:51 +01:00
wmayer
88bde4e0f9 Import: fix build failure 2022-11-25 10:28:13 +01:00
Uwe
838d99636b [Import] remove unused includes
- also some sorting
2022-11-25 04:34:44 +01:00
Kuzemko Alexsandr
63174d487f [App] Fix of untranslated first document's name (#7156)
* Change no need function newDocument("Unnamed") call to variant without parameter. "Unnamed" set in App newDocument function instead.
* Refactor New Document command to run without parameter.
* Translate new document's userName. Internal name = "Unnamed".
* Crowdin Add to updatets.py App.ts. Create new file App.ts
* Fix error where document name is set with one function parameter. In this situation set internal and user name to string variable. For default function call (without parameter) set internal name to Unnamed, userName = translate ("Unnamed")
2022-10-20 21:35:09 -05:00
wmayer
5ee0f0a8cf Part: add dialog for STEP export 2022-10-04 20:30:03 +02:00
wmayer
5af6521377 Import: implement exportOptions() 2022-10-04 17:20:04 +02:00
wmayer
5dcaa8e5bf Part: use ImportExportSettings in client code 2022-10-04 12:32:47 +02:00
wmayer
8db7ee1051 Part: implement wrapper class around Interface_Static 2022-10-03 19:03:32 +02:00
wmayer
f827de4d4d Import: make API more flexible 2022-10-03 17:26:32 +02:00
marioalexis
816ce9063d Import: Replace C cast 2022-09-18 11:06:51 -05:00
wmayer
e205daa43d Mod: modernize C++: replace 'typedef' with 'using' 2022-08-29 16:21:46 +02:00
berniev
6953310116 Mod: Single arg ctors must be explicit 2022-08-24 16:55:20 +02:00
luz paz
4faf443883 stepZ.py: remove remaining mention of gzip_utf8
Leftover from 97ec620ff  
[skip ci]
2022-08-24 14:40:43 +02:00
wmayer
1ce78efb29 Import: [skip ci] whitespace improvements 2022-08-24 11:55:39 +02:00
andrea
97ec620ff8 remove unused gzip_utf8 2022-08-24 11:48:46 +02:00
wmayer
a899f078bd CMake: [skip ci] remove trailing whitespaces 2022-08-24 07:46:07 +02:00
Jonas Bähr
a1776d3e74 Fix build on MacOS-X 10.14: missing Xerces include dir
This undoes most of the Xerces related part of the commits listed below.
The issue resolved here is that the Xerces include dir *is* set in the
CMakeLists.txt of src/Base, but it got removed from various App and Gui
dirs in src/Mod. If those now include a header from src/Base, which
itself includes xercesc, the build fails using Apple clang version 11.0.0
(clang-1100.0.33.17) on Mojave, configured using cmake 3.22.1, with
errors like the following:

In file included from .../src/Mod/Part/App/FeaturePartBoolean.cpp:34:
In file included from .../src/App/Application.h:33:
.../src/Base/Parameter.h:54:10: fatal error: 'xercesc/util/XercesDefs.hpp' file not found
 #include <xercesc/util/XercesDefs.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Finally, a full list of the commits that introduced this spurious include
dir optimization for reference:
- Drawing: commit 96ad045b91
- Image: commit dde71a21d5
- Import: commit c9d28b542f
- Inspection: commit d41f55f382
- Mesh: commit 19072b0538
- Part: commit fe213a48f0
- PartDesign: commit b037d8e240
- Path: commit f23fa31f42
- Points: commit bec723ba17
- Raytracing: commit 08d4ac63a3
- ReverseEnginering: commit 5ca787cb0e
- Robot: commit bad4809a1c
- Sketcher: commit 3c96daf105
- Spreadsheet: commit 66e8a2bef3
- Start: commit c9dee5e70a
- Surface: commit 6b04215be6
- TechDraw: commit 5e6699e48d
- Test: commit ea5b45b92c
- Web: commit ee6d631531
2022-08-24 07:40:04 +02:00
wmayer
2062f9ce87 clang: fix warnings [-Winconsistent-missing-override] 2022-08-09 17:36:25 +02:00
berniev
ddafb98813 Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
wmayer
70c18c8017 Part: [skip ci] change some default parameters for STEP export 2022-07-26 19:34:55 +02:00
wmayer
1c3f496d0f Import: [skip ci] Fix several clazy issues:
* Use multi-arg instead [-Wclazy-qstring-arg]
2022-07-25 10:43:46 +02:00
wmayer
fed9f20f48 Import: use Part::ImportExportSettings to access parameters 2022-07-23 21:58:51 +02:00
Uwe
1f04880da9 [Image] [Inspection] remove superfluous nullptr checks 2022-07-18 01:54:09 +02:00