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
796eca5c
Commit
796eca5c
authored
Oct 21, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: added hotkeys in libedit. Update Boost::polygon
parent
dbd4fe12
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
230 additions
and
152 deletions
+230
-152
CHANGELOG.txt
CHANGELOG.txt
+16
-0
hotkeys.cpp
eeschema/hotkeys.cpp
+14
-4
libedit_onrightclick.cpp
eeschema/libedit_onrightclick.cpp
+7
-2
pinedit.cpp
eeschema/pinedit.cpp
+5
-6
boolean_op_45.hpp
include/boost/polygon/detail/boolean_op_45.hpp
+1
-1
max_cover.hpp
include/boost/polygon/detail/max_cover.hpp
+1
-1
polygon_45_formation.hpp
include/boost/polygon/detail/polygon_45_formation.hpp
+20
-20
polygon_45_set_view.hpp
include/boost/polygon/detail/polygon_45_set_view.hpp
+1
-1
polygon_45_touch.hpp
include/boost/polygon/detail/polygon_45_touch.hpp
+1
-1
polygon_90_set_view.hpp
include/boost/polygon/detail/polygon_90_set_view.hpp
+114
-68
polygon_arbitrary_formation.hpp
include/boost/polygon/detail/polygon_arbitrary_formation.hpp
+15
-15
property_merge.hpp
include/boost/polygon/detail/property_merge.hpp
+3
-3
property_merge_45.hpp
include/boost/polygon/detail/property_merge_45.hpp
+1
-1
scan_arbitrary.hpp
include/boost/polygon/detail/scan_arbitrary.hpp
+17
-16
interval_concept.hpp
include/boost/polygon/interval_concept.hpp
+1
-1
polygon.hpp
include/boost/polygon/polygon.hpp
+1
-0
polygon_45_set_data.hpp
include/boost/polygon/polygon_45_set_data.hpp
+7
-7
polygon_90_set_data.hpp
include/boost/polygon/polygon_90_set_data.hpp
+1
-1
polygon_set_data.hpp
include/boost/polygon/polygon_set_data.hpp
+4
-4
No files found.
CHANGELOG.txt
View file @
796eca5c
...
...
@@ -4,6 +4,22 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
email address.
2010-oct-20 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
Eeschema:
Major component library ojbect editing code refactor.
* All library component object editing is now performed with the ojbect
except LIB_PIN (coming soon).
* Added TRANFORM class to handle coordinate transforms.
* Remove old transform matrix functions.
* More file renaming to align them with the other component library
object file names.
* Fix hot key bugs in library editor to disable edit keys while an item
is being edited.
* Fixed bug when cancelling rotation of text and field objects while
being moved.
2010-Oct-20 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++richio:
...
...
eeschema/hotkeys.cpp
View file @
796eca5c
...
...
@@ -111,7 +111,7 @@ static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ),
HK_MIRROR_X_COMPONENT
,
'X'
);
static
Ki_HotkeyInfo
HkOrientNormalComponent
(
wxT
(
"Orient Normal Component"
),
HK_ORIENT_NORMAL_COMPONENT
,
'N'
);
static
Ki_HotkeyInfo
HkRotate
(
wxT
(
"Rotate
Schematic
Item"
),
static
Ki_HotkeyInfo
HkRotate
(
wxT
(
"Rotate Item"
),
HK_ROTATE
,
'R'
);
static
Ki_HotkeyInfo
HkEdit
(
wxT
(
"Edit Schematic Item"
),
HK_EDIT
,
'E'
);
...
...
@@ -120,7 +120,7 @@ static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ),
static
Ki_HotkeyInfo
HkEditComponentFootprint
(
wxT
(
"Edit Component Footprint"
),
HK_EDIT_COMPONENT_FOOTPRINT
,
'F'
);
static
Ki_HotkeyInfo
HkMove
(
wxT
(
"Move
Schematic
Item"
),
static
Ki_HotkeyInfo
HkMove
(
wxT
(
"Move Item"
),
HK_MOVE_COMPONENT_OR_ITEM
,
'M'
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
);
...
...
@@ -143,7 +143,7 @@ static Ki_HotkeyInfo HkFindNextDrcMarker( wxT( "Find next DRC marker" ), HK_FIND
// Special keys for library editor:
static
Ki_HotkeyInfo
HkCreatePin
(
wxT
(
"Create Pin"
),
HK_LIBEDIT_CREATE_PIN
,
'P'
);
static
Ki_HotkeyInfo
HkInsertPin
(
wxT
(
"Repeat Pin"
),
HK_REPEAT_LAST
,
WXK_INSERT
);
static
Ki_HotkeyInfo
HkMove
Pin
(
wxT
(
"Move Pin
"
),
HK_LIBEDIT_MOVE_GRAPHIC_ITEM
,
'M'
);
static
Ki_HotkeyInfo
HkMove
LibItem
(
wxT
(
"Move Lib Item
"
),
HK_LIBEDIT_MOVE_GRAPHIC_ITEM
,
'M'
);
// List of common hotkey descriptors
...
...
@@ -193,7 +193,7 @@ Ki_HotkeyInfo* s_LibEdit_Hotkey_List[] =
&
HkCreatePin
,
&
HkInsertPin
,
&
HkEdit
,
&
HkMove
Pin
,
&
HkMove
LibItem
,
&
HkDelete
,
&
HkRotate
,
&
HkDrag
,
...
...
@@ -816,6 +816,11 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawSt
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
case
COMPONENT_FIELD_DRAW_TYPE
:
cmd
.
SetId
(
ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
default
:
break
;
}
...
...
@@ -839,6 +844,11 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawSt
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
case
COMPONENT_FIELD_DRAW_TYPE
:
cmd
.
SetId
(
ID_POPUP_LIBEDIT_FIELD_ROTATE_ITEM
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
default
:
break
;
}
...
...
eeschema/libedit_onrightclick.cpp
View file @
796eca5c
...
...
@@ -248,10 +248,15 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST
,
msg
,
move_field_xpm
);
}
msg
=
AddHotkeyName
(
_
(
"Field Rotate"
),
s_Libedit_Hokeys_Descr
,
HK_ROTATE
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_LIBEDIT_FIELD_ROTATE_ITEM
,
_
(
"Field Rotate"
),
rotate_field_xpm
);
msg
,
rotate_field_xpm
);
msg
=
AddHotkeyName
(
_
(
"Field Edit"
),
s_Libedit_Hokeys_Descr
,
HK_EDIT
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM
,
_
(
"Field Edit"
)
,
edit_text_xpm
);
msg
,
edit_text_xpm
);
break
;
...
...
eeschema/pinedit.cpp
View file @
796eca5c
...
...
@@ -38,8 +38,8 @@ static bool LastPinCommonConvert = false;
static
bool
LastPinCommonUnit
=
false
;
static
bool
LastPinVisible
=
true
;
void
WinEDA_LibeditFrame
::
OnRotatePin
(
wxCommandEvent
&
event
)
{
void
WinEDA_LibeditFrame
::
OnRotatePin
(
wxCommandEvent
&
event
)
{
// Check, if the item is a pin, else return
if
(
m_drawItem
==
NULL
||
m_drawItem
->
Type
()
!=
COMPONENT_PIN_DRAW_TYPE
)
return
;
...
...
@@ -50,7 +50,7 @@ void WinEDA_LibeditFrame::OnRotatePin( wxCommandEvent& event ){
// Save old pin orientation
LastPinOrient
=
pin
->
m_Orient
;
SaveCopyInUndoList
(
pin
->
GetParent
()
);
SaveCopyInUndoList
(
pin
->
GetParent
()
);
// Get the actual pin orientation index
int
orientationIndex
=
pin
->
GetOrientationCodeIndex
(
pin
->
m_Orient
);
...
...
@@ -144,6 +144,8 @@ void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event )
LastPinCommonUnit
=
dlg
.
GetAddToAllParts
();
LastPinVisible
=
dlg
.
GetVisible
();
if
(
!
pin
->
IsNew
()
)
SaveCopyInUndoList
(
pin
->
GetParent
()
);
pin
->
EnableEditMode
(
true
,
g_EditPinByPinIsOn
);
pin
->
SetName
(
dlg
.
GetName
()
);
pin
->
SetNameTextSize
(
LastPinNameSize
);
...
...
@@ -159,9 +161,6 @@ void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event )
if
(
pin
->
IsModified
()
||
pin
->
IsNew
()
)
{
if
(
!
pin
->
IsNew
()
)
SaveCopyInUndoList
(
pin
->
GetParent
()
);
OnModify
(
);
pin
->
DisplayInfo
(
this
);
DrawPanel
->
Refresh
();
...
...
include/boost/polygon/detail/boolean_op_45.hpp
View file @
796eca5c
...
...
@@ -445,7 +445,7 @@ namespace boost { namespace polygon{
};
template
<
typename
S45V
>
static
inline
void
sortScan45Vector
(
S45V
&
vec
)
{
std
::
sort
(
vec
.
begin
(),
vec
.
end
(),
lessScan45Vertex
());
gtl
sort
(
vec
.
begin
(),
vec
.
end
(),
lessScan45Vertex
());
}
template
<
typename
CountType
,
typename
output_functor
>
...
...
include/boost/polygon/detail/max_cover.hpp
View file @
796eca5c
...
...
@@ -213,7 +213,7 @@ namespace boost { namespace polygon{
Interval
rectIvl
=
nodep
->
rect
.
get
(
orient
);
leadingEdges
.
push_back
(
EdgeAssociation
(
std
::
pair
<
Unit
,
Interval
>
(
leading
,
rectIvl
),
nodep
));
}
std
::
sort
(
leadingEdges
.
begin
(),
leadingEdges
.
end
(),
lessEdgeAssociation
());
gtl
sort
(
leadingEdges
.
begin
(),
leadingEdges
.
end
(),
lessEdgeAssociation
());
typename
std
::
vector
<
EdgeAssociation
>::
iterator
leadingBegin
=
leadingEdges
.
begin
();
iT
trailingBegin
=
beginNode
;
while
(
leadingBegin
!=
leadingEdges
.
end
())
{
...
...
include/boost/polygon/detail/polygon_45_formation.hpp
View file @
796eca5c
...
...
@@ -904,7 +904,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
0
),
2
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
2
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
0
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -928,7 +928,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
2
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
20
),
2
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
20
),
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -953,7 +953,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
0
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
10
),
1
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
10
),
0
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1018,7 +1018,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
12
,
8
),
1
,
-
1
));
// result == 12 8 -1 1
data
.
push_back
(
Vertex45
(
Point
(
12
,
8
),
-
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1051,7 +1051,7 @@ namespace boost { namespace polygon{
stdcout
<<
"scanning
\n
"
;
scan45
.
scan
(
result
,
vertices
.
begin
(),
vertices
.
end
());
std
::
sort
(
result
.
begin
(),
result
.
end
());
gtl
sort
(
result
.
begin
(),
result
.
end
());
pf
.
scan
(
polys
,
result
.
begin
(),
result
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1123,7 +1123,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
8
,
6
),
-
1
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
8
,
6
),
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1195,7 +1195,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
8
),
-
1
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
8
),
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1239,7 +1239,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
22
),
2
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
22
),
0
,
-
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1668,7 +1668,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
0
),
2
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
2
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
0
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1692,7 +1692,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
2
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
20
),
2
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
20
),
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1716,7 +1716,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
0
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
10
),
1
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
10
),
0
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1742,7 +1742,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
10
),
0
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
20
),
1
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
20
),
2
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1768,7 +1768,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
20
,
10
),
0
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
-
10
),
-
1
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
20
,
-
10
),
2
,
-
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1801,7 +1801,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
2
,
2
),
0
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
3
,
2
),
1
,
1
));
data
.
push_back
(
Vertex45
(
Point
(
3
,
2
),
0
,
-
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1835,7 +1835,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
2
,
2
),
2
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
2
,
2
),
0
,
-
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1899,7 +1899,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
12
,
8
),
1
,
-
1
));
// result == 12 8 -1 1
data
.
push_back
(
Vertex45
(
Point
(
12
,
8
),
-
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1933,7 +1933,7 @@ namespace boost { namespace polygon{
stdcout
<<
"scanning
\n
"
;
scan45
.
scan
(
result
,
vertices
.
begin
(),
vertices
.
end
());
std
::
sort
(
result
.
begin
(),
result
.
end
());
gtl
sort
(
result
.
begin
(),
result
.
end
());
pf
.
scan
(
polys
,
result
.
begin
(),
result
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2005,7 +2005,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
8
,
6
),
-
1
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
8
,
6
),
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2077,7 +2077,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
8
),
-
1
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
8
),
1
,
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2121,7 +2121,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
Vertex45
(
Point
(
10
,
22
),
2
,
-
1
));
data
.
push_back
(
Vertex45
(
Point
(
10
,
22
),
0
,
-
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
include/boost/polygon/detail/polygon_45_set_view.hpp
View file @
796eca5c
...
...
@@ -119,7 +119,7 @@ namespace boost { namespace polygon{
// orient_ = orient;
// output_.clear();
// output_.insert(output_.end(), input_begin, input_end);
//
std::
sort(output_.begin(), output_.end());
//
gtl
sort(output_.begin(), output_.end());
// }
};
...
...
include/boost/polygon/detail/polygon_45_touch.hpp
View file @
796eca5c
...
...
@@ -186,7 +186,7 @@ namespace boost { namespace polygon{
template
<
typename
graph_type
>
static
void
performTouch
(
graph_type
&
graph
,
TouchSetData
&
tsd
)
{
std
::
sort
(
tsd
.
begin
(),
tsd
.
end
(),
lessVertex45Compact
());
gtl
sort
(
tsd
.
begin
(),
tsd
.
end
(),
lessVertex45Compact
());
typedef
std
::
vector
<
std
::
pair
<
Point
,
typename
boolean_op_45
<
Unit
>::
template
Scan45CountT
<
CountTouch
>
>
>
TSD
;
TSD
tsd_
;
tsd_
.
reserve
(
tsd
.
size
());
...
...
include/boost/polygon/detail/polygon_90_set_view.hpp
View file @
796eca5c
This diff is collapsed.
Click to expand it.
include/boost/polygon/detail/polygon_arbitrary_formation.hpp
View file @
796eca5c
...
...
@@ -1203,7 +1203,7 @@ namespace boost { namespace polygon{
static
inline
void
sort_vertex_arbitrary_count
(
vertex_arbitrary_count
&
count
,
const
Point
&
pt
)
{
less_half_edge_count
lfec
(
pt
);
std
::
sort
(
count
.
begin
(),
count
.
end
(),
lfec
);
gtl
sort
(
count
.
begin
(),
count
.
end
(),
lfec
);
}
typedef
std
::
vector
<
std
::
pair
<
std
::
pair
<
std
::
pair
<
Point
,
Point
>
,
int
>
,
active_tail_arbitrary
*>
>
incoming_count
;
...
...
@@ -1227,7 +1227,7 @@ namespace boost { namespace polygon{
static
inline
void
sort_incoming_count
(
incoming_count
&
count
,
const
Point
&
pt
)
{
less_incoming_count
lfec
(
pt
);
std
::
sort
(
count
.
begin
(),
count
.
end
(),
lfec
);
gtl
sort
(
count
.
begin
(),
count
.
end
(),
lfec
);
}
static
inline
void
compact_vertex_arbitrary_count
(
const
Point
&
pt
,
vertex_arbitrary_count
&
count
)
{
...
...
@@ -1798,7 +1798,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
0
),
Point
(
10
,
10
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
10
),
Point
(
10
,
0
),
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
10
),
Point
(
0
,
10
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1822,7 +1822,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
10
),
Point
(
10
,
20
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
20
),
Point
(
10
,
10
),
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
20
),
Point
(
0
,
10
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1846,7 +1846,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
2
,
-
4
),
Point
(
2
,
4
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
2
,
4
),
Point
(
-
2
,
2
),
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
2
,
4
),
Point
(
2
,
-
4
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1892,7 +1892,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
22
),
Point
(
10
,
12
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
22
),
Point
(
2
,
22
),
-
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1939,7 +1939,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
5
,
5
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
5
,
2
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -1979,7 +1979,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
5
,
5
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
4
,
1
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2019,7 +2019,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
5
,
5
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
4
,
1
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2047,7 +2047,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
-
1
,
4
),
Point
(
0
,
2
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
0
,
2
),
Point
(
-
1
,
4
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2753,7 +2753,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
0
),
Point
(
10
,
10
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
10
),
Point
(
10
,
0
),
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
10
),
Point
(
0
,
10
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2776,7 +2776,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
10
),
Point
(
10
,
20
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
20
),
Point
(
10
,
10
),
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
20
),
Point
(
0
,
10
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2799,7 +2799,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
2
,
-
4
),
Point
(
2
,
4
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
2
,
4
),
Point
(
-
2
,
2
),
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
2
,
4
),
Point
(
2
,
-
4
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2844,7 +2844,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
22
),
Point
(
10
,
12
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
10
,
22
),
Point
(
2
,
22
),
-
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
@@ -2891,7 +2891,7 @@ namespace boost { namespace polygon{
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
5
,
5
),
-
1
));
data
.
push_back
(
vertex_half_edge
(
Point
(
7
,
2
),
Point
(
5
,
2
),
1
));
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
polys
,
data
.
begin
(),
data
.
end
());
stdcout
<<
"result size: "
<<
polys
.
size
()
<<
std
::
endl
;
for
(
std
::
size_t
i
=
0
;
i
<
polys
.
size
();
++
i
)
{
...
...
include/boost/polygon/detail/property_merge.hpp
View file @
796eca5c
...
...
@@ -112,7 +112,7 @@ public:
inline
void
perform_merge
(
result_type
&
result
,
property_merge_data
&
data
)
{
if
(
data
.
empty
())
return
;
//sort
std
::
sort
(
data
.
begin
(),
data
.
end
(),
less_vertex_data
<
vertex_property
>
());
gtl
sort
(
data
.
begin
(),
data
.
end
(),
less_vertex_data
<
vertex_property
>
());
//scanline
bool
firstIteration
=
true
;
scanlinePosition
=
scanline
.
end
();
...
...
@@ -156,7 +156,7 @@ private:
class
less_vertex_data
{
public
:
less_vertex_data
()
{}
bool
operator
()(
const
T
&
lvalue
,
const
T
&
rvalue
)
{
bool
operator
()(
const
T
&
lvalue
,
const
T
&
rvalue
)
const
{
if
(
lvalue
.
first
.
x
()
<
rvalue
.
first
.
x
())
return
true
;
if
(
lvalue
.
first
.
x
()
>
rvalue
.
first
.
x
())
return
false
;
if
(
lvalue
.
first
.
y
()
<
rvalue
.
first
.
y
())
return
true
;
...
...
@@ -442,7 +442,7 @@ private:
inline
void
performExtract
(
T
&
result
,
property_merge_data
&
data
)
{
if
(
data
.
empty
())
return
;
//sort
std
::
sort
(
data
.
begin
(),
data
.
end
(),
less_vertex_data
<
vertex_property
>
());
gtl
sort
(
data
.
begin
(),
data
.
end
(),
less_vertex_data
<
vertex_property
>
());
//scanline
bool
firstIteration
=
true
;
...
...
include/boost/polygon/detail/property_merge_45.hpp
View file @
796eca5c
...
...
@@ -111,7 +111,7 @@ namespace boost { namespace polygon{
template
<
typename
output_type
>
static
void
performMerge
(
output_type
&
result
,
MergeSetData
&
tsd
)
{
std
::
sort
(
tsd
.
begin
(),
tsd
.
end
(),
lessVertex45Compact
());
gtl
sort
(
tsd
.
begin
(),
tsd
.
end
(),
lessVertex45Compact
());
typedef
std
::
vector
<
std
::
pair
<
Point
,
typename
boolean_op_45
<
Unit
>::
template
Scan45CountT
<
CountMerge
>
>
>
TSD
;
TSD
tsd_
;
tsd_
.
reserve
(
tsd
.
size
());
...
...
include/boost/polygon/detail/scan_arbitrary.hpp
View file @
796eca5c
...
...
@@ -10,6 +10,7 @@
#ifdef BOOST_POLYGON_DEBUG_FILE
#include <fstream>
#endif
#include "polygon_sort_adaptor.hpp"
namespace
boost
{
namespace
polygon
{
template
<
typename
Unit
>
...
...
@@ -75,7 +76,7 @@ namespace boost { namespace polygon{
ends
.
push_back
(
std
::
make_pair
((
*
itr
).
first
.
first
.
y
(),
count
));
ends
.
push_back
(
std
::
make_pair
((
*
itr
).
first
.
second
.
y
(),
-
count
));
}
std
::
sort
(
ends
.
begin
(),
ends
.
end
());
gtl
sort
(
ends
.
begin
(),
ends
.
end
());
histogram
.
reserve
(
ends
.
size
());
histogram
.
push_back
(
std
::
make_pair
(
ends
.
front
().
first
,
std
::
make_pair
(
0
,
0
)));
for
(
typename
std
::
vector
<
std
::
pair
<
Unit
,
int
>
>::
iterator
itr
=
ends
.
begin
();
itr
!=
ends
.
end
();
++
itr
)
{
...
...
@@ -160,7 +161,7 @@ namespace boost { namespace polygon{
}
}
typename
scanline_base
<
Unit
>::
compute_intersection_pack
pack_
;
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
//find all intersection points
for
(
typename
std
::
vector
<
std
::
pair
<
half_edge
,
segment_id
>
>::
iterator
outer
=
data
.
begin
();
outer
!=
data
.
end
();
++
outer
)
{
...
...
@@ -195,7 +196,7 @@ namespace boost { namespace polygon{
}
}
}
std
::
sort
(
pts
.
begin
(),
pts
.
end
());
gtl
sort
(
pts
.
begin
(),
pts
.
end
());
typename
std
::
vector
<
Point
>::
iterator
newend
=
std
::
unique
(
pts
.
begin
(),
pts
.
end
());
typename
std
::
vector
<
Point
>::
iterator
lfinger
=
pts
.
begin
();
//find all segments that interact with intersection points
...
...
@@ -286,7 +287,7 @@ namespace boost { namespace polygon{
std
::
swap
(
data
[
i
].
first
.
first
,
data
[
i
].
first
.
second
);
}
}
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
for
(
typename
std
::
vector
<
std
::
pair
<
half_edge
,
segment_id
>
>::
iterator
outer
=
data
.
begin
();
outer
!=
data
.
end
();
++
outer
)
{
const
half_edge
&
he1
=
(
*
outer
).
first
;
...
...
@@ -356,7 +357,7 @@ namespace boost { namespace polygon{
tmpPts
.
reserve
(
pts
.
size
());
tmpPts
.
insert
(
tmpPts
.
end
(),
pts
.
begin
(),
pts
.
end
());
less_point_down_slope
lpds
;
std
::
sort
(
tmpPts
.
begin
(),
tmpPts
.
end
(),
lpds
);
gtl
sort
(
tmpPts
.
begin
(),
tmpPts
.
end
(),
lpds
);
segment_edge
(
output_segments
,
he
,
id
,
tmpPts
.
begin
(),
tmpPts
.
end
());
}
else
{
segment_edge
(
output_segments
,
he
,
id
,
pts
.
begin
(),
pts
.
end
());
...
...
@@ -498,7 +499,7 @@ namespace boost { namespace polygon{
// }
// //merge sloping element data
//
std::
sort(sloping_ends.begin(), sloping_ends.end());
//
gtl
sort(sloping_ends.begin(), sloping_ends.end());
// std::map<Unit, std::set<iterator> > sloping_elements;
// std::set<iterator> merge_elements;
// for(typename std::vector<std::pair<Unit, iterator> >::iterator slop_iter = sloping_ends.begin();
...
...
@@ -1310,7 +1311,7 @@ namespace boost { namespace polygon{
output
.
push_back
(
vertex_half_edge
(
he
.
first
,
he
.
second
,
count
));
output
.
push_back
(
vertex_half_edge
(
he
.
second
,
he
.
first
,
-
count
));
}
std
::
sort
(
output
.
begin
(),
output
.
end
());
gtl
sort
(
output
.
begin
(),
output
.
end
());
}
class
test_functor
{
...
...
@@ -1514,7 +1515,7 @@ namespace boost { namespace polygon{
public
:
less_vertex_data
()
:
pack_
()
{}
less_vertex_data
(
typename
scanline_base
<
Unit
>::
evalAtXforYPack
*
pack
)
:
pack_
(
pack
)
{}
bool
operator
()
(
const
vertex_data_type
&
lvalue
,
const
vertex_data_type
&
rvalue
)
{
bool
operator
()
(
const
vertex_data_type
&
lvalue
,
const
vertex_data_type
&
rvalue
)
const
{
less_point
lp
;
if
(
lp
(
lvalue
.
first
.
first
,
rvalue
.
first
.
first
))
return
true
;
if
(
lp
(
rvalue
.
first
.
first
,
lvalue
.
first
.
first
))
return
false
;
...
...
@@ -1528,7 +1529,7 @@ namespace boost { namespace polygon{
inline
void
sort_property_merge_data
()
{
less_vertex_data
<
vertex_property
>
lvd
(
&
evalAtXforYPack_
);
std
::
sort
(
pmd
.
begin
(),
pmd
.
end
(),
lvd
);
gtl
sort
(
pmd
.
begin
(),
pmd
.
end
(),
lvd
);
}
public
:
inline
property_merge_data
&
get_property_merge_data
()
{
return
pmd
;
}
...
...
@@ -1573,7 +1574,7 @@ namespace boost { namespace polygon{
pts
.
push_back
(
lines
[
i
].
first
.
first
);
pts
.
push_back
(
lines
[
i
].
first
.
second
);
}
std
::
sort
(
pts
.
begin
(),
pts
.
end
());
gtl
sort
(
pts
.
begin
(),
pts
.
end
());
for
(
std
::
size_t
i
=
0
;
i
<
pts
.
size
();
i
+=
2
)
{
if
(
pts
[
i
]
!=
pts
[
i
+
1
])
{
//stdcout << "Non-closed figures after line intersection!\n";
...
...
@@ -1683,7 +1684,7 @@ namespace boost { namespace polygon{
static
inline
void
sort_vertex_half_edges
(
vertex_data
&
vertex
)
{
less_half_edge_pair
lessF
(
vertex
.
first
);
std
::
sort
(
vertex
.
second
.
begin
(),
vertex
.
second
.
end
(),
lessF
);
gtl
sort
(
vertex
.
second
.
begin
(),
vertex
.
second
.
end
(),
lessF
);
}
class
less_half_edge_pair
{
...
...
@@ -2165,7 +2166,7 @@ pts.push_back(Point(12344171, 6695983 )); pts.push_back(Point(12287208, 6672388
outpts
.
push_back
((
*
itr
).
first
.
first
);
outpts
.
push_back
((
*
itr
).
first
.
second
);
}
std
::
sort
(
outpts
.
begin
(),
outpts
.
end
());
gtl
sort
(
outpts
.
begin
(),
outpts
.
end
());
for
(
std
::
size_t
i
=
0
;
i
<
outpts
.
size
();
i
+=
2
)
{
if
(
outpts
[
i
]
!=
outpts
[
i
+
1
])
{
stdcout
<<
"Polygon set not a closed figure
\n
"
;
...
...
@@ -2514,7 +2515,7 @@ pts.push_back(Point(12344171, 6695983 )); pts.push_back(Point(12287208, 6672388
public
:
less_vertex_data
()
:
pack_
()
{}
less_vertex_data
(
typename
scanline_base
<
Unit
>::
evalAtXforYPack
*
pack
)
:
pack_
(
pack
)
{}
bool
operator
()(
const
vertex_data_type
&
lvalue
,
const
vertex_data_type
&
rvalue
)
{
bool
operator
()(
const
vertex_data_type
&
lvalue
,
const
vertex_data_type
&
rvalue
)
const
{
less_point
lp
;
if
(
lp
(
lvalue
.
first
.
first
,
rvalue
.
first
.
first
))
return
true
;
if
(
lp
(
rvalue
.
first
.
first
,
lvalue
.
first
.
first
))
return
false
;
...
...
@@ -2580,7 +2581,7 @@ pts.push_back(Point(12344171, 6695983 )); pts.push_back(Point(12287208, 6672388
inline
void
sort_property_merge_data
()
{
less_vertex_data
<
vertex_property
>
lvd
(
&
evalAtXforYPack_
);
std
::
sort
(
pmd
.
begin
(),
pmd
.
end
(),
lvd
);
gtl
sort
(
pmd
.
begin
(),
pmd
.
end
(),
lvd
);
}
public
:
inline
arbitrary_boolean_op
()
:
pmd
(),
evalAtXforYPack_
()
{}
...
...
@@ -2732,7 +2733,7 @@ pts.push_back(Point(12344171, 6695983 )); pts.push_back(Point(12287208, 6672388
public
:
less_vertex_data
()
:
pack_
()
{}
less_vertex_data
(
typename
scanline_base
<
Unit
>::
evalAtXforYPack
*
pack
)
:
pack_
(
pack
)
{}
bool
operator
()(
const
vertex_data_type
&
lvalue
,
const
vertex_data_type
&
rvalue
)
{
bool
operator
()(
const
vertex_data_type
&
lvalue
,
const
vertex_data_type
&
rvalue
)
const
{
less_point
lp
;
if
(
lp
(
lvalue
.
first
.
first
,
rvalue
.
first
.
first
))
return
true
;
if
(
lp
(
rvalue
.
first
.
first
,
lvalue
.
first
.
first
))
return
false
;
...
...
@@ -2804,7 +2805,7 @@ pts.push_back(Point(12344171, 6695983 )); pts.push_back(Point(12287208, 6672388
inline
void
sort_property_merge_data
()
{
less_vertex_data
<
vertex_property
>
lvd
(
&
evalAtXforYPack_
);
std
::
sort
(
pmd
.
begin
(),
pmd
.
end
(),
lvd
);
gtl
sort
(
pmd
.
begin
(),
pmd
.
end
(),
lvd
);
}
public
:
inline
arbitrary_connectivity_extraction
()
:
pmd
(),
evalAtXforYPack_
()
{}
...
...
include/boost/polygon/interval_concept.hpp
View file @
796eca5c
...
...
@@ -471,7 +471,7 @@ namespace boost { namespace polygon{
typedef
typename
interval_traits
<
interval_type
>::
coordinate_type
Unit
;
Unit
coords
[
4
]
=
{
low
(
interval
),
high
(
interval
),
low
(
b
),
high
(
b
)};
//consider implementing faster sorting of small fixed length range
std
::
sort
(
coords
,
coords
+
4
);
gtl
sort
(
coords
,
coords
+
4
);
low
(
interval
,
coords
[
1
]);
high
(
interval
,
coords
[
2
]);
return
interval
;
...
...
include/boost/polygon/polygon.hpp
View file @
796eca5c
...
...
@@ -7,6 +7,7 @@
*/
#ifndef BOOST_POLYGON_POLYGON_HPP
#define BOOST_POLYGON_POLYGON_HPP
#define BOOST_POLYGON_VERSION 014401
#include "isotropy.hpp"
...
...
include/boost/polygon/polygon_45_set_data.hpp
View file @
796eca5c
...
...
@@ -212,7 +212,7 @@ namespace boost { namespace polygon{
void
sort
()
const
{
if
(
unsorted_
)
{
std
::
sort
(
data_
.
begin
(),
data_
.
end
());
gtl
sort
(
data_
.
begin
(),
data_
.
end
());
unsorted_
=
false
;
}
}
...
...
@@ -1262,7 +1262,7 @@ namespace boost { namespace polygon{
//std::cout << "SCAN " << currentX << "\n";
//scan event
scan45
.
scan
(
eventOut
,
eventIn
.
begin
(),
eventIn
.
end
());
std
::
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
gtl
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
std
::
size_t
ptCount
=
0
;
for
(
std
::
size_t
i
=
0
;
i
<
eventOut
.
size
();
++
i
)
{
if
(
!
result_data
.
empty
()
&&
...
...
@@ -1333,7 +1333,7 @@ namespace boost { namespace polygon{
}
}
scan45
.
scan
(
eventOut
,
eventIn
.
begin
(),
eventIn
.
end
());
std
::
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
gtl
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
std
::
size_t
ptCount
=
0
;
for
(
std
::
size_t
i
=
0
;
i
<
eventOut
.
size
();
++
i
)
{
...
...
@@ -1385,7 +1385,7 @@ namespace boost { namespace polygon{
//std::cout << "SCAN " << currentX << "\n";
//scan event
scan45
.
scan
(
eventOut
,
eventIn
.
begin
(),
eventIn
.
end
());
std
::
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
gtl
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
std
::
size_t
ptCount
=
0
;
for
(
std
::
size_t
i
=
0
;
i
<
eventOut
.
size
();
++
i
)
{
if
(
!
result_data
.
empty
()
&&
...
...
@@ -1422,7 +1422,7 @@ namespace boost { namespace polygon{
++
iter1
;
}
scan45
.
scan
(
eventOut
,
eventIn
.
begin
(),
eventIn
.
end
());
std
::
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
gtl
sort
(
eventOut
.
begin
(),
eventOut
.
end
());
std
::
size_t
ptCount
=
0
;
for
(
std
::
size_t
i
=
0
;
i
<
eventOut
.
size
();
++
i
)
{
...
...
@@ -1639,7 +1639,7 @@ namespace boost { namespace polygon{
result
.
error_data_
.
push_back
(
ci
);
}
Data2
new_result_data
;
std
::
sort
(
result_data
.
begin
(),
result_data
.
end
());
gtl
sort
(
result_data
.
begin
(),
result_data
.
end
());
applyUnary45OpOnVectors
<
Unit2
,
0
>
(
new_result_data
,
result_data
);
//OR operation
result_data
.
swap
(
new_result_data
);
}
...
...
@@ -1749,7 +1749,7 @@ namespace boost { namespace polygon{
result
.
error_data_
.
push_back
(
ci
);
}
Data2
new_result_data
;
std
::
sort
(
result_data
.
begin
(),
result_data
.
end
());
gtl
sort
(
result_data
.
begin
(),
result_data
.
end
());
applyUnary45OpOnVectors
<
Unit2
,
0
>
(
new_result_data
,
result_data
);
//OR operation
result_data
.
swap
(
new_result_data
);
}
...
...
include/boost/polygon/polygon_90_set_data.hpp
View file @
796eca5c
...
...
@@ -286,7 +286,7 @@ namespace boost { namespace polygon{
void
sort
()
const
{
if
(
unsorted_
)
{
std
::
sort
(
data_
.
begin
(),
data_
.
end
());
gtl
sort
(
data_
.
begin
(),
data_
.
end
());
unsorted_
=
false
;
}
}
...
...
include/boost/polygon/polygon_set_data.hpp
View file @
796eca5c
...
...
@@ -248,7 +248,7 @@ namespace boost { namespace polygon {
data
.
push_back
(
vertex_half_edge
((
*
itr
).
first
.
first
,
(
*
itr
).
first
.
second
,
(
*
itr
).
second
));
data
.
push_back
(
vertex_half_edge
((
*
itr
).
first
.
second
,
(
*
itr
).
first
.
first
,
-
1
*
(
*
itr
).
second
));
}
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
container
,
data
.
begin
(),
data
.
end
());
//std::cout << "DONE FORMING POLYGONS\n";
}
...
...
@@ -321,7 +321,7 @@ namespace boost { namespace polygon {
void
sort
()
const
{
if
(
unsorted_
)
{
std
::
sort
(
data_
.
begin
(),
data_
.
end
());
gtl
sort
(
data_
.
begin
(),
data_
.
end
());
unsorted_
=
false
;
}
}
...
...
@@ -364,7 +364,7 @@ namespace boost { namespace polygon {
if
(
resizing
<
0
)
return
shrink
(
-
resizing
);
if
(
resizing
>
0
)
return
bloat
(
-
resizing
);
return
bloat
(
resizing
);
return
*
this
;
}
if
(
resizing
==
0
)
return
*
this
;
...
...
@@ -791,7 +791,7 @@ namespace boost { namespace polygon {
data
.
push_back
(
vertex_half_edge
((
*
itr
).
first
.
first
,
(
*
itr
).
first
.
second
,
(
*
itr
).
second
));
data
.
push_back
(
vertex_half_edge
((
*
itr
).
first
.
second
,
(
*
itr
).
first
.
first
,
-
1
*
(
*
itr
).
second
));
}
std
::
sort
(
data
.
begin
(),
data
.
end
());
gtl
sort
(
data
.
begin
(),
data
.
end
());
pf
.
scan
(
container
,
data
.
begin
(),
data
.
end
());
}
};
...
...
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