Commit Graph

21 Commits

Author SHA1 Message Date
Jeff Young 007906cd16 Fix a degeneracy bug in arc collisions.
This also fixes a failure to use the correct effective width for
shapes (which might, for instance, inherit their widths from schematic
defaults, netclasses, etc.).

Fixes https://gitlab.com/kicad/code/kicad/issues/11358
2022-04-08 16:15:58 +01:00
Seth Hillbrand cd7141fd10 Cache read arc data for stability
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation.  Saving back to disk without
modifying the arc should not modify the calculated values.

This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.

Fixes https://gitlab.com/kicad/code/kicad/issues/10442
2022-03-04 15:20:31 -08:00
Jeff Young 6b806bbe9c Make sure Cleanup handles shapes other than segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/10955
2022-03-02 18:28:39 +00:00
Jeff Young 5cc3368b14 Fix bounding boxes and hittesting for arcs in eeschema. 2022-01-16 23:54:59 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Seth Hillbrand d5faac7614 Better fix for missing end segment
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed.  Closed will remove
the last segment if it lands on the first point.  We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)

Fixes https://gitlab.com/kicad/code/kicad/issues/10334

(cherry picked from commit 55020c2b89)
2022-01-10 13:39:39 -08:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Ian McInerney 1fccbdbd53 Give EDA_SHAPE a virtual destructor
EDA_SHAPE can be inherited from, so a virtual destructor is needed
to ensure the destructors are called in order.
2021-12-31 00:05:02 +00:00
Jeff Young 4b6f2f0658 Add mechanical copper clearance testing for shapes.
Also includes going from distance-based neighbor exclusion to angle-
based.  (Distance doesn't work when very short segments are followed
by very long ones.)

Fixes https://gitlab.com/kicad/code/kicad/issues/2512
2021-12-24 11:40:10 +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
Jeff Young 5f8e0ef1e0 Patch up arc hit-testing and printing for 6.0
This could use another look when we're not so near release.  We
really shouldn't need to special case eeWinding vs. not eeWinding.

Fixes https://gitlab.com/kicad/code/kicad/issues/9491
2021-10-30 15:10:07 +01:00
Seth Hillbrand 64bcaaefd1 Fix radiobox order for FILL_T
Fixes https://gitlab.com/kicad/code/kicad/issues/9412
2021-10-17 17:01:21 -07:00
Roberto Fernandez Bautista 99442350a4 CADSTAR PCB: Fix loading of arc tracks following recent PCB_ARC changes
We no longer have any knowledge of the original start/end of the arc,
since SetArcAngleAndEnd swaps the start and end to ensure the arc is
always clockwise at the end.

Adds a method EDA_SHAPE::EndsSwapped() to notify whether the start/end
point of the shape were swapped.
2021-10-17 17:57:51 +01:00
Jeff Young f9861b4a6c Finish arc rework and push out to file formats. 2021-10-15 12:45:43 +01:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Jeff Young 9b9e379aa0 Overhaul arc internal model to not over-specify information. 2021-10-15 12:45:43 +01:00
Jeff Young 8b08c9e53f Shorter names before things get out of hand.
Also, remove comments indicating CURVE is a Bezier.  Just call it a
BEZIER.
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