ClassesClassesClassesClasses | | | | Operators

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf (Operator)

Name

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf — Write XLD contours to a file in DXF format.

Signature

write_contour_xld_dxf(Contours : : FileName : )

Herror write_contour_xld_dxf(const Hobject Contours, const char* FileName)

Herror T_write_contour_xld_dxf(const Hobject Contours, const Htuple FileName)

Herror write_contour_xld_dxf(Hobject Contours, const HTuple& FileName)

void HXLDCont::WriteContourXldDxf(const HTuple& FileName) const

void HXLDContArray::WriteContourXldDxf(const HTuple& FileName) const

void WriteContourXldDxf(const HObject& Contours, const HTuple& FileName)

void HXLDCont::WriteContourXldDxf(const HString& FileName) const

void HXLDCont::WriteContourXldDxf(const char* FileName) const

void HOperatorSetX.WriteContourXldDxf(
[in] IHUntypedObjectX* Contours, [in] VARIANT FileName)

void HXLDContX.WriteContourXldDxf([in] BSTR FileName)

static void HOperatorSet.WriteContourXldDxf(HObject contours, HTuple fileName)

void HXLDCont.WriteContourXldDxf(string fileName)

Description

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf writes the XLD contours ContoursContoursContoursContoursContourscontours to the file FileNameFileNameFileNameFileNameFileNamefileName in DXF format. If no absolute path is given in FileNameFileNameFileNameFileNameFileNamefileName the output file is created in the current directory of the HALCON process.

Besides the geometry of the ContoursContoursContoursContoursContourscontours, all attributes and global attributes that are defined for the ContoursContoursContoursContoursContourscontours are written to the file.

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf writes the file according to the DXF version AC1009 (AutoCAD Release 12). Each contour is stored as a POLYLINE. The attribute values are stored as extended data of each VERTEX of the POLYLINE. The global attribute values are stored as extended data of the POLYLINE. All attribute names are also stored as extended data of the POLYLINE.

The operator read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf can be used to read the XLD contours together with their attributes.

Other applications that are able to read DXF files only import the contour geometry, but they ignore the attribute information.

Description of the format of the extended data

Each block of extended data starts with the following DXF group:

1001 HALCON

The attributes are written in the following format as extended data of each VERTEX:

DXF Explanation
1000 Meaning
contour attributes
1002 Beginning of the value list
{
1070 Number of attributes (here: 3)
3
1040 Value of the first attribute
5.00434303
1040 Value of the second attribute
126.8638916
1040 Value of the third attribute
4.99164152
1002 End of the value list
}

The global attributes are written in the following format as extended data of each POLYLINE:

DXF Explanation
1000 Meaning
global contour attributes
1002 Beginning of the value list
{
1070 Number of global attributes (here: 5)
5
1040 Value of the first global attribute
0.77951831
1040 Value of the second global attribute
0.62637949
1040 Value of the third global attribute
103.94314575
1040 Value of the fourth global attribute
0.21434096
1040 Value of the fifth global attribute
0.21921949
1002 End of the value list
}

The names of the attributes are written in the following format as extended data of each POLYLINE:

DXF Explanation
1000 Meaning
names of contour attributes
1002 Beginning of the value list
{
1070 Number of attribute names (here: 3)
3
1000 Name of the first attribute
angle
1000 Name of the second attribute
response
1000 Name of the third attribute
edge_direction
1002 End of the value list
}

The names of the global attributes are written in the following format as extended data of each POLYLINE:

DXF Explanation
1000 Meaning
names of global contour attributes
1002 Beginning of the value list
{
1070 Number of global attribute names (here: 5)
5
1000 Name of the first global attribute
regr_norm_row
1000 Name of the second global attribute
regr_norm_col
1000 Name of the third global attribute
regr_dist
1000 Name of the fourth global attribute
regr_mean_dist
1000 Name of the fifth global attribute
regr_dev_dist
1002 End of the value list
}

Parallelization

Parameters

ContoursContoursContoursContoursContourscontours (input_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContHXLDContXHobject

XLD contours to be written.

FileNameFileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Name of the DXF file.

File extension: .dxf

Result

If the parameters are correct and the file could be written the operator write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.

Possible Predecessors

edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix

See also

read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf, write_polygon_xld_dxfwrite_polygon_xld_dxfWritePolygonXldDxfwrite_polygon_xld_dxfWritePolygonXldDxfWritePolygonXldDxf, query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXld, query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldget_contour_attrib_xldGetContourAttribXldGetContourAttribXld, get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXld

Module

Foundation


ClassesClassesClassesClasses | | | | Operators