From facb3bfb3bd31e2f479c5332eb061c5c235bf4e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me?= Date: Fri, 6 Nov 2020 17:37:58 +0100 Subject: [PATCH] Fix error in documentation --- src/ExchangePlugin/doc/examples/export.py | 4 +++- src/ExchangePlugin/doc/examples/exportSTL.py | 5 +++-- src/ExchangePlugin/doc/exportFeature.rst | 10 +++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/ExchangePlugin/doc/examples/export.py b/src/ExchangePlugin/doc/examples/export.py index feb837252..1f9b7c2b5 100644 --- a/src/ExchangePlugin/doc/examples/export.py +++ b/src/ExchangePlugin/doc/examples/export.py @@ -1,11 +1,13 @@ from salome.shaper import model +import os model.begin() +file_path = os.path.join(os.getenv("DATA_DIR"), "test.step") partSet = model.moduleDocument() Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) -Export_1 = model.exportToFile(Part_1_doc, "/dn48/newgeom/vsv/test.step", +Export_1 = model.exportToFile(Part_1_doc, file_path, [model.selection("SOLID", "Box_1_1")]) model.do() model.end() diff --git a/src/ExchangePlugin/doc/examples/exportSTL.py b/src/ExchangePlugin/doc/examples/exportSTL.py index 01c1aa842..79f1ed517 100644 --- a/src/ExchangePlugin/doc/examples/exportSTL.py +++ b/src/ExchangePlugin/doc/examples/exportSTL.py @@ -1,11 +1,12 @@ from salome.shaper import model model.begin() +file_path = os.path.join(os.getenv("DATA_DIR"), "test.stl") partSet = model.moduleDocument() Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) -Export_1 = model.exportToSTL(Part_1_doc, "/dn48/newgeom/vsv/test.stl", - [model.selection("SOLID", "Box_1_1")],0.0001,0.5,"True","False") +Export_1 = model.exportToSTL(Part_1_doc, file_path, + model.selection("SOLID", "Box_1_1"),0.0001,0.5,True,False) model.do() model.end() diff --git a/src/ExchangePlugin/doc/exportFeature.rst b/src/ExchangePlugin/doc/exportFeature.rst index be71349ab..5867d1bf5 100644 --- a/src/ExchangePlugin/doc/exportFeature.rst +++ b/src/ExchangePlugin/doc/exportFeature.rst @@ -158,11 +158,11 @@ The file name and path can be defined in **Export file** field by direct input :param part: The current part object :param string: The file name - :param selectedShape: An exporting object - :param relative: value of the relative deflection - :param absolute: value of the absolute deflection - :param isRelative: indicate if use deflection relative - :param isASCII: indicate if the file is in ASCII type + :param object: An exporting object + :param real: value of the relative deflection + :param real: value of the absolute deflection + :param boolean: indicate if use deflection relative + :param boolean: indicate if the file is in ASCII type Result """""" -- 2.39.2