Skip to content

write_polygon_xld_dxfWritePolygonXldDxfWritePolygonXldDxfwrite_polygon_xld_dxfwrite_polygon_xld_dxf🔗

Short description🔗

write_polygon_xld_dxfWritePolygonXldDxfWritePolygonXldDxfwrite_polygon_xld_dxfwrite_polygon_xld_dxf — Write XLD polygons to a file in DXF format.

Signature🔗

write_polygon_xld_dxf( xld_poly Polygons, filename.write FileName )void WritePolygonXldDxf( const HObject& Polygons, const HTuple& FileName )static void HOperatorSet.WritePolygonXldDxf( HObject polygons, HTuple fileName )def write_polygon_xld_dxf( polygons: HObject, file_name: str ) -> None

Herror write_polygon_xld_dxf( const Hobject Polygons, const char* FileName )

Herror T_write_polygon_xld_dxf( const Hobject Polygons, const Htuple FileName )

void HXLDPoly::WritePolygonXldDxf( const HString& FileName ) const

void HXLDPoly::WritePolygonXldDxf( const char* FileName ) const

void HXLDPoly::WritePolygonXldDxf( const wchar_t* FileName ) const (Windows only)

void HXLDPoly.WritePolygonXldDxf( string fileName )

Description🔗

write_polygon_xld_dxfWritePolygonXldDxf writes the XLD polygons Polygonspolygonspolygons to the file FileNamefileNamefile_name in DXF format. If no absolute path is given in FileNamefileNamefile_name the output file is created in the current directory of the HALCON process.

write_polygon_xld_dxfWritePolygonXldDxf writes the file according to the DXF version AC1009 (AutoCAD Release 12). Each polygon is stored as a POLYLINE.

The operator read_polygon_xld_dxfReadPolygonXldDxf can be used to read the XLD polygon.

Attention🔗

The XLD contours that are possibly referenced by Polygonspolygonspolygons are not stored in the DXF file. Therefore, when the polygons are read again using read_polygon_xld_dxfReadPolygonXldDxf, this information is lost, and no references to contours are generated for the polygons. Hence, operators that access the contours associated with a polygon, e.g., split_contours_xldSplitContoursXld will not work correctly.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Polygonspolygonspolygons (input_object) xld_poly(-array) → objectHObjectHXLDPolyHObjectHobject

XLD polygons to be written.

FileNamefileNamefile_name (input_control) filename.write → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the DXF file.

File extension: .dxf

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

gen_polygons_xldGenPolygonsXld

See also

read_polygon_xld_dxfReadPolygonXldDxf, write_contour_xld_dxfWriteContourXldDxf

Module🔗

Foundation