当前位置:网站首页>Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]

Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]

2022-07-05 07:55:00 BoomBiuBiu

* This sample program demonstrates how to read DXF File and how to use this object CAD Description generate shape model .

Others are similar to the previous blog , Mainly about the use of two operators .


dev_clear_window ()

* from DXF File read XLD outline 
read_contour_xld_dxf (Contours, 'metal-part-' + J$'02', [], [], DxfStatus)

* from XLD Outline creates an image of a bright object with holes 
gen_model_image_of_bright_object_with_holes (Contours, Image, 3.38, 646, 482)

dev_display (Image)

name :read_contour_xld_dxf- from dxf File read xld outline .

describe :read_contour_xld_dxf Read dxf file name (dxf edition AC1009,AutoCAD edition 12) The content of , And convert it to xld contours. If the absolute path is not given in the file name , Will be in HALCON Search the current directory of the process DXF file .

Output parameters DxfStatus Contains information about the number of contours read , If necessary, , Also contains DXF Unexplained warnings in the file section .

Parameters

outline ( Output object )xld\u cont(-array)→ object

read XLD outline .

file name ( Input control ) file name . read → ( character string )

DXF The name of the document .

File extension :.dxf

GenParamName( Input control ) attribute . name (-array)→ ( character string )

For DXF Enter the name of the general parameter to be adjusted .

The default value is :[]

List of values :“ Maximum approximation error ”、“ Minimum value point ”、“ read attribute ”

GenParamValue( Input _ Control ) attribute . value (- Array )→ ( The set of real Numbers / Integers / character string )

For DXF Enter the general parameter value for adjustment .

The default value is :[]

recommended value :“ really ”、“ false ”、0.1、0.25、0.5、1、2、5、10、20

DxfStatus( Output control ) character string (- Array )→ ( character string )

State information


name :gen_model_image_of_bright_object_with_holes- from XLD Outline creates an image of a bright object with holes

Parameters

outline ( Input object ) object → object

ModelImage( Output object ) object → object

The zoom ( Input control ) arbitrarily → ( Tuples )

Width ( Input control ) arbitrarily → ( Tuples )

Height ( Input control ) arbitrarily → ( Tuples )

原网站

版权声明
本文为[BoomBiuBiu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140548302511.html