Marek Roszko
d74a0cdaa3
Don't pre-scale the line width
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11122
2022-03-13 23:08:28 -04:00
jean-pierre charras
dbfdd3fb56
Fix some Coverity warnings.
2022-03-06 09:48:33 +01:00
jean-pierre charras
8de4f762e1
svg importer: fix a crash when importing some files with no graphic item
2022-02-27 09:59:42 +01:00
Tomasz Wlostowski
018f4531a5
Fixes in the SVG import polygon postprocessing:
...
- don't drop subsequent polys when a non-filled primitive is imported 'in between'
- fix missing holes (also related to the interleaving of stroke and filled shapes, depending on the software that wrote the SVG file)
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10813
2022-02-14 00:54:31 +01:00
Jeff Young
34a9a165c9
More wide-string declarations.
2022-02-05 22:26:31 +00:00
Jeff Young
c8a50d9b50
Remove unit-less angles from VECTOR2I/D APIs.
2022-01-20 23:58:20 +00:00
Jeff Young
1b19ff5f42
More EDA_ANGLE changes.
2022-01-14 16:08:19 +00:00
Marek Roszko
98ee6c5f85
Cleanup some wx/gdicmn.h includes
2022-01-04 20:32:27 -05:00
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
2022-01-01 11:55:51 -05:00
Tomasz Wlostowski
01d1f8723c
SVG_IMPORT_PLUGIN: enable postprocessing of polygons with degeneracy and holes
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6739
2021-12-31 17:05:50 +01:00
Tomasz Wlostowski
3fce15f442
GRPAHICS_IMPORTER_BUFFER: forgot to store the indices of the paths belonging to a compound shape
2021-12-31 17:04:16 +01:00
Tomasz Wlostowski
e1f32f13a2
pcbnew: SVG importer support for even-odd fill rule
2021-12-31 17:04:16 +01:00
Tomasz Wlostowski
5d87b37f52
pcbnew: GRAPHICS_IMPORTER can now recognize multi-path shapes (and postprocess polygons with holes into Kicad-compatible fractured polysets)
2021-12-31 17:04:16 +01:00
Jeff Young
86cb57f4a7
Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont
2021-12-28 22:15:20 +00:00
Jeff Young
c3552a940a
Make sure standard OK/Cancel buttons respond to current language.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young
e26341d424
Cleanup.
2021-12-23 20:36:18 +00:00
Jeff Young
2bc86fa0a8
Shapes for schematic.
...
ADDED arc, circle and rectangle shapes for schematic. Shapes support
line styles and fill colors.
CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).
Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Seth Hillbrand
1160bd94b0
Scale vertex lineweights in DXF import
...
DXF lineweights are always in 100th of mm, so scale the set weights on
import
Fixes https://gitlab.com/kicad/code/kicad/issues/9854
2021-12-07 16:23:44 -08:00
Seth Hillbrand
c613f5e2f1
Convert DXF arcs in fp space
...
Once the arcs are set in pcbnew, they have integer representation and
can accumulate rounding errors. So we convert the start/end points in
the importer to ensure that the connected points in a DXF remain
connected
Fixes https://gitlab.com/kicad/code/kicad/issues/9827
2021-12-07 10:53:35 -08:00
Seth Hillbrand
c4a6a61743
Don't truncate values on import
...
Leads to off-by-one errors when converting to internal values
Fixes https://gitlab.com/kicad/code/kicad/issues/9827
2021-11-30 16:10:56 -08:00
Tomasz Wlostowski
bba742b804
pcbnew: support vertex line start/end width to correctly import certain DXF files
2021-10-25 17:39:09 +02:00
Tomasz Wlostowski
df47c1c4e9
pcbnew: use doubles to pass line widths in the DXF importer as they are expressed in DXF's units and can case severe rounding errors when passed as ints
2021-10-25 17:36:04 +02:00
Roberto Fernandez Bautista
987d64c88e
pcbnew graphics import: Fix arc winding direction
2021-10-23 11:02:00 +01:00
Jeff Young
9b9e379aa0
Overhaul arc internal model to not over-specify information.
2021-10-15 12:45:43 +01:00
Jeff Young
a41944020d
Push most of PCB_SHAPE impl down in to EDA_SHAPE.
2021-10-15 12:45:43 +01:00
Jeff Young
b84d1456d5
KIFACE_I -> KIFACE_BASE.
2021-09-14 23:45:14 +01:00
Jeff Young
3aae3c6f65
Dark mode for a bunch of HTML dialogs.
...
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT
Fixes https://gitlab.com/kicad/code/kicad/issues/9157
Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Marek Roszko
daca9d21f2
Add dxf point import
...
Fix #9149
2021-09-12 19:38:52 -04:00
Jeff Young
f221220fe2
Rename layer ids file.
...
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh
37b200cb3e
Pass wxString objects by reference instead of on the stack.
2021-07-27 08:41:27 -04:00
Jeff Young
0fb864d596
Pull some name changes back from 7.0 to ease merging.
2021-07-21 20:58:59 +01:00
Wayne Stambaugh
cf00319c85
More NULL expunging.
2021-07-20 07:27:18 -04:00
Jeff Young
e61822c9e0
Naming conventions and a bug fix on arc points.
2021-07-19 13:17:12 +01:00
Marek Roszko
b924c85f80
Start recording the precision of dxf imports
2021-06-27 00:38:19 -04:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Marek Roszko
4712d7a918
Remove a leaky wx/msgdlg.h include
2021-06-06 08:45:38 -04:00
Wayne Stambaugh
f57ef55cd6
Pcbnew header housekeeping round 3.
2021-06-04 13:50:08 -04:00
Marek Roszko
c4801a4dd4
Catch oom for graphics importer
...
Because DXFs and SVGs could be nasty sized
2021-05-01 14:26:47 -04:00
jean-pierre charras
0427bda768
Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
...
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Marek Roszko
21fde9b629
enum class PCB_SHAPE_TYPE_T
2021-04-30 22:36:12 -04:00
Marek Roszko
39a0bc6252
Remove erroneous block check in dxf import added during previous improvements
2021-04-28 18:48:59 -04:00
jean-pierre charras
9a0f9575b6
Fix minor Coverity warnings
2021-03-25 09:12:24 +01:00
Marek Roszko
e409b04538
More gracefully handle tinyspline not liking a spline definition
...
Partial fix for #6634
2021-03-24 00:37:01 -04:00
Jeff Young
07aea4339d
Formatting.
2021-03-20 21:53:29 +00:00
Jon Evans
18037e2f65
Rework bitmap system to load from archived PNGs
...
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Seth Hillbrand
9212197c26
Grammar
2021-02-15 15:18:13 -08:00
Marek Roszko
8f21034254
Fix invalid windows macro
...
Missing one underscore at the end
2021-01-31 16:15:50 -05:00
Wayne Stambaugh
6a39b81647
Fix the last of broken Doxygen comment specifiers.
2021-01-27 17:39:44 -05:00
Marek Roszko
828ecb76aa
Remove polyline 3d check added by previous fixes
...
Fix #7030
2021-01-09 18:56:35 -05:00
Michael Kavanagh
154e19b6e7
Icons: use common prefix for small 16x16
2021-01-02 23:16:33 +00:00
Marek Roszko
9322b3a4e1
Use the C++ isnan function
2020-11-29 11:30:45 -05:00
Marek Roszko
5e117bfaa5
Don't allow nan values for dxf text alignment points to creep in
...
Literally the only place dxflib decides to default to NaN....
2020-11-28 20:13:42 -05:00
Marek Roszko
cc7264c0b9
Subtract off the block's base point coordinate from the insert translation
2020-11-28 20:13:42 -05:00
Marek Roszko
cac0d93dfd
Implement DXF INSERT scale
...
This has a chance of being wrong due to how the dimensions are stored in these intermediate objects
2020-11-28 20:13:42 -05:00
Marek Roszko
5607420339
Fix polylines being skipped in DXF blocks
2020-11-25 00:06:02 -05:00
Marek Roszko
272ec53e03
Make DXF import slightly prettier by copying text style width factor
...
It's impossible to replicate the original cad font style but replicating width factors at least
gives you something closer.
2020-11-24 07:15:49 -05:00
Marek Roszko
45598f2933
Add handling of DXF arbitrary axis/extrusions
...
This fixes some DXFs imports where unforunately CAD tools like SolidWorks
randomly decide to mirror circle definitions across the "z" axis (resulting in x or y axis flips in 2d)
Most likely live projection from 3D to 2D drawings introduces this.
However this is DXF specification to describe it so obtusely with vectors for a 2d drawing.
2020-11-23 21:24:38 -05:00
Marek Roszko
44f4d41bba
Fix member variable name
2020-11-23 21:24:38 -05:00
Jeff Young
62e5500420
Cleanup dialog layout & punctuation.
2020-11-23 19:47:55 +00:00
Marek Roszko
32ec8fa928
Implement correct placement of DXF block contained entities
...
DXF blocks are virtual groups of items.
The insert entity is what actually places all the block contents at a given coordinate.
This should fix importing drawings from professional CAD tools like SolidWorks that will have a good bit of blocks.
2020-11-23 10:10:35 -05:00
Marek Roszko
bf59b422bc
Record blocks being received during the import
2020-11-23 10:07:30 -05:00
Marek Roszko
51fcbe47a6
Remove colons from the import gfx dialog fields
2020-11-22 22:15:58 -05:00
Marek Roszko
90db12df2e
Rename the dxf units option to Default Units
...
The reality is the DXF file can still override the selected unit option which is totally fine.
In fact, per specification, there is a way to change units mid-file with block records :/
2020-11-22 22:15:58 -05:00
Marek Roszko
f5e9a2a6da
Use "microns" as the name to be consistent with DXF specification
2020-11-22 15:44:57 -05:00
Marek Roszko
88bee5e32f
Use the last used dxf units selection on dialog open
2020-11-22 15:44:36 -05:00
Marek Roszko
39fe89096e
Allow specifying the DXF file units on import
...
There is no guarantee DXF contains $INSUNIT to specify the units of the file as its optional.
This allows the user to specify the expected units via dropdown.
SolidWorks can definitely generate such unit lacking files as an example
2020-11-22 15:39:37 -05:00
Marek Roszko
f130970469
Handle lineweight in dxf import more properly
...
lineweights can be set to inherit from the layer or block.
2020-11-21 09:22:11 -05:00
Marek Roszko
d59053b775
Fix dxf import making all circles filled
...
Filled objects in dxf is actually not handled at all, they are implemented as "hatched" objects
2020-11-19 21:00:53 -05:00
Marek Roszko
d7e10c22c6
dxflib_qcad: match rename of DimAngularData to DimAngularData2L
...
upstream 1655be6c7d58609397e9f04cfaff08336d69b20e
2020-11-19 19:19:59 -05:00
Jeff Young
7933935b4a
Naming conventions.
2020-11-16 00:04:55 +00:00
Jeff Young
d094f86b1a
Finish module cleanup (except for xpms).
2020-11-14 22:00:12 +00:00
Jeff Young
ec020dd19f
First-class support for filled shapes.
2020-11-14 01:40:32 +00:00
Jeff Young
bdbb68f813
MODULE -> FOOTPRINT.
2020-11-13 16:04:03 +00:00
Jeff Young
2cc9dad4ff
More module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
84dd5108ba
Remove some "class_" prefixes from files.
2020-11-13 15:16:23 +00:00
Wayne Stambaugh
87da9271a4
Minor Pcbnew dialog layout fixes.
2020-11-11 11:08:54 -05:00
Jeff Young
4dc877d0e9
Module -> Footprint.
2020-11-08 21:43:19 +00:00
Ian McInerney
31e626f279
Cleanup creation of all our smart pointers
2020-10-26 23:52:44 +00:00
Marek Roszko
e49ac45b84
HTML_MESSAGE_BOX is a dialog
2020-10-25 20:01:12 -04:00
Marek Roszko
81a7afc76e
Use kicad_algo directly rather than common.h
2020-10-24 08:53:11 -04:00
Marek Roszko
1d559108c8
Move LOCALE_IO out of common.h
2020-10-23 21:49:42 -04:00
Marek Roszko
9656bd310b
Remove eda_item and gr_basic from eda_text.h
2020-10-13 22:46:39 -04:00
Jeff Young
37906511f5
Class renaming.
...
DRAWSEGMENT -> PCB_SHAPE
EDGE_MODULE -> FP_SHAPE
TEXTE_PCB -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Jeff Young
7a4900b8dc
PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
...
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
Jeff Young
f8875bc5a6
Move std::contains to alg::contains.
2020-09-26 14:42:40 +01:00
Jeff Young
d7e80f8008
Add std::contains() to simplify a lot of code.
2020-09-26 12:40:32 +01:00
Ian McInerney
3ddee6503a
Dialog changes forgotten in c479deaf
2020-08-20 01:43:52 +01:00
Ian McInerney
c479deaf02
Use groups when doing graphics import
...
ADDED: Allow DXF/SVG graphics to be imported as a group
Also, cleanup the placement routine to allow the edit tool's flip
and rotate routines to be used when placing the items.
2020-08-20 01:22:48 +01:00
Ian McInerney
68f1c678dd
Allow DXF/SVG import onto copper layers
...
ADDED: DXF/SVG import onto copper layers
Fixes https://gitlab.com/kicad/code/kicad/issues/2341
2020-08-20 01:20:53 +01:00
jean-pierre charras
07c4689fb4
Remove declaration "using std::unique_ptr" in a header.
...
Near useless, and it created swig warning
2020-05-09 08:10:44 +02:00
Jon Evans
51eac3e3e6
Split pcbnew and footprint editor settings getters for clarity
2020-05-05 21:46:00 -04:00
jean-pierre charras
d28fea5502
Dxf import: fix a bug that disable import of data inside blocks
...
Provide also a minimal debug info when enabled in code (and only in debug version)
2020-04-19 13:41:54 +02:00
Jeff Young
9c8941e040
Remove a bunch of globals.
2020-04-16 17:34:46 +01:00
Jeff Young
6e800bddae
Rationalize penWidth processing as first step in removing some globals.
2020-04-13 20:58:13 +01:00
Jon Evans
e59a3d981e
Implement a new settings framework across all of KiCad
...
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
jean-pierre charras
8f3e8cf893
Dxf importer: fix issue when importing some "degenerated" splines.
...
Sometimes a dxf curve is a "degenerated" bezier curve having only 3 points.
(a control point is at same location as a end point)
This commit fix incorrect import of these curves.
2020-02-03 10:39:29 +01:00
Mark Roszko
11ff16be4e
Switch to scoped enums
2019-12-20 14:11:39 +00:00
Ian McInerney
116ac9aa75
Move dxflib, tinyspline and nanosvg into a thirdparty library directory
...
Part of fixing https://gitlab.com/kicad/code/kicad/issues/3637
2019-12-19 17:41:02 +00:00
Seth Hillbrand
b5f021ff9f
Cleanup: Replace push_back with emplace_back
...
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Seth Hillbrand
4d2e953f42
Cleanup: Replace C-only deprecated headers
...
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00