Commit Graph

59 Commits

Author SHA1 Message Date
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
f0e70e68e0 [ Draft ]: Update SPDX License Identifiers (#24965) 2025-11-03 11:58:14 -06:00
marcuspollio
50e4864efb Add Draft workbench to .pre-commit-config (#24664)
* Add Draft workbench to .pre-commit-config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-15 11:21:09 +02:00
Markus Reitböck
499742eea2 Draft: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-24 20:08:54 +02:00
Markus Reitböck
749ac36615 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
wmayer
93db4c7d8a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
Max Wilfinger
a9cd5a4982 Draft: Update UI strings for consistency (#22331)
* Draft: Update UI strings for consistency

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-08-06 23:02:16 +02:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
tritao
6c2c6847eb CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Benjamin Bræstrup Sayoc
755229df23 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Joao Matos
cc6ffb44de Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Joao Matos
27ebc68a11 CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
wmayer
4185605d5e clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +02:00
liukaiwen
4f8fe8fd4a [cmake] some definitions do not matter build now 2023-09-27 18:17:14 +08:00
wmayer
9a749e51c8 Mod: modernize C++: use equals default 2023-08-21 20:21:30 +02:00
luzpaz
5fa4482504 Draft: fix trailing whitespace 2023-01-22 20:26:40 +01:00
Uwe
4d06111699 [Draft] : remove unused headers
- also some sorting
2022-12-14 03:48:56 +01:00
berniev
ddafb98813 Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
wmayer
780ccceccf Draft: [skip ci] fix -Wunused-parameter 2022-07-16 11:26:58 +02:00
Benjamin Alterauge
3ef8a641c6 Remove DraftUtils.readDXF 2022-07-16 10:55:24 +02:00
Chris Hennes
b13088664f Draft: PR6497 move return statement to new line 2022-03-29 12:35:46 -05:00
wmayer
988cfcef12 Draft: include header with export macros 2022-03-24 20:48:41 +01:00
wmayer
97330443a2 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
618deb751f Draft: modernize C++11
* use nullptr
2022-03-23 19:26:15 +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
2dc1a4c412 Mod: add string header to dxf.h 2022-03-01 15:13:34 +01:00
wmayer
831d569f52 Draft, Import, area: include iosfwd instead of iostream if forward declarations are sufficient 2022-03-01 12:37:00 +01:00
Roy
fae36b2da0 Draft: Housekeeping: call 'make' functions with new name (4) 2022-02-20 22:31:08 -06:00
wmayer
325c5ec887 Fix issue 0004791: DXF import fails for trivial circle 2021-11-24 18:27:21 +01:00
wmayer
ce285ea265 Mod: fix warning [-Wmacro-redefined] 2021-09-14 22:57:17 +02:00
Roy-043
97828f0ba8 Update dxf.cpp
Fixed wrong DXF scale factor for inches. 1/25.4 was wrongly used,
2020-11-09 12:35:14 +01:00
wmayer
c3d35c65fe dxf: [skip ci] Coverity: Buffer not null terminated 2020-09-14 14:37:20 +02:00
wmayer
47d570716c LGTM: [skip ci] fix: Non-virtual destructor in base class 2020-07-24 19:30:12 +02:00
wmayer
433ec2d6e4 Coverity: Copied into fixed size buffer 2020-07-20 17:34:25 +02:00
luz.paz
ae7cb9e300 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
Bernd Hahnebach
8f7220da51 Draft: add gitattributes file to let git manage file endings and normalize them 2019-12-19 07:51:09 +01:00
wmayer
519849de89 fix -Wmaybe-uninitialized 2019-03-03 15:04:24 +01:00
wmayer
a7094210f8 Fix scan coverity issues:
CID 184294: Uncaught exception
CID 183597: Unchecked return value
CID 175809: Dereference before null check
CID 175810: Logically dead code
CID 133000: Uninitialized scalar variable
CID 133001: Uninitialized scalar variable
CID 183591: Explicit null dereferenced
2018-11-13 16:47:58 +01:00
wandererfan
650fed9795 Point Draft importDXF to Mod/Import/ImpExpDxf
- also add "deprecated" message to DraftUtils.readDXF
2018-05-02 22:09:46 +02: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
Yorik van Havre
04a3283000 Draft: Better block handling in dxf import & export 2017-04-07 14:08:09 -03:00
hgutsche
de8f66f857 Some fixes for doygen syntax errors and some configuration to make it run smoother under Windows 2017-02-28 18:52:04 +01:00
wmayer
8696ecdf9b py3: ported Draft to python3 2017-02-04 15:48:43 +01:00
Yorik van Havre
2982ecf633 Draft: Do not import non-instanciated blocks - fixes #2822 2016-12-31 15:48:01 -02:00
Yorik van Havre
83c59bc697 Draft: Support elevation of LWPolylines in DXF importer 2016-09-26 22:18:45 -03:00
wmayer
012d6b038d fix -Wextra in Draft 2016-09-23 21:19:38 +02:00
Wolfgang E. Sanyer
7f4a437cc2 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
Yorik van Havre
21ba33df01 Draft: Allow to scale imported DXF files - fixes #2557 2016-05-18 14:32:33 -03:00
wmayer
d03a8fd386 + fix various gcc & clang warnings 2016-04-24 16:21:19 +02:00
wmayer
ebc6d37262 + simplify porting of DraftUtils module to Python3 2016-01-20 11:57:59 +01:00
Yorik van Havre
273131c088 Draft: finished new DXF importer - fixes #2205 2016-01-04 18:01:34 -02:00