“凸度”——CAD,多段线中的弧定义,ployline
##两种表示转换
" 凸 度 " = tan ( α 4 ) = h s "凸度"= \tan(\frac{\alpha}{4})=\frac{h}{s} "凸度"=tan(4α)=sh
弧从起点到终点是顺时针走向则凸度为负数
"凸度"表示 (10 x y z);起点 (42 "凸度,负号为逆时针") | 圆心角表示 (10 x y z);圆心坐标 (40 r);半径 (50 deg);起点弧度 (51 deg);端点弧度 (73 0);1逆,0顺时针标志 |
R = h 2 + s 2 2 h R=\frac {h^2+s^2}{2h} R=2hh2+s2
h 与 r 的关系决定弧为圆上的大弧还是小弧
if s > r:为大弧
if s<r:为小弧
β = ( 9 0 o − a r c t a n ( h s ) ∗ 2 ) m o d 9 0 o β=(90^o-arctan(\frac{h}{s})*2)\space mod\space 90^o β=(90o−arctan(sh)∗2) mod 90o
求圆心,利用向量旋转计算公式
逆时针:
x=xcos(β)-ysin(β);
y=ycos(β)+xsin(β);
顺时针:
x=xcos(β)+ysin(β);
y=ycos(β)-xsin(β);
λ
=
r
A
B
λ=\frac{r}{AB}
λ=ABr
A
C
⃗
=
λ
A
B
⃗
\vec{AC} = λ \vec {AB}
AC=λAB
O
x
=
C
x
c
o
s
(
β
)
+
C
y
s
i
n
(
β
)
;
O_x=C_xcos(β)+C_ysin(β);
Ox=Cxcos(β)+Cysin(β);
O
y
=
C
y
c
o
s
(
β
)
−
C
x
s
i
n
(
β
)
;
O_y=C_ycos(β)-C_xsin(β);
Oy=Cycos(β)−Cxsin(β);
对弧的打断
已知A点,B点,半径R与弧的凸度。 C’ 是已知弧附近的一点,找到弧上对应点C对弧进行分割
O
C
′
O
C
O
C
′
⃗
=
O
C
⃗
\frac{OC'}{OC} \vec {OC'} = \vec{OC}
OCOC′OC′=OC
F
=
C
+
B
2
F=\frac {C+B}{2}
F=2C+B
C
B
凸
度
=
2
∗
(
R
−
O
F
)
C
B
CB_{凸度} = \frac{2*(R-OF)}{CB}
CB凸度=CB2∗(R−OF)