本帖最后由 qweerzhou 于 2025-3-5 10:32 编辑
1.需要将一个闭合轮廓,按yello框示例图进行直线、拐线、圆弧分割,下面有应该分割成什么样的示例图。
2.另外需要对分割后的直线和弧线进行生成 成对关系,因为圆的轮廓是没有成对关系的,只有其他地方有,直线跟拐线因为一个直线线路是由两个直线组成,拐角的地方也是。
3.轮廓在xx.zip附件里,下载解压后改下基础demo路径即可
4.新人求求求助大佬。
轮廓分割后的结果示例
实际轮廓
xx.zip
(376 Bytes, 下载次数: 5)
- * 基础 demo
- read_dict ('Y:/test/xx.json', [], [], DictHandle356)
- get_dict_tuple(DictHandle356, 'area_locations', area_locations)
- get_dict_tuple(area_locations, '1652', scope)
- get_dict_tuple(scope,'other_area' , other_area)
- get_dict_param(other_area, 'keys', [], GenParamValue)
- tuple_length (GenParamValue, Length)
- for Index1 := 0 to Length-1 by 1
-
- key := GenParamValue[Index1]
-
- get_dict_tuple(other_area, key, other_area_info)
- get_dict_tuple(other_area_info, 'outline', outline)
-
- get_dict_param (outline, 'keys', [], GenParamValue1)
-
-
- rows := []
- cols := []
-
- tuple_length (GenParamValue1, oLength)
- for Index2 := 0 to oLength-1 by 1
- oIndex := GenParamValue1[Index2]
- get_dict_tuple(outline, oIndex, point)
- get_dict_tuple(point, 0, x)
- get_dict_tuple(point, 1, y)
- tuple_concat(rows, y, rows)
-
- tuple_concat(cols, x, cols)
-
- endfor
-
-
- gen_contour_polygon_xld(outline_xld, rows, cols)
- dev_display(outline_xld)
- segment_contours_xld(outline_xld, ContoursSplit, 'lines_circles', 0, 20, 100)
-
- endfor
复制代码
|