@REM 折れ線(始点に矢印、終点無印
@echo off
REM #jww
REM #cd
REM #h0
REM #1/ ★矢印付き折線★始点を指示 (L)free,(R)Read
REM #2/ 折れ点を指示 ( AM1時左ドラッグで15度毎/自由角 )
REM #99# 終点を指示 (L)free,(R)Read
REM #k 矢印の大きさ |2mm (L)|2.5mm(R)|3mm|3.5mm|4mm|5mm|/_/a
REM #e
copy jwc_temp.txt temp.txt > nul
ruby -Ks 矢印付折線.rb temp.txt %1> jwc_temp.txt
◎スクリプトファイル(ファイル名 矢印付折線.rb)
BEGIN{
$nagasa=2.5
while ARGV.length > 1
case argument=ARGV.pop
when/^\/a/
$nagasa=argument[2..-1].to_f
end
end
}
def sen(x1,y1,x2,y2)
printf("%e %e %e %e\n", x1, y1, x2, y2)
end
by=Array.new
x=Array.new
y=Array.new
while ARGF.gets
xy =split
if xy[0] =~ /^hs/
n=1;while (n end
if xy[0] =~ /^lg/
lg=xy[0].delete("lg");zusun=by[$lg.to_i]
end
if xy[0] =~ /^hp/
x.push(xy[1].to_f)
y.push(xy[2].to_f)
end
end
dxy=Math.sqrt((x[1]-x[0])**2+(y[1]-y[0])**2)
dx=(x[1]-x[0])/dxy
dy=(y[1]-y[0])/dxy
yax=$nagasa
yay=0.268*$nagasa
BEGIN{
$no="2"
while ARGV.length > 1
case argument=ARGV.pop
when/^\/a/
$no=argument[2..-1]
end
end
}
hash={"1"=>2,"2"=>2.5,"3"=>3,"4"=>3.5,"5"=>4,"6"=>5}
$nagasa=hash[$no]
def sen(x1,y1,x2,y2)
printf("%e %e %e %e\n", x1, y1, x2, y2)
end
by=Array.new
x=Array.new
y=Array.new
while ARGF.gets
xy =split
if xy[0] =~ /^hs/
n=1;while (n end
if xy[0] =~ /^lg/
lg=xy[0].delete("lg");zusun=by[$lg.to_i]
end
if xy[0] =~ /^hp/
x.push(xy[1].to_f)
y.push(xy[2].to_f)
end
end
dxy=Math.sqrt((x[1]-x[0])**2+(y[1]-y[0])**2)
dx=(x[1]-x[0])/dxy
dy=(y[1]-y[0])/dxy
yax=$nagasa
yay=0.268*$nagasa
BEGIN{
$no="2"
while ARGV.length > 1
case argument=ARGV.pop
when/^\/a/
$no=argument[2..-1]
end
end
}
hash={"1"=>2,"2"=>2.5,"3"=>3,"4"=>3.5,"5"=>4,"6"=>5}
$nagasa=hash[$no]
def sen(x1,y1,x2,y2)
printf("%e %e %e %e\n", x1, y1, x2, y2)
end
by=Array.new
x=Array.new
y=Array.new
while ARGF.gets
xy =split
if xy[0] =~ /^hs/
n=1;while (n end
if xy[0] =~ /^lg/
lg=xy[0].delete("lg");zusun=by[lg.to_i]
end
if xy[0] =~ /^hp/
x.push(xy[1].to_f)
y.push(xy[2].to_f)
end
end
dxy=Math.sqrt((x[1]-x[0])**2+(y[1]-y[0])**2)
dx=(x[1]-x[0])/dxy
dy=(y[1]-y[0])/dxy
yax=$nagasa
yay=0.268*$nagasa
BEGIN{
$no="2"
while ARGV.length > 1
case argument=ARGV.pop
when/^\/a/
$no=argument[2..-1]
end
end
}
print "ly0\n"#レイヤ0に出力
print "lc1\n"#線色1で出力
print "lt1\n"#線種1で出力
hash={"1"=>2,"2"=>2.5,"3"=>3,"4"=>3.5,"5"=>4,"6"=>5}
$nagasa=hash[$no]
def sen(x1,y1,x2,y2)
printf("%e %e %e %e\n", x1, y1, x2, y2)
end
by=Array.new
x=Array.new
y=Array.new
while ARGF.gets
xy =split
if xy[0] =~ /^hs/
n=1;while (n end
if xy[0] =~ /^lg/
lg=xy[0].delete("lg");zusun=by[$lg.to_i]
end
if xy[0] =~ /^hp/
x.push(xy[1].to_f)
y.push(xy[2].to_f)
end
end
dxy=Math.sqrt((x[1]-x[0])**2+(y[1]-y[0])**2)
dx=(x[1]-x[0])/dxy
dy=(y[1]-y[0])/dxy
yax=$nagasa
yay=0.268*$nagasa