欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Halcon 之 rectangle2的四个顶点

程序员文章站 2022-05-28 14:27:45
...
draw_rectangle2(3600, Row, Column, Phi, Length1, Length2)
gen_rectangle2_contour_xld (Rectangle4,Row, Column, Phi, Length1, Length2)
 
tuple_cos (Phi, Cos)
tuple_sin (Phi, Sin)
 
dev_set_color('green')
RT_X := -Length1*Cos - Length2*Sin
RT_Y := -Length1*Sin + Length2*Cos
gen_cross_contour_xld(Cross, Row-RT_Y,  Column+RT_X, 6, Phi)
  
RB_X := Length1*Cos - Length2*Sin
RB_Y := Length1*Sin + Length2*Cos
gen_cross_contour_xld(Cross, Row-RB_Y, Column+RB_X, 6, Phi)
  
LB_X := Length1*Cos + Length2*Sin
LB_Y := Length1*Sin - Length2*Cos
gen_cross_contour_xld(Cross, Row-LB_Y, Column+LB_X, 6, Phi)
 
LT_X := -Length1*Cos + Length2*Sin
LT_Y := -Length1*Sin - Length2*Cos
gen_cross_contour_xld(Cross, Row-LT_Y, Column+LT_X, 6, Phi)