Commit Graph

60 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
3ea96b18f5 [ Draft ]: Update SPDX License Identifiers (#24965) 2025-11-03 11:58:14 -06:00
marcuspollio
e831fc9163 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
a059456d86 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
496b31b087 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
ac51455a0a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
Max Wilfinger
386c5cd910 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
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Benjamin Bræstrup Sayoc
ee1c73cd04 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
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
wmayer
560cab6f31 clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +02:00
liukaiwen
329904a055 [cmake] some definitions do not matter build now 2023-09-27 18:17:14 +08:00
wmayer
142b86fde2 Mod: modernize C++: use equals default 2023-08-21 20:21:30 +02:00
luzpaz
a4239ccfcf Draft: fix trailing whitespace 2023-01-22 20:26:40 +01:00
Uwe
43182e87fd [Draft] : remove unused headers
- also some sorting
2022-12-14 03:48:56 +01:00
berniev
71dc5ead2f Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
wmayer
21524a7ebf Draft: [skip ci] fix -Wunused-parameter 2022-07-16 11:26:58 +02:00
Benjamin Alterauge
43f17aa624 Remove DraftUtils.readDXF 2022-07-16 10:55:24 +02:00
Chris Hennes
f442b7d36d Draft: PR6497 move return statement to new line 2022-03-29 12:35:46 -05:00
wmayer
6ca12d31b3 Draft: include header with export macros 2022-03-24 20:48:41 +01:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
1b9f30fe76 Draft: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
wmayer
0f9768fb33 Fix coverity issue:
* CID 332682: Resource leak
* CID 350607: Resource leak
* CID 332677: Resource leak
2022-03-14 11:35:04 +01:00
wmayer
4b415d1b37 Mod: add string header to dxf.h 2022-03-01 15:13:34 +01:00
wmayer
6ae3feedae Draft, Import, area: include iosfwd instead of iostream if forward declarations are sufficient 2022-03-01 12:37:00 +01:00
Roy
84b3003e8e Draft: Housekeeping: call 'make' functions with new name (4) 2022-02-20 22:31:08 -06:00
wmayer
e77c96ac18 Fix issue 0004791: DXF import fails for trivial circle 2021-11-24 18:27:21 +01:00
wmayer
9ce79bf3c7 Mod: fix warning [-Wmacro-redefined] 2021-09-14 22:57:17 +02:00
Roy-043
8b79dd5f44 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
1c9573e8d2 dxf: [skip ci] Coverity: Buffer not null terminated 2020-09-14 14:37:20 +02:00
wmayer
e079e7a7bb LGTM: [skip ci] fix: Non-virtual destructor in base class 2020-07-24 19:30:12 +02:00
wmayer
c4bb1ff762 Coverity: Copied into fixed size buffer 2020-07-20 17:34:25 +02:00
luz.paz
8cfa85cf18 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
8e09ea8a32 Draft: add gitattributes file to let git manage file endings and normalize them 2019-12-19 07:51:09 +01:00
wmayer
61eeca41e1 fix -Wmaybe-uninitialized 2019-03-03 15:04:24 +01:00
wmayer
31963f16c1 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
066a8b0b47 Point Draft importDXF to Mod/Import/ImpExpDxf
- also add "deprecated" message to DraftUtils.readDXF
2018-05-02 22:09:46 +02:00
luzpaz
f3bf8fe919 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
1c259fa70b Draft: Better block handling in dxf import & export 2017-04-07 14:08:09 -03:00
hgutsche
201c9d89b0 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
d250cf40f5 py3: ported Draft to python3 2017-02-04 15:48:43 +01:00
Yorik van Havre
0e040fd6e0 Draft: Do not import non-instanciated blocks - fixes #2822 2016-12-31 15:48:01 -02:00
Yorik van Havre
834814521f Draft: Support elevation of LWPolylines in DXF importer 2016-09-26 22:18:45 -03:00
wmayer
6bcd112c4b fix -Wextra in Draft 2016-09-23 21:19:38 +02:00
Wolfgang E. Sanyer
d1d2f1f811 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
Yorik van Havre
6d74c0edb6 Draft: Allow to scale imported DXF files - fixes #2557 2016-05-18 14:32:33 -03:00
wmayer
d1bc34441d + fix various gcc & clang warnings 2016-04-24 16:21:19 +02:00
wmayer
36d82133f1 + simplify porting of DraftUtils module to Python3 2016-01-20 11:57:59 +01:00