import_dxf#

Hfss.import_dxf(file_path: str, layers: list, auto_detect_close: bool = True, self_stitch: bool = True, self_stitch_tolerance: float = 0, scale: float = 0.001, defeature_geometry: bool = False, defeature_distance: float = 0, round_coordinates: bool = False, round_num_digits: int = 4, write_poly_with_width_as_filled_poly: bool = False, import_method: int = 1) bool#

Import a DXF file.

Parameters:
file_pathstr

Path to the DXF file.

layerslist

List of layer names to import. To get the dxf_layers in the DXF file, you can call the get_dxf_layers method.

auto_detect_closebool, optional

Whether to check polylines to see if they are closed. The default is True. If a polyline is closed, the modeler creates a polygon in the design.

self_stitchbool, optional

Whether to join multiple straight line segments to form polylines. The default is True.

self_stitch_tolerancefloat, optional

Self stitch tolerance value. The default is 0.

scalefloat, optional

Scaling factor. The default is 0.001. The units are mm.

defeature_geometrybool, optional

Whether to defeature the geometry to reduce complexity. The default is False.

defeature_distancefloat, optional

Defeature tolerance distance. The default is 0.

round_coordinatesbool, optional

Whether to rounds all imported data to the number of decimal points specified by the next parameter. The default is False.

round_num_digitsint, optional

Number of digits to which to round all imported data. The default is 4.

write_poly_with_width_as_filled_polybool, optional

Imports wide polylines as polygons. The default is False.

import_methodint, bool

Whether the import method is Script or Acis. The default is 1, which means that the Acis is used.

sheet_bodies_2dbool, optional

Whether importing as 2D sheet bodies causes imported objects to be organized in terms of 2D sheets. The default is True.

Returns:
bool

True when successful, False when failed.

References

>>> oEditor.ImportDXF