Alex
767ab72cdb
DXF import: INSERT angles are in degrees.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16656
2 years ago
Jeff Young
88e34fd482
Coding style.
2 years ago
Marek Roszko
11de95778b
Unwrap the FROM_UTF8 macro in favor of direct function
The extern just gets annoying to try to export the func later. We also yeet TO_UTF8 to string_utils.h for parity.
2 years ago
Jeff Young
a946f7ab1b
Handle non-cardinal major-axis arcs when importing DXF.
2 years ago
Jeff Young
75b160e83a
Handle DXF arcs with a flipped coord system.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14905
2 years ago
Alex Shvartzkop
5131dae568
Graphics import improvements/fixes:
- add support for color
- support non-uniform scale
- add GetImageBBox()
- fix SVG GetImageWidth/Height not being in mm
- fix import offset not being in mm
- add graphics importer for LIB_SYMBOL
2 years ago
Alex Shvartzkop
4e43d4e0db
Graphics import: support loading from memory buffer.
2 years ago
Alex Shvartzkop
26a52ecfe9
Move parts of import_gfx to common.
2 years ago
Marek Roszko
fa7205ebbc
Handle block insert scaling a little better but incompletely
https://gitlab.com/kicad/code/kicad/-/issues/11614
3 years ago
Marek Roszko
0e42cb19f2
Realize we can just describe the dxf arb axis with our MATRIX3x3 class
3 years ago
Jon Evans
b85fab9ab6
Support DXF ellipses and elliptical arcs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12563
3 years ago
Marek Roszko
aa537fe559
Change bezier curve iteration to be easier to read
Fix #https://gitlab.com/kicad/code/kicad/-/issues/11153 somewhat
3 years ago
Marek Roszko
24ca892afb
Update tinysplice to latest
A few years worth of bug fixes
3 years ago
Marek Roszko
a8613ee80f
Combine Iu2Millimeter & remove PcbMm2iu
3 years ago
Marek Roszko
b18e441a88
Free memory in dxf import sooner on bad_alloc
4 years ago
Marek Roszko
9f8c0a8185
Catch memory exhaustion trying to import large DXFs
See https://gitlab.com/kicad/code/kicad/-/issues/11308
4 years ago
Jeff Young
34a9a165c9
More wide-string declarations.
4 years ago
Jeff Young
c8a50d9b50
Remove unit-less angles from VECTOR2I/D APIs.
4 years ago
Jeff Young
86cb57f4a7
Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont
4 years ago
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
4 years ago
Tomasz Wlostowski
bba742b804
pcbnew: support vertex line start/end width to correctly import certain DXF files
4 years ago
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
4 years ago
Marek Roszko
daca9d21f2
Add dxf point import
Fix #9149
4 years ago
Marek Roszko
b924c85f80
Start recording the precision of dxf imports
5 years ago
luz paz
f968fc8719
Fix source comment / documentation typos
5 years ago
Marek Roszko
39a0bc6252
Remove erroneous block check in dxf import added during previous improvements
5 years ago
Marek Roszko
e409b04538
More gracefully handle tinyspline not liking a spline definition
Partial fix for #6634
5 years ago
Marek Roszko
8f21034254
Fix invalid windows macro
Missing one underscore at the end
5 years ago
Marek Roszko
828ecb76aa
Remove polyline 3d check added by previous fixes
Fix #7030
5 years ago
Marek Roszko
9322b3a4e1
Use the C++ isnan function
5 years ago
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....
5 years ago
Marek Roszko
cc7264c0b9
Subtract off the block's base point coordinate from the insert translation
5 years ago
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
5 years ago
Marek Roszko
5607420339
Fix polylines being skipped in DXF blocks
5 years ago
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.
5 years ago
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.
5 years ago
Marek Roszko
44f4d41bba
Fix member variable name
5 years ago
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.
5 years ago
Marek Roszko
bf59b422bc
Record blocks being received during the import
5 years ago
Marek Roszko
f5e9a2a6da
Use "microns" as the name to be consistent with DXF specification
5 years ago
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
5 years ago
Marek Roszko
f130970469
Handle lineweight in dxf import more properly
lineweights can be set to inherit from the layer or block.
5 years ago
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
5 years ago
Jeff Young
d094f86b1a
Finish module cleanup (except for xpms).
5 years ago
Jeff Young
84dd5108ba
Remove some "class_" prefixes from files.
5 years ago
Jeff Young
37906511f5
Class renaming.
DRAWSEGMENT -> PCB_SHAPE
EDGE_MODULE -> FP_SHAPE
TEXTE_PCB -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
5 years ago
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)
6 years ago
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.
6 years ago
Ian McInerney
116ac9aa75
Move dxflib, tinyspline and nanosvg into a thirdparty library directory
Part of fixing https://gitlab.com/kicad/code/kicad/issues/3637
6 years ago
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.
6 years ago