mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-23 22:12:04 +05:00
SWP12681
This commit is contained in:
parent
e43daf7b19
commit
5c0bf61bcf
@ -30,32 +30,36 @@ def TestExportImport (geompy, shape):
|
|||||||
|
|
||||||
print "Test Export/Import ...",
|
print "Test Export/Import ...",
|
||||||
|
|
||||||
|
tmpDir = os.getenv("TEMP")
|
||||||
|
if tmpDir == None:
|
||||||
|
tmpDir = "/tmp"
|
||||||
|
|
||||||
# Files for Export/Import testing
|
# Files for Export/Import testing
|
||||||
fileExportImport = "/tmp/testExportImport.brep"
|
fileExportImport = tmpDir + "/testExportImport.brep"
|
||||||
fileExportImportBREP = "/tmp/testExportImportBREP.brep"
|
fileExportImportBREP = tmpDir + "/testExportImportBREP.brep"
|
||||||
fileExportImportIGES = "/tmp/testExportImportIGES.iges"
|
fileExportImportIGES = tmpDir + "/testExportImportIGES.iges"
|
||||||
fileExportImportSTEP = "/tmp/testExportImportSTEP.step"
|
fileExportImportSTEP = tmpDir + "/testExportImportSTEP.step"
|
||||||
|
|
||||||
if os.access(fileExportImport, os.F_OK):
|
if os.access(fileExportImport, os.F_OK):
|
||||||
if os.access(fileExportImport, os.W_OK):
|
if os.access(fileExportImport, os.W_OK):
|
||||||
os.remove(fileExportImport)
|
os.remove(fileExportImport)
|
||||||
else:
|
else:
|
||||||
fileExportImport = "/tmp/testExportImport1.brep"
|
fileExportImport = tmpDir + "/testExportImport1.brep"
|
||||||
|
|
||||||
if os.access(fileExportImportBREP, os.W_OK):
|
if os.access(fileExportImportBREP, os.W_OK):
|
||||||
os.remove(fileExportImportBREP)
|
os.remove(fileExportImportBREP)
|
||||||
else:
|
else:
|
||||||
fileExportImportBREP = "/tmp/testExportImportBREP1.brep"
|
fileExportImportBREP = tmpDir + "/testExportImportBREP1.brep"
|
||||||
|
|
||||||
if os.access(fileExportImportIGES, os.W_OK):
|
if os.access(fileExportImportIGES, os.W_OK):
|
||||||
os.remove(fileExportImportIGES)
|
os.remove(fileExportImportIGES)
|
||||||
else:
|
else:
|
||||||
fileExportImportIGES = "/tmp/testExportImportIGES1.iges"
|
fileExportImportIGES = tmpDir + "/testExportImportIGES1.iges"
|
||||||
|
|
||||||
if os.access(fileExportImportSTEP, os.W_OK):
|
if os.access(fileExportImportSTEP, os.W_OK):
|
||||||
os.remove(fileExportImportSTEP)
|
os.remove(fileExportImportSTEP)
|
||||||
else:
|
else:
|
||||||
fileExportImportSTEP = "/tmp/testExportImportSTEP1.step"
|
fileExportImportSTEP = tmpDir + "/testExportImportSTEP1.step"
|
||||||
|
|
||||||
# Export
|
# Export
|
||||||
geompy.Export(shape, fileExportImport, "BREP")
|
geompy.Export(shape, fileExportImport, "BREP")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user