illustrator脚本 018 自动角线-1

这是一个自动加角线的脚本,来源于网络。

illustrator脚本 018 自动角线-1_第1张图片

运行方式,先选择对象再执行脚本,无对话框。脚本不在好坏,你觉得对你有用最重要。

脚本中部分可修改选项:

//初始化自定义标线的长度,宽度,离岸,出血等参数,可自行修改
lw=0.1*2.834646; //标线宽度 0.1 mm
od=3*2.834646; //中位十字线圆形直径 3 mm
cw=15*2.834646; //智能色标的长度 15mm
ch=10*2.834646; //智能色标的高度 10mm
cspace=3*2.834646; //智能色标间隔 3mm
linelength=10*2.834646; //标注线长度 5 mm
linespace=5*2.834646; //标注线离岸 1 mm
outspace=5*2.834646; //出血 5 mm

shuangjiaoxian = true;//判断是否双脚线,属性看下面↓↓↓
rishicaiqie = false;//true开启日式标记 false关闭日式标记

doc = activeDocument;
newSpot = doc.spots[doc.spots.length-1]; //获得套版色
regColor = new SpotColor();
regColor.spot = newSpot;



theSelect = doc.selection;
lmin=theSelect[0].geometricBounds[0]; //左
tmax=theSelect[0].geometricBounds[1]; //上
lmax=theSelect[0].geometricBounds[2]; //右
tmin=theSelect[0].geometricBounds[3]; //下

//计算选择集的四边位置
for (i=1;itheSelect[i].geometricBounds[0]){lmin=theSelect[i].geometricBounds[0]}
	if (tmaxtheSelect[i].geometricBounds[3]){tmin=theSelect[i].geometricBounds[3]}
}

//计算所有要画的长度标线位置
w=[];
for (i=0;ithis.length){return false;}
	for(var i=0,n=0;i

你可能感兴趣的:(illustrator插件,javascript,前端,开发语言,illustrator)