import_dxf#
- Q3d.import_dxf(input_file: str | Path, layers: List[str], auto_detect_close: bool = True, self_stitch: bool = True, self_stitch_tolerance: float = 0.0, scale: float = 0.001, defeature_geometry: bool = False, defeature_distance: float = 0.0, round_coordinates: bool = False, round_num_digits: int = 4, write_poly_with_width_as_filled_poly: bool = False, import_method: int | bool = 1) bool#
Import a DXF file.
- Parameters:
- input_file
strorpathlib.Path Path to the DXF file.
- layers
list List of layer names to import. To get the dxf_layers in the DXF file, you can call the
get_dxf_layersmethod.- 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_tolerance
float,optional Self stitch tolerance value. If negative, let importer use its default tolerance. The default is
0.- scale
float,optional Scaling factor. The default is
0.001. The units aremm.- defeature_geometrybool,
optional Whether to defeature the geometry to reduce complexity. The default is
False.- defeature_distance
float,optional Defeature tolerance distance. The default is
0.- round_coordinatesbool,
optional Whether to round all imported data to the number of decimal points specified by the next parameter. The default is
False.- round_num_digits
int,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_method
intor bool,optional Whether the import method is
ScriptorParasolid. The default is1, which means that theParasolidis used.
- input_file
- Returns:
- bool
Truewhen successful,Falsewhen failed.
References
>>> oEditor.ImportDXF