Commit Graph

137 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
222a2520b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
wmayer
789912d745 Drawing: Apply clang format 2023-09-10 12:37:47 +02:00
wmayer
6200150fac Drawing: fix build failure 2023-08-27 19:16:58 +02:00
Chris Hennes
8bf24a7c3f Drawing: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 15:34:26 -05:00
wmayer
2a970b3045 clang: fix -Wunused-but-set-variable 2023-03-12 15:05:21 +01:00
Uwe
0533550f95 remove some unnecessary Boolean checks
- checks for true/false and nullptr
2022-12-12 21:17:49 -06:00
Uwe
b2a3c5e22c [Drawing] App: remove unused headers
- also some sorting
- also enable precompiled header
2022-12-10 05:22:34 +01:00
wmayer
e205daa43d Mod: modernize C++: replace 'typedef' with 'using' 2022-08-29 16:21:46 +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
51ecdbdabe Drawing: [skip ci] Fix several clazy issues:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
* Use multi-arg instead [-Wclazy-qstring-arg]
2022-07-25 11:31:37 +02:00
wmayer
988ec4c4fb Drawing: [skip ci] fix build failure 2022-07-04 10:44:41 +02:00
wmayer
469c36e3cc Mod: handle removed headers in PCH files for OCC 7.6 2022-05-21 06:28:07 +02:00
wmayer
106db51415 Drawing: include header with export macros 2022-03-24 20:42:53 +01:00
wmayer
97330443a2 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
46117f0ae1 Drawing: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
Uwe
96ad045b91 [Drawing] remove Python.h and Xerces 2022-03-20 22:34:03 +01:00
wmayer
0054cbddaa Fix coverity issue:
* CID 332682: Resource leak
* CID 350607: Resource leak
* CID 332677: Resource leak
2022-03-14 11:35:04 +01:00
wmayer
58a719e207 Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
wmayer
74639da997 OCCT: port FreeCAD sources to version 7.6
SMESH is not yet ported
Although FreeCAD code compiles with OCCT 7.6 it doesn't work at the moment
2021-10-09 13:49:02 +02:00
wmayer
44f42a8e2c LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
48f9085746 LGTM: [skip ci] fix: Local variable hides global variable
A local variable or parameter that hides a global variable of the same name.
This may be confusing. Consider renaming one of the variables.
2020-07-26 19:30:24 +02:00
wmayer
5095703776 add missing std:: namespace to build on Debian 10 2019-08-21 23:56:46 +02:00
wmayer
93f0d1bec9 PVS: V1024 The 'file' stream is checked for EOF before reading from it, but is not checked after reading. Potential use of invalid data 2019-03-13 13:34:45 +01:00
wmayer
0c95c95793 CMP0050: make Drawing module aware of cmake policy 2018-08-20 18:40:14 +02:00
Markus Lampert
0b40519f3f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
wmayer
d3ef6905ff + add option to switch off precompiled header 2018-07-25 20:17:11 +02:00
luzpaz
128239b54a Typos: Various workbenches and misc.
[skip ci]
2017-12-25 10:58:10 +01:00
luzpaz
ab8f8919b6 Misc. typos
+ some are doxy others are just comment code.  
+ some minor whitespace and grammatical tweaks. 
+ app/SCL/* typos have also been submitted upstream (https://github.com/stepcode/stepcode/pull/366). So it's ok to merge them in to master.
2017-10-04 17:59:11 +02:00
wmayer
949c86d364 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
wmayer
8659302150 fix typo introduced with pr702 2017-07-28 20:58:20 +02:00
WandererFan
a32972ef2f Fix Drawing/TechDraw BSplines
In some cases the Geom_BSplineCurve returned by
BrepAdaptor_Curve.BSpline() does not have the
same endpoints as the original Edge and should
not be used in place of Approx_Curve3d.
2017-06-28 22:14:01 +02:00
WandererFan
ab19a5ea06 Handle "floating" straight edges in Svg
BRep_Tool::Polygon3D assumes the edge has polygon representation -
ie already been "tesselated". this is not true for all edges,
especially "floating edges".
2017-06-23 08:14:46 +02:00
WandererFan
052704eb0c Fix #1937 mis-shapen projections in TechDraw and Drawing
Complex curves need more bezier segments for accurate representation.
2017-05-30 15:44:38 +02:00
Simon
9633c94515 ProjectionAlgos: Make the style of the lines in the SVG file configurable.
* getSVG provides new style parameters for every kind of line:
  V, V0, V1, H, H0, H1.
* Old line width parameters are removed. The style parameters
  can be used instead.
* A style is a map container for svg attribute keys and values
  (string, string).
* The Python interface is updated to offer the new style parameters
  accordingly as a dict.
* Because there are many parameters on the function call now,
  the Python interface supports keyword parameters.
* Update ArchSectionPlane to take advantage of the new style parameters.
  This simplifies the code. String replacements could be removed
  (done in a later commit).
* FeatureViewPy.cpp is – to my knowledge – the only function that used the
  old line width parameters. I rewrote it to use the new style parameters.
2017-04-23 19:42:25 -03:00
Peter Lama
a75a98ef27 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
wmayer
a101d426a4 py3: ported Drawing to python3 2017-02-24 13:48:41 +01:00
Priit Laes
744724af51 Drawing: Remove broken and unused DrawingAlgos.py file 2017-02-24 13:48:41 +01:00
wmayer
0afd327f2a remove superfluous Qt includes 2016-12-13 14:33:16 +01:00
wmayer
3b961bcb5f + add convenience method recomputeFeature()
+ make method recompute() protected
2016-11-06 17:16:50 +01:00
wmayer
b9c25c8402 fix -Wextra & -Wdeprecated in Drawing 2016-09-22 15:29:10 +02:00
wmayer
f3f0f5bd2e fix Coverity issues 2016-08-20 15:41:33 +02:00
wmayer
d98337b5f2 Coverity: fix high impact issues 2016-08-17 15:33:04 +02:00
Wolfgang E. Sanyer
7f4a437cc2 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
WandererFan
3b96cbbeb6 wmayer patch for Win & OCC7 compat 2016-07-11 15:32:16 +02:00
wmayer
bca7a1866e + port to OCC 7.0 2016-05-14 16:53:27 +02:00
wmayer
cc88b376e1 + fixes issue #0002224: Drawings break on reopen. Template not found 2016-05-05 11:11:08 +02:00
Eivind Kvedalen
a21571a652 Spreadsheet: Removed own expression parser and instead use the one in App. 2016-04-02 12:01:04 +02:00
wmayer
aa7aa64724 + simplify porting of Drawing module to Python3 2016-01-21 14:49:57 +01:00
wmayer
89cb247923 + handle degenerated ellipse for SVG output 2016-01-11 13:01:01 +01:00
Yorik van Havre
87397a2512 Drawing: support for text alignment in Spreadheetview 2016-01-05 20:20:25 -02:00