Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c11b0bc8
Commit
c11b0bc8
authored
Mar 18, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Break points for zones are not added in the same place as existing points.
parent
e6a7ff3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
point_editor.cpp
pcbnew/tools/point_editor.cpp
+8
-2
No files found.
pcbnew/tools/point_editor.cpp
View file @
c11b0bc8
...
@@ -648,10 +648,16 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint )
...
@@ -648,10 +648,16 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint )
}
}
// Find the point on the closest segment
// Find the point on the closest segment
SEG
nearestSide
(
VECTOR2I
(
outline
->
GetPos
(
nearestIdx
)
),
VECTOR2I
sideOrigin
(
outline
->
GetPos
(
nearestIdx
)
);
VECTOR2I
(
outline
->
GetPos
(
nextNearestIdx
)
)
);
VECTOR2I
sideEnd
(
outline
->
GetPos
(
nextNearestIdx
)
);
SEG
nearestSide
(
sideOrigin
,
sideEnd
);
VECTOR2I
nearestPoint
=
nearestSide
.
NearestPoint
(
aBreakPoint
);
VECTOR2I
nearestPoint
=
nearestSide
.
NearestPoint
(
aBreakPoint
);
// Do not add points that have the same coordinates as ones that already belong to polygon
// instead, add a point in the middle of the side
if
(
nearestPoint
==
sideOrigin
||
nearestPoint
==
sideEnd
)
nearestPoint
=
(
sideOrigin
+
sideEnd
)
/
2
;
outline
->
InsertCorner
(
nearestIdx
,
nearestPoint
.
x
,
nearestPoint
.
y
);
outline
->
InsertCorner
(
nearestIdx
,
nearestPoint
.
x
,
nearestPoint
.
y
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment