read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf (Operator)

Name

read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf — Lesen von XLD-Konturen aus einer DXF-Datei.

Signatur

read_contour_xld_dxf( : Contours : FileName, GenParamName, GenParamValue : DxfStatus)

Herror read_contour_xld_dxf(Hobject* Contours, const char* FileName, const char* GenParamName, double GenParamValue, char* DxfStatus)

Herror T_read_contour_xld_dxf(Hobject* Contours, const Htuple FileName, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DxfStatus)

void ReadContourXldDxf(HObject* Contours, const HTuple& FileName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DxfStatus)

HTuple HXLDCont::ReadContourXldDxf(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue)

HString HXLDCont::ReadContourXldDxf(const HString& FileName, const HString& GenParamName, double GenParamValue)

HString HXLDCont::ReadContourXldDxf(const char* FileName, const char* GenParamName, double GenParamValue)

HString HXLDCont::ReadContourXldDxf(const wchar_t* FileName, const wchar_t* GenParamName, double GenParamValue)   (Nur Windows)

static void HOperatorSet.ReadContourXldDxf(out HObject contours, HTuple fileName, HTuple genParamName, HTuple genParamValue, out HTuple dxfStatus)

HTuple HXLDCont.ReadContourXldDxf(string fileName, HTuple genParamName, HTuple genParamValue)

string HXLDCont.ReadContourXldDxf(string fileName, string genParamName, double genParamValue)

Beschreibung

read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxf liest den Inhalt der DXF-Datei FileNameFileNameFileNameFileNamefileName (DXF-Version AC1009, AutoCAD Release 12) und wandelt ihn in die XLD-Konturen ContoursContoursContoursContourscontours. Wenn kein absoluter Pfad in FileNameFileNameFileNameFileNamefileName angegeben wird, wird die DXF-Datei im aktuellen Verzeichnis des HALCON-Prozesses gesucht.

Der Ausgabeparameter DxfStatusDxfStatusDxfStatusDxfStatusdxfStatus enthält Informationen über die Anzahl der gelesenen Konturen und, falls erforderlich, Hinweise auf Teile der DXF-Datei, die nicht gelesen werden konnten.

Der Operator read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxf unterstützt die folgenden DXF-Elemente:

Die X- und Y-Koordinaten der DXF-Elemente werden in den Spalten- und Zeilenkoordinaten der XLD-Konturen ContoursContoursContoursContourscontours gespeichert. Die Z-Koordinaten der DXF-Elemente werden nicht berücksichtigt.

Wenn die Datei mit dem Operator write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxf erstellt wurde, werden alle Attribute und globalen Attribute eingelesen, die für die ursprüngliche XLD-Kontur definiert waren. Das heißt, read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxf unterstützt die erweiterten Elementdaten, die von write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxf geschrieben werden. Das Einlesen dieser Attribute kann durch Setzen des generischen Parameters 'read_attributes'"read_attributes""read_attributes""read_attributes""read_attributes" auf 'false'"false""false""false""false" verhindert werden. Generische Parameter werden durch Angabe des Parameternamens in GenParamNameGenParamNameGenParamNameGenParamNamegenParamName und des dazugehörigen Wertes in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue gesetzt.

DXF-Elemente vom Typ CIRCLE, ARC, ELLIPSE und SPLINE werden durch XLD-Konturen approximiert. Die Genauigkeit dieser Approximation kann über die beiden generischen Parameter 'min_num_points'"min_num_points""min_num_points""min_num_points""min_num_points" und 'max_approx_error'"max_approx_error""max_approx_error""max_approx_error""max_approx_error" gesteuert werden. Der Parameter 'min_num_points'"min_num_points""min_num_points""min_num_points""min_num_points" legt fest, wieviele Stützpunkte mindestens für die Approximation verwendet werden. Der Parameter 'min_num_points'"min_num_points""min_num_points""min_num_points""min_num_points" bezieht sich immer auf den entsprechenden Vollkreis bzw. die gesamte Ellipse, auch für ARCs oder Ellipsenbögen, d.h., wenn 'min_num_points'"min_num_points""min_num_points""min_num_points""min_num_points" auf den Wert 50 gesetzt ist und ein DXF-Element vom Typ ARC eingelesen wird, das einen Halbkreis darstellt, so wird dieser durch mindestens 25 Stützpunkte approximiert. Der Parameter 'max_approx_error'"max_approx_error""max_approx_error""max_approx_error""max_approx_error" legt fest, wie groß die maximale Abweichung der XLD-Kontur von dem idealen Kreis bzw. der idealen Ellipse sein darf (Einheit: Pixel). Für die Bestimmung der Genauigkeit der Approximation werden beide Kriterien ausgewertet und dasjenige verwendet, das zu einer genaueren Approximation führt.

Die intern verwendeten Defaultwerte für die generischen Parameter sind:

Um eine genauere Approximation zu erreichen, muss entweder ein größerer Wert für 'min_num_points'"min_num_points""min_num_points""min_num_points""min_num_points" oder ein kleinerer Wert für 'max_approx_error'"max_approx_error""max_approx_error""max_approx_error""max_approx_error" verwendet werden.

Ausführungsinformationen

Parameter

ContoursContoursContoursContourscontours (output_object)  xld_cont(-array) objectHXLDContHXLDContHobject *

Eingelesene XLD-Konturen.

FileNameFileNameFileNameFileNamefileName (input_control)  filename.read HTupleHTupleHtuple (string) (string) (HString) (char*)

Name der DXF-Datei.

Dateiendung: .dxf

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

Namen der generischen Parameter, die für den DXF-Input eingestellt werden sollen.

Defaultwert: []

Werteliste: 'max_approx_error'"max_approx_error""max_approx_error""max_approx_error""max_approx_error", 'min_num_points'"min_num_points""min_num_points""min_num_points""min_num_points", 'read_attributes'"read_attributes""read_attributes""read_attributes""read_attributes"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.value(-array) HTupleHTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Werte der generischen Parameter, die für den DXF-Input eingestellt werden sollen.

Defaultwert: []

Wertevorschläge: 'true'"true""true""true""true", 'false'"false""false""false""false", 0.1, 0.25, 0.5, 1, 2, 5, 10, 20

DxfStatusDxfStatusDxfStatusDxfStatusdxfStatus (output_control)  string(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

Statusinformationen.

Ergebnis

Wenn die Parameter korrekt sind und die angegebene Datei gelesen werden konnte, liefert read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxf den Wert 2 (H_MSG_TRUE). Andernfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxf

Siehe auch

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxf, read_polygon_xld_dxfread_polygon_xld_dxfReadPolygonXldDxfReadPolygonXldDxfReadPolygonXldDxf, query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXld, query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXld, get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXld

Modul

Foundation