import_cad#
- FileIO.import_cad(file_name, params)#
Function that imports CAD file.
Import CAD file from disk.
Supported formats on Windows are:
*.scdoc *.fmd *.agdb *.pmdb *.meshdat *.mechdat *.dsdb *.cmdb *.sat *.sab *.dwg *.dxf *.model *.exp *.CATPart *.CATProduct *.cgr *.3dxml *.prt* *.asm* *.iges *.igs *.ipt *.iam *.jt *.prt *.x_t *.x_b *.par *.psm *.asm *.sldprt *.sldasm *.step *.stp *.stl *.plmxml *.tgf
Supported formats on Linux are:
*.fmd *.agdb *.pmdb *.meshdat *.mechdat *.dsdb *.cmdb *.sat *.sab *.CATPart *.CATProduct *.iges *.igs *.jt *.x_t *.x_b *.step *.stp *.stl *.plmxml *.tgf
Please refer documentation for detailed list of supported formats.
- Parameters:
- file_name
str
Path to file on disk.
- params
ImportCadParams
Parameters to control CAD import options
- file_name
- Returns:
ImportCadResults
Returns ImportCadResults.
- Return type:
Examples
>>> import ansys.meshing.prime as prime >>> #connect client to server and get model from it >>> client = prime.Client(ip="localhost", port=50060) >>> model = client.model >>> file_io = prime.FileIO(model=model) >>> params = ImportCadParams(model=model) >>> results = file_io.import_cad( "/tmp/my_cad.x_t", params=params)