read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxfread_contour_xld_dxf (Operator)

Name

read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxfread_contour_xld_dxf — 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)

def read_contour_xld_dxf(file_name: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, str, float]]) -> Tuple[HObject, Sequence[str]]

def read_contour_xld_dxf_s(file_name: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, str, float]]) -> Tuple[HObject, str]

Beschreibung

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

Der Ausgabeparameter DxfStatusDxfStatusDxfStatusDxfStatusdxfStatusdxf_status 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_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxfread_contour_xld_dxf unterstützt die folgenden DXF-Elemente:

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

Wenn die Datei mit dem Operator write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxfwrite_contour_xld_dxf 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_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxfread_contour_xld_dxf unterstützt die erweiterten Elementdaten, die von write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxfwrite_contour_xld_dxf geschrieben werden. Das Einlesen dieser Attribute kann durch Setzen des generischen Parameters 'read_attributes'"read_attributes""read_attributes""read_attributes""read_attributes""read_attributes" auf 'false'"false""false""false""false""false" verhindert werden. Generische Parameter werden durch Angabe des Parameternamens in GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name und des dazugehörigen Wertes in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value 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""min_num_points" und 'max_approx_error'"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""min_num_points" legt fest, wie viele 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""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""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""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""min_num_points" oder ein kleinerer Wert für 'max_approx_error'"max_approx_error""max_approx_error""max_approx_error""max_approx_error""max_approx_error" verwendet werden.

Ausführungsinformationen

Parameter

ContoursContoursContoursContourscontourscontours (output_object)  xld_cont(-array) objectHXLDContHObjectHXLDContHobject *

Eingelesene XLD-Konturen.

FileNameFileNameFileNameFileNamefileNamefile_name (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name der DXF-Datei.

Dateiendung: .dxf

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (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""max_approx_error", 'min_num_points'"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""read_attributes"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value(-array) HTupleMaybeSequence[Union[int, str, float]]HTupleHtuple (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""true", 'false'"false""false""false""false""false", 0.1, 0.25, 0.5, 1, 2, 5, 10, 20

DxfStatusDxfStatusDxfStatusDxfStatusdxfStatusdxf_status (output_control)  string(-array) HTupleSequence[str]HTupleHtuple (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_dxfReadContourXldDxfReadContourXldDxfReadContourXldDxfread_contour_xld_dxf den Wert TRUE. Andernfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxfwrite_contour_xld_dxf

Siehe auch

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxfWriteContourXldDxfwrite_contour_xld_dxf, read_polygon_xld_dxfread_polygon_xld_dxfReadPolygonXldDxfReadPolygonXldDxfReadPolygonXldDxfread_polygon_xld_dxf, query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXldquery_contour_attribs_xld, query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_contour_global_attribs_xld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld, get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld

Modul

Foundation