KlassenKlassenKlassenKlassen | | | | Operatoren

read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf (Operator)

Name

read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfread_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)

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

Herror read_contour_xld_dxf(Hobject* Contours, const HTuple& FileName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DxfStatus)

HXLDCont HXLDCont::ReadContourXldDxf(const HTuple& FileName, const HTuple& GenParamName, const HTuple& GenParamValue, char* DxfStatus)

HXLDContArray HXLDContArray::ReadContourXldDxf(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)

void HOperatorSetX.ReadContourXldDxf(
[out] IHUntypedObjectX*Contours, [in] VARIANT FileName, [in] VARIANT GenParamName, [in] VARIANT GenParamValue, [out] VARIANT* DxfStatus)

VARIANT HXLDContX.ReadContourXldDxf(
[in] BSTR FileName, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

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_dxfReadContourXldDxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf liest den Inhalt der DXF-Datei FileNameFileNameFileNameFileNameFileNamefileName (DXF-Version AC1009, AutoCAD Release 12) und wandelt ihn in die XLD-Konturen ContoursContoursContoursContoursContourscontours. Wenn kein absoluter Pfad in FileNameFileNameFileNameFileNameFileNamefileName angegeben wird, wird die DXF-Datei im aktuellen Verzeichnis des HALCON-Prozesses gesucht.

Der Ausgabeparameter DxfStatusDxfStatusDxfStatusDxfStatusDxfStatusdxfStatus 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_dxfReadContourXldDxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf 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_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf 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_dxfReadContourXldDxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf unterstützt die erweiterten Elementdaten, die von write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf 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 GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName und des dazugehörigen Wertes in GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue 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, 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""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.

Parallelisierung

Parameter

ContoursContoursContoursContoursContourscontours (output_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContHXLDContXHobject *

Eingelesene XLD-Konturen.

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

Name der DXF-Datei.

Dateiendung: .dxf

GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (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"

GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.value(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*) (double / Hlong / BSTR) (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

DxfStatusDxfStatusDxfStatusDxfStatusDxfStatusdxfStatus (output_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Statusinformationen.

Ergebnis

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

Vorgänger

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf

Siehe auch

write_contour_xld_dxfwrite_contour_xld_dxfWriteContourXldDxfwrite_contour_xld_dxfWriteContourXldDxfWriteContourXldDxf, read_polygon_xld_dxfread_polygon_xld_dxfReadPolygonXldDxfread_polygon_xld_dxfReadPolygonXldDxfReadPolygonXldDxf, 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

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren