Commit Graph

360 Commits

Author SHA1 Message Date
Chris Hennes
08cf226263 Import: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 15:34:26 -05:00
andrea
58b5cb16ae removed unused files 2023-08-25 16:06:42 +02:00
wmayer
a0882fe64a Import: modernize C++: use default member init 2023-08-23 00:55:03 +02:00
wmayer
a3057e946b Mod: modernize C++: use equals default 2023-08-22 11:16:49 +02:00
wmayer
7402ac7a26 Import: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
wmayer
664a08043e Import: modernize C++: use range-based for loop 2023-08-15 01:09:53 +02:00
Roy-043
beaf4ccb71 Import: Avoid dictionary.keys() where possible 2023-08-09 10:10:35 +02:00
Benjamin Bræstrup Sayoc
33384cff9c [Everywhere] FileInfo::hasExtension for multiple values (#9774)
* [Base] Add hasExtension for multiple values

* [Gui] Use hasExtension for multiple values

* [Drawing] Use hasExtension for multiple values

* [Fem] Use hasExtension for multiple values

* [Import] Use hasExtension for multiple values

* [Mesh] Use hasExtension for multiple values

* [Part] Use hasExtension for multiple values

* [TechDraw] Use hasExtension for multiple values
2023-08-07 09:55:19 -06:00
wmayer
2a88c7c7df modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
wmayer
d244dcf2da modernize C++: use nullptr 2023-08-05 11:23:12 -06:00
wmayer
39e53e5eb0 Mods: modernize C++: redundant void arg 2023-08-05 16:50:31 +02:00
andrea
170c2b9957 removed old OCC <7 references
removed OCC <7 references
2023-08-04 21:22:40 -06:00
Syres916
15e9b45691 [Import] Dxf Fix regression from https://github.com/FreeCAD/FreeCAD/commit/1f6fd1b
See discussion https://forum.freecad.org/viewtopic.php?t=80040&sid=9937b585c8681fe5a2d27f37dcd3f163
2023-08-01 11:04:22 +02:00
Syres916
ca4bc401f7 Merge branch 'master' into patch-80 2023-06-12 14:24:58 +01:00
Kevin Martin
d8e7340c15 Handle long text/mtext on DXF import
This had previously been corrected using similar code but merging another
fix lost part of the original change for this issue.
2023-06-11 13:44:08 -04:00
Syres916
5d9273628e [Import] DXF make codepage case insensitive
See discussion https://forum.freecad.org/viewtopic.php?t=78719

I don't believe https://github.com/FreeCAD/FreeCAD/issues/8704 is fixed even after this change, the example file Encoding-error.dxf which can be opened by Varicad Viewer still opens error free but has nothing in the 3D view.
2023-06-02 11:43:16 +01:00
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