Макросы для СС2
Название | Навигационная граница карты (ручная) |
Автор | Morgan Olden |
Команда | nauticalborderM |
Описание | Создает границы карты с "навигационными шкалами". Позволяет задавать свои параметры.
|
Инструкции | Настроек гораздо больше чем в автоматической версии. Вам может понадобиться несколько экспериментов перед рисованием - используйте временный слой, чтобы легче было удалять.
В макрос включен файл скрипта с кодом. Для работы скрипта просто запустите его из СС2.
|
Код
macro nauticalchartM
ecoff
gv mcoT 10
gv mcoT ^DFrame thickness
(10):
gv mcoCOLOR 0
gv mcoCOLOR ^DColor (0):
gv mcoST 10
gv mcoST
^DSmall tick spacing (10):
gv mcoLT 50
gv mcoLT ^DLarge tick spacing
(50):
gv mcoGRID 500
gv mcoGRID ^DGrid line spacing (default=500,
none=0)
ifz mcoGRID mcoCONTROL1
gv mcoGRIDC 0
gv mcoGRIDC ^DGrid line
color (0):
:mcoCONTROL1
gp mcoP1 ^DTop left point of frame:
lwidth
0;fstyle hollow;lstyle solid
box mcoP1 ^DBottom right point of
frame:
selbyp
erase
gp mcoP4 @0,0
GETX mcoX1 mcoP1
GETX mcoX2
mcoP4
GETY mcoY1 mcoP1
GETY mcoY2 mcoP4
gp mcoP2 mcoX2,mcoY1
gp
mcoP3 mcoX1,mcoY2
gp mcoP5 (mcoX1-(mcoT/2)),(mcoY1+(mcoT/2))
gp mcoP6
(mcoX2+(mcoT/2)),(mcoY1+(mcoT/2))
gp mcoP7
(mcoX1-(mcoT/2)),(mcoY2-(mcoT/2))
gp mcoP8
(mcoX2+(mcoT/2)),(mcoY2-(mcoT/2))
gp mcoP9
(mcoX1+(mcoT/2)),(mcoY1-(mcoT/2))
gp mcoP10
(mcoX2-(mcoT/2)),(mcoY1-(mcoT/2))
gp mcoP11
(mcoX1+(mcoT/2)),(mcoY2+(mcoT/2))
gp mcoP12
(mcoX2-(mcoT/2)),(mcoY2+(mcoT/2))
gp mcoP13
(mcoX1-(mcoT/4)),(mcoY1+(mcoT/4))
gp mcoP14
(mcoX2+(mcoT/4)),(mcoY1+(mcoT/4))
gp mcoP15
(mcoX1-(mcoT/4)),(mcoY2-(mcoT/4))
gp mcoP16
(mcoX2+(mcoT/4)),(mcoY2-(mcoT/4))
lwidth 0;lstyle solid
fstyle
hollow;color 0
box mcoP5 mcoP8
box mcoP9 mcoP12
box mcoP1
mcoP4
gdist mcoTD1 mcoP9 mcoP10
gdist mcoTD2 mcoP9 mcoP11
gp mcoVARP1
ref mcoP9 <0,mcoST
:mcoloop1
line mcoVARP1 ref mcoVARP1
<90,mcoT/2;
line ref mcoVARP1 <-90,mcoTD2 ref mcoVARP1
<-90,mcoTD2+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <0,mcoST
gdist mcoTD3
mcoP9 mcoVARP1
ifn mcoTD1-mcoTD3 mcoloop1done
ifz mcoTD1-mcoTD3
mcoloop1done
go mcoloop1
:mcoloop1done
gdist mcoTD1 mcoP9
mcoP10
gdist mcoTD2 mcoP9 mcoP11
gp mcoVARP1 ref mcoP9
<90,mcoT/2
:mcoloop1a
line mcoVARP1 ref mcoVARP1 <90,mcoT/2;
line
ref mcoVARP1 <-90,mcoTD2+mcoT ref mcoVARP1
<-90,mcoTD2+mcoT+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <0,mcoLT
gdist
mcoTD3 ref mcoP9 <90,mcoT/2 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop1adone
ifz mcoTD1-mcoTD3 mcoloop1adone
go
mcoloop1a
:mcoloop1adone
gdist mcoTD1 mcoP10 mcoP12
gdist mcoTD2 mcoP10
mcoP9
gp mcoVARP1 ref mcoP10 <270,mcoST
:mcoloop2
line mcoVARP1 ref
mcoVARP1 <0,mcoT/2;
line ref mcoVARP1 <180,mcoTD2 ref mcoVARP1
<180,mcoTD2+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <270,mcoST
gdist
mcoTD3 mcoP10 mcoVARP1
ifn mcoTD1-mcoTD3 mcoloop2done
ifz mcoTD1-mcoTD3
mcoloop2done
go mcoloop2
:mcoloop2done
gdist mcoTD1 mcoP10
mcoP12
gdist mcoTD2 mcoP10 mcoP9
gp mcoVARP1 ref mcoP10
<0,mcoT/2
:mcoloop2a
line mcoVARP1 ref mcoVARP1 <0,mcoT/2;
line
ref mcoVARP1 <180,mcoTD2+mcoT ref mcoVARP1
<180,mcoTD2+mcoT+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <270,mcoLT
gdist
mcoTD3 ref mcoP10 <270,mcoT/2 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop2adone
ifz mcoTD1-mcoTD3 mcoloop2adone
go
mcoloop2a
:mcoloop2adone
lwidth mcoT/10;fstyle solid;color
mcoCOLOR
gdist mcoTD1 mcoP9 mcoP10
gdist mcoTD2 mcoP9 mcoP11
gp
mcoVARP1 ref mcoP9 <90,mcoT*.75
:mcoloop3
gp mcoVARP1 ref mcoVARP1
<0,mcoLT
gdist mcoTD3 ref mcoP9 <90,mcoT*.75 mcoVARP1
ifn
mcoTD1-mcoTD3 mcoloop3end
ifz mcoTD1-mcoTD3 mcoloop3end
gp mcoVARP2 ref
mcoVARP1 <180,mcoLT
line mcoVARP1 mcoVARP2;
line ref mcoVARP1
<270,mcoTD2+(mcoT*1.5) ref mcoVARP2 <270,mcoTD2+(mcoT*1.5);
gp mcoVARP1
ref mcoVARP1 <0,mcoLT
gdist mcoTD3 ref mcoP9 <90,mcoT*.75
mcoVARP1
ifn mcoTD1-mcoTD3 mcoloop3done
ifz mcoTD1-mcoTD3
mcoloop3done
go mcoloop3
:mcoloop3end
gp mcoVARP2 ref mcoVARP1
<180,mcoLT
line ref mcoP10 <90,mcoT*.75 mcoVARP2;
line ref mcoP12
<270,mcoT*.75 ref mcoVARP2
<270,mcoTD2+(mcoT*1.5);
:mcoloop3done
gdist mcoTD1 mcoP10
mcoP12
gdist mcoTD2 mcoP10 mcoP9
gp mcoVARP1 ref mcoP10
<0,mcoT*.75
:mcoloop3a
gp mcoVARP1 ref mcoVARP1 <270,mcoLT
gdist
mcoTD3 ref mcoP10 <0,mcoT*.75 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop3adone
ifz mcoTD1-mcoTD3 mcoloop3adone
gp mcoVARP1 ref mcoVARP1
<270,mcoLT
gdist mcoTD3 ref mcoP10 <0,mcoT*.75 mcoVARP1
ifn
mcoTD1-mcoTD3 mcoloop3aend
ifz mcoTD1-mcoTD3 mcoloop3aend
gp mcoVARP2 ref
mcoVARP1 <90,mcoLT
line mcoVARP1 mcoVARP2;
line ref mcoVARP1
<180,mcoTD2+(mcoT*1.5) ref mcoVARP2 <180,mcoTD2+(mcoT*1.5);
go
mcoloop3a
:mcoloop3aend
gp mcoVARP2 ref mcoVARP1 <90,mcoLT
line ref
mcoP12 <0,mcoT*.75 mcoVARP2;
line ref mcoP11 <180,mcoT*.75 ref mcoVARP2
<180,mcoTD2+(mcoT*1.5);
:mcoloop3adone
lwidth 0;color 0
box mcoP5
mcoP9
box mcoP6 mcoP10
box mcoP7 mcoP11
box mcoP8 mcoP12
ifz mcoGRID
mcoCONTROL2
lwidth 0;color mcoGRIDC
gdist mcoTD1 mcoP9 mcoP10
gdist
mcoTD2 mcoP9 mcoP11
gp mcoVARP1 mcoP9
:mcoloop4
gp mcoVARP1 ref
mcoVARP1 <0,mcoGRID
gdist mcoTD3 mcoP9 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop4done
ifz mcoTD1-mcoTD3 mcoloop4done
line mcoVARP1 ref mcoVARP1
<270,mcoTD2;
go mcoloop4
:mcoloop4done
gdist mcoTD1 mcoP10
mcoP12
gdist mcoTD2 mcoP10 mcoP9
gp mcoVARP1 mcoP10
:mcoloop4a
gp
mcoVARP1 ref mcoVARP1 <270,mcoGRID
gdist mcoTD3 mcoP10 mcoVARP1
ifn
mcoTD1-mcoTD3 mcoloop4adone
ifz mcoTD1-mcoTD3 mcoloop4adone
line mcoVARP1
ref mcoVARP1 <180,mcoTD2;
go
mcoloop4a
:mcoloop4adone
:mcoCONTROL2
selbyd
econ
endm
Название | Навигационная граница карты (ручная) |
Автор | Morgan Olden |
Команда | nauticalborderM |
Описание | Создает границы карты с "навигационными шкалами". Позволяет задавать свои параметры.
|
Инструкции | Настроек гораздо больше чем в автоматической версии. Вам может понадобиться несколько экспериментов перед рисованием - используйте временный слой, чтобы легче было удалять.
В макрос включен файл скрипта с кодом. Для работы скрипта просто запустите его из СС2.
|
Код
macro nauticalchartM
ecoff
gv mcoT 10
gv mcoT ^DFrame thickness
(10):
gv mcoCOLOR 0
gv mcoCOLOR ^DColor (0):
gv mcoST 10
gv mcoST
^DSmall tick spacing (10):
gv mcoLT 50
gv mcoLT ^DLarge tick spacing
(50):
gv mcoGRID 500
gv mcoGRID ^DGrid line spacing (default=500,
none=0)
ifz mcoGRID mcoCONTROL1
gv mcoGRIDC 0
gv mcoGRIDC ^DGrid line
color (0):
:mcoCONTROL1
gp mcoP1 ^DTop left point of frame:
lwidth
0;fstyle hollow;lstyle solid
box mcoP1 ^DBottom right point of
frame:
selbyp
erase
gp mcoP4 @0,0
GETX mcoX1 mcoP1
GETX mcoX2
mcoP4
GETY mcoY1 mcoP1
GETY mcoY2 mcoP4
gp mcoP2 mcoX2,mcoY1
gp
mcoP3 mcoX1,mcoY2
gp mcoP5 (mcoX1-(mcoT/2)),(mcoY1+(mcoT/2))
gp mcoP6
(mcoX2+(mcoT/2)),(mcoY1+(mcoT/2))
gp mcoP7
(mcoX1-(mcoT/2)),(mcoY2-(mcoT/2))
gp mcoP8
(mcoX2+(mcoT/2)),(mcoY2-(mcoT/2))
gp mcoP9
(mcoX1+(mcoT/2)),(mcoY1-(mcoT/2))
gp mcoP10
(mcoX2-(mcoT/2)),(mcoY1-(mcoT/2))
gp mcoP11
(mcoX1+(mcoT/2)),(mcoY2+(mcoT/2))
gp mcoP12
(mcoX2-(mcoT/2)),(mcoY2+(mcoT/2))
gp mcoP13
(mcoX1-(mcoT/4)),(mcoY1+(mcoT/4))
gp mcoP14
(mcoX2+(mcoT/4)),(mcoY1+(mcoT/4))
gp mcoP15
(mcoX1-(mcoT/4)),(mcoY2-(mcoT/4))
gp mcoP16
(mcoX2+(mcoT/4)),(mcoY2-(mcoT/4))
lwidth 0;lstyle solid
fstyle
hollow;color 0
box mcoP5 mcoP8
box mcoP9 mcoP12
box mcoP1
mcoP4
gdist mcoTD1 mcoP9 mcoP10
gdist mcoTD2 mcoP9 mcoP11
gp mcoVARP1
ref mcoP9 <0,mcoST
:mcoloop1
line mcoVARP1 ref mcoVARP1
<90,mcoT/2;
line ref mcoVARP1 <-90,mcoTD2 ref mcoVARP1
<-90,mcoTD2+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <0,mcoST
gdist mcoTD3
mcoP9 mcoVARP1
ifn mcoTD1-mcoTD3 mcoloop1done
ifz mcoTD1-mcoTD3
mcoloop1done
go mcoloop1
:mcoloop1done
gdist mcoTD1 mcoP9
mcoP10
gdist mcoTD2 mcoP9 mcoP11
gp mcoVARP1 ref mcoP9
<90,mcoT/2
:mcoloop1a
line mcoVARP1 ref mcoVARP1 <90,mcoT/2;
line
ref mcoVARP1 <-90,mcoTD2+mcoT ref mcoVARP1
<-90,mcoTD2+mcoT+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <0,mcoLT
gdist
mcoTD3 ref mcoP9 <90,mcoT/2 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop1adone
ifz mcoTD1-mcoTD3 mcoloop1adone
go
mcoloop1a
:mcoloop1adone
gdist mcoTD1 mcoP10 mcoP12
gdist mcoTD2 mcoP10
mcoP9
gp mcoVARP1 ref mcoP10 <270,mcoST
:mcoloop2
line mcoVARP1 ref
mcoVARP1 <0,mcoT/2;
line ref mcoVARP1 <180,mcoTD2 ref mcoVARP1
<180,mcoTD2+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <270,mcoST
gdist
mcoTD3 mcoP10 mcoVARP1
ifn mcoTD1-mcoTD3 mcoloop2done
ifz mcoTD1-mcoTD3
mcoloop2done
go mcoloop2
:mcoloop2done
gdist mcoTD1 mcoP10
mcoP12
gdist mcoTD2 mcoP10 mcoP9
gp mcoVARP1 ref mcoP10
<0,mcoT/2
:mcoloop2a
line mcoVARP1 ref mcoVARP1 <0,mcoT/2;
line
ref mcoVARP1 <180,mcoTD2+mcoT ref mcoVARP1
<180,mcoTD2+mcoT+(mcoT/2);
gp mcoVARP1 ref mcoVARP1 <270,mcoLT
gdist
mcoTD3 ref mcoP10 <270,mcoT/2 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop2adone
ifz mcoTD1-mcoTD3 mcoloop2adone
go
mcoloop2a
:mcoloop2adone
lwidth mcoT/10;fstyle solid;color
mcoCOLOR
gdist mcoTD1 mcoP9 mcoP10
gdist mcoTD2 mcoP9 mcoP11
gp
mcoVARP1 ref mcoP9 <90,mcoT*.75
:mcoloop3
gp mcoVARP1 ref mcoVARP1
<0,mcoLT
gdist mcoTD3 ref mcoP9 <90,mcoT*.75 mcoVARP1
ifn
mcoTD1-mcoTD3 mcoloop3end
ifz mcoTD1-mcoTD3 mcoloop3end
gp mcoVARP2 ref
mcoVARP1 <180,mcoLT
line mcoVARP1 mcoVARP2;
line ref mcoVARP1
<270,mcoTD2+(mcoT*1.5) ref mcoVARP2 <270,mcoTD2+(mcoT*1.5);
gp mcoVARP1
ref mcoVARP1 <0,mcoLT
gdist mcoTD3 ref mcoP9 <90,mcoT*.75
mcoVARP1
ifn mcoTD1-mcoTD3 mcoloop3done
ifz mcoTD1-mcoTD3
mcoloop3done
go mcoloop3
:mcoloop3end
gp mcoVARP2 ref mcoVARP1
<180,mcoLT
line ref mcoP10 <90,mcoT*.75 mcoVARP2;
line ref mcoP12
<270,mcoT*.75 ref mcoVARP2
<270,mcoTD2+(mcoT*1.5);
:mcoloop3done
gdist mcoTD1 mcoP10
mcoP12
gdist mcoTD2 mcoP10 mcoP9
gp mcoVARP1 ref mcoP10
<0,mcoT*.75
:mcoloop3a
gp mcoVARP1 ref mcoVARP1 <270,mcoLT
gdist
mcoTD3 ref mcoP10 <0,mcoT*.75 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop3adone
ifz mcoTD1-mcoTD3 mcoloop3adone
gp mcoVARP1 ref mcoVARP1
<270,mcoLT
gdist mcoTD3 ref mcoP10 <0,mcoT*.75 mcoVARP1
ifn
mcoTD1-mcoTD3 mcoloop3aend
ifz mcoTD1-mcoTD3 mcoloop3aend
gp mcoVARP2 ref
mcoVARP1 <90,mcoLT
line mcoVARP1 mcoVARP2;
line ref mcoVARP1
<180,mcoTD2+(mcoT*1.5) ref mcoVARP2 <180,mcoTD2+(mcoT*1.5);
go
mcoloop3a
:mcoloop3aend
gp mcoVARP2 ref mcoVARP1 <90,mcoLT
line ref
mcoP12 <0,mcoT*.75 mcoVARP2;
line ref mcoP11 <180,mcoT*.75 ref mcoVARP2
<180,mcoTD2+(mcoT*1.5);
:mcoloop3adone
lwidth 0;color 0
box mcoP5
mcoP9
box mcoP6 mcoP10
box mcoP7 mcoP11
box mcoP8 mcoP12
ifz mcoGRID
mcoCONTROL2
lwidth 0;color mcoGRIDC
gdist mcoTD1 mcoP9 mcoP10
gdist
mcoTD2 mcoP9 mcoP11
gp mcoVARP1 mcoP9
:mcoloop4
gp mcoVARP1 ref
mcoVARP1 <0,mcoGRID
gdist mcoTD3 mcoP9 mcoVARP1
ifn mcoTD1-mcoTD3
mcoloop4done
ifz mcoTD1-mcoTD3 mcoloop4done
line mcoVARP1 ref mcoVARP1
<270,mcoTD2;
go mcoloop4
:mcoloop4done
gdist mcoTD1 mcoP10
mcoP12
gdist mcoTD2 mcoP10 mcoP9
gp mcoVARP1 mcoP10
:mcoloop4a
gp
mcoVARP1 ref mcoVARP1 <270,mcoGRID
gdist mcoTD3 mcoP10 mcoVARP1
ifn
mcoTD1-mcoTD3 mcoloop4adone
ifz mcoTD1-mcoTD3 mcoloop4adone
line mcoVARP1
ref mcoVARP1 <180,mcoTD2;
go
mcoloop4a
:mcoloop4adone
:mcoCONTROL2
selbyd
econ
endm
Copyright © AD&Den`s Lair Все права защищены.