hooks:
- id: cmake-format
# - id: cmake-lint
+ - repo: https://github.com/PyCQA/autoflake
+ rev: v2.2.1
+ hooks:
+ - id: autoflake
+ # args: [--remove-all-unused-imports, --in-place] # is dangerous !!!
#
-import os, os.path, sys, re, argparse
-from utils import *
+import os
+import os.path
+import re
+import argparse
+from utils import (
+ ENCODING,
+ OPERATORS,
+ VERBOSE_FLAG,
+ create_warning_generator,
+ fic_readlines,
+ fic_writelines,
+ get_line_no,
+ get_src_path,
+)
#### définition des hooks.
"pattern_AND": "Extra space before )",
},
extra_space_before_opening_paranthesis_in_function_call: {
- "pattern": "whitespace/parens",
"pattern": "Extra space before ( in function call",
},
missing_space_before_opening_parenthesis_in_for: {
fic = open(get_src_path(ficpath), "r")
liste = fic_readlines(fic)
fic.close()
- new_liste = []
if liste[0].find("/ Copyright (C) 2014-20xx CEA/DEN, EDF R&D\n\n") == -1:
newliste = ["// Copyright (C) 2014-20xx CEA/DEN, EDF R&D\n\n"] + liste
newliste = fic_writelines(newliste)
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
#
import sys, pickle
-from killSalome import *
+from killSalome import getPiDict
process = sys.argv[2] # SALOME_Session_Server"
from xml.dom import minidom
import re
import textwrap
-import sys
import os.path
import optparse
Do these even exist???
"""
prot = node.attributes["prot"].value
- id = node.attributes["id"].value
+ node.attributes["id"].value
kind = node.attributes["kind"].value
tmp = node.parentNode.parentNode.parentNode
compdef = tmp.getElementsByTagName("compounddef")[0]
SketchConstraintPerpendicular_1 = Sketch_1.setPerpendicular(
SketchLine_1.result(), SketchLine_2.result()
)
- SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 20)
- SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+ Sketch_1.setRadius(SketchArc_1.results()[1], 20)
+ Sketch_1.setVertical(SketchLine_2.result())
SketchProjection_1 = Sketch_1.addProjection(
model.selection("VERTEX", "PartSet/Origin"), False
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Wire_1, 2)
model.testNbSubResults(Wire_1, [0, 0])
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Filling_1, 1)
model.testNbSubResults(Filling_1, [0])
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Wire_2_1")])
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Face_2.feature())
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, featureToCompositeFeature
aSession = ModelAPI_Session.get()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, featureToCompositeFeature
aSession = ModelAPI_Session.get()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(GroupSubstraction_1, 1)
model.testNbSubResults(GroupSubstraction_1, [0])
# Test of movement of the group of whole result with different results shape types: only one shape type must be in the moved group
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
assert Part_1_doc.size("Groups") == 3 # equal to the number of original groups
# check names of results
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
for group in [Group_3, Group_5, Group_6]:
# The biggest part of the code is python dump of the updated_for_1799.hdf file from this issue.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(GroupAddition_1, 1)
model.testNbSubResults(GroupAddition_1, [0])
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(GroupIntersection_1, 1)
model.testNbSubResults(GroupIntersection_1, [0])
# group with not-touched vertex keeps this vertex.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
# Test that removed vertex, selected in the group makes empty group => invalid one
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
# results, but divided.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
Part_1_doc.moveFeature(Group_3.feature(), Group_2.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
# check group 1: all solids in compound should be selected
Part_1_doc.moveFeature(Group_6.feature(), Group_5.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
Part_1_doc.moveFeature(Group_3.feature(), Group_2.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
# check group 1: solids should be selected
Part_1_doc.moveFeature(Group_3.feature(), Group_2.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
Part_1_doc.moveFeature(Group_4.feature(), Group_3.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
model.begin()
partSet = model.moduleDocument()
Part_1_doc.moveFeature(Group_4.feature(), Group_3.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
# results, but divided.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# results, but divided.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# results, but divided.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# results, but divided.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# Check the initial groups moved to the end contain the corresponding results.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# Check the initial groups moved to the end contain the corresponding results.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# Check the initial groups moved to the end contain the corresponding results.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# Check the initial groups moved to the end contain the corresponding results.
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
# Test move the group in history for selection of a whole result
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
# Test move the group in history for selection of a whole result of a compsolid
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
# Test move the group in history for selection of a whole feature
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
# Test move the group in history for selection of a whole feature that produces compsolid
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
# and don't treated like that by the move to the history algorithm
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
# Check the movement to the end and split: move to intermediate position, no duplicates appeared
-from SketchAPI import *
+from SketchAPI import SketchAPI_Arc
from salome.shaper import model
) # 2 results because initially 2 results were selected
# check names of results
-from ModelAPI import *
+from ModelAPI import modelAPI_Result
res1 = modelAPI_Result(Part_1_doc.object("Groups", 0))
assert res1.data().name() == "GroupResult_1"
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(GroupShape_1, 1)
model.testNbSubShapes(GroupShape_1, GeomAPI_Shape.SOLID, [0])
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
from salome.shaper import model
model.begin()
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(GroupSubstraction_1, 1)
model.testNbSubResults(GroupSubstraction_1, [0])
# check what is exported to GEOM
from salome.geom import geomBuilder
-import os
-import tempfile
aComp = salome.myStudy.FindComponent("GEOM")
iterator = salome.myStudy.NewChildIterator(aComp)
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import sys
import salome
salome.standalone()
###
### SHAPER component
###
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
model.begin()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
import salome
from salome.geom import geomBuilder
-import os
-import tempfile
aComp = salome.myStudy.FindComponent("GEOM")
iterator = salome.myStudy.NewChildIterator(aComp)
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import sys
import salome
salome.standalone()
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
- Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
- Box_2 = model.addBox(Part_1_doc, 20, 20, 20)
+ model.addBox(Part_1_doc, 10, 10, 10)
+ model.addBox(Part_1_doc, 20, 20, 20)
model.do()
# First export to GEOM
## Get the last object published in the GEOM section of the object browser
def getLastGEOMShape():
- sb = salome.myStudy.NewBuilder()
+ salome.myStudy.NewBuilder()
comp = salome.myStudy.FindComponent("GEOM")
obj = None
if comp:
dump.boolean("weak_naming").setValue(False)
model.do()
model.end()
- pass
# Create 2 boxes
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
- Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
- Box_2 = model.addBox(Part_1_doc, 20, 20, 20)
+ model.addBox(Part_1_doc, 10, 10, 10)
+ model.addBox(Part_1_doc, 20, 20, 20)
Translation_1 = model.addTranslation(
Part_1_doc,
[model.selection("SOLID", "Box_1_1")],
# Add a third box
model.begin()
- Box_3 = model.addBox(Part_1_doc, 10, 10, 10)
+ model.addBox(Part_1_doc, 10, 10, 10)
Translation_2 = model.addTranslation(
Part_1_doc,
[model.selection("SOLID", "Box_3_1")],
for f in files:
os.remove(f)
- pass
-
if __name__ == "__main__":
testSeveralExportsToGEOM()
import os
import tempfile
-import sys
import salome
salome.standalone()
## Get the last object published in the GEOM section of the object browser
def getLastGEOMShape():
- sb = salome.myStudy.NewBuilder()
+ salome.myStudy.NewBuilder()
comp = salome.myStudy.FindComponent("GEOM")
obj = None
if comp:
dump.boolean("weak_naming").setValue(False)
model.do()
model.end()
- pass
def testGroupsAndFieldsExportToGEOM():
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
- Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
- Box_2 = model.addBox(Part_1_doc, 20, 20, 20)
+ model.addBox(Part_1_doc, 10, 10, 10)
+ model.addBox(Part_1_doc, 20, 20, 20)
Translation_1 = model.addTranslation(
Part_1_doc,
[model.selection("SOLID", "Box_1_1")],
],
)
Partition_1.result().setName("Partition_1_1")
- Box_3 = model.addBox(Part_1_doc, 10, 10, 10)
+ model.addBox(Part_1_doc, 10, 10, 10)
Translation_2 = model.addTranslation(
Part_1_doc,
[model.selection("SOLID", "Box_3_1")],
for coord in coords:
p = geompy.MakeVertex(*coord)
assert geompy.MinDistance(group, p) < tolerance
- pass
## Check the result imported in GEOM
1.0,
]
- pass
-
def checkDump():
# Dump the salome study (only CORBA modules, SHAPER dump is not in it)
exec(compile(open(dumpFileGeom).read(), dumpFileGeom, "exec"))
# Clean files
- files = [dumpFileGeom, dumpFileShaper]
- pass
+ [dumpFileGeom, dumpFileShaper]
if __name__ == "__main__":
#
import salome
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
from salome.shaper import model
-import os
-import tempfile
-
salome.standalone()
from salome.geom import geomBuilder
## Get the last object published in the GEOM section of the object browser
def getGEOMShape(index):
- sb = salome.myStudy.NewBuilder()
+ salome.myStudy.NewBuilder()
comp = salome.myStudy.FindComponent("GEOM")
obj = None
if comp:
from salome.shaper import model
-import os
-import tempfile
-
salome.standalone()
from salome.geom import geomBuilder
## Get the last object published in the GEOM section of the object browser
def getGEOMShape(index):
- sb = salome.myStudy.NewBuilder()
+ salome.myStudy.NewBuilder()
comp = salome.myStudy.FindComponent("GEOM")
obj = None
if comp:
SketchConstraintEqual_1 = Sketch_1.setEqual(
SketchCircle_2.results()[1], SketchCircle_4.results()[1]
)
- SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_2.results()[1], 20)
- SketchConstraintRadius_2 = Sketch_1.setRadius(SketchCircle_1.results()[1], 25)
+ Sketch_1.setRadius(SketchCircle_2.results()[1], 20)
+ Sketch_1.setRadius(SketchCircle_1.results()[1], 25)
SketchProjection_2 = Sketch_1.addProjection(
model.selection("EDGE", "PartSet/OZ"), False
)
## Get the last object published in the GEOM section of the object browser
def getLastGEOMShape():
- sb = salome.myStudy.NewBuilder()
+ salome.myStudy.NewBuilder()
comp = salome.myStudy.FindComponent("GEOM")
obj = None
if comp:
dump.boolean("weak_naming").setValue(False)
model.do()
model.end()
- pass
# Create 2 boxes
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
- Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
- Box_2 = model.addBox(Part_1_doc, 20, 20, 20)
+ model.addBox(Part_1_doc, 10, 10, 10)
+ model.addBox(Part_1_doc, 20, 20, 20)
Translation_1 = model.addTranslation(
Part_1_doc,
[model.selection("SOLID", "Box_1_1")],
exec(compile(open(dumpFileGeom).read(), dumpFileGeom, "exec"))
# Clean files
- files = [dumpFileGeom, dumpFileShaper]
-
- pass
+ [dumpFileGeom, dumpFileShaper]
if __name__ == "__main__":
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
- Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+ model.addBox(Part_1_doc, 10, 10, 10)
Group_1 = model.addGroup(
Part_1_doc, "Faces", [model.selection("FACE", "Box_1_1/Top")]
)
- Box_2 = model.addBox(Part_1_doc, 20, 20, 20)
+ model.addBox(Part_1_doc, 20, 20, 20)
model.do()
# Export to memory buffer (bytes array)
)
file_stats = os.stat(tmpfilename)
assert len(Export_buff2) == file_stats.st_size
- pass
# Import to GEOM
(imported1, b1, [], [Group_1], []) = geompy.ImportXAOMem(
import salome
import os
-import math
from tempfile import TemporaryDirectory
from ModelAPI import *
# export to XAO file and compare size of file and size of buffer
with tempfile.TemporaryDirectory() as tmpdirname:
tmpfilename = os.path.join(tmpdirname, "Box.xao")
- exported = geompy.ExportXAO(Box_1, [Group_1], [], "XAO", tmpfilename, "")
+ geompy.ExportXAO(Box_1, [Group_1], [], "XAO", tmpfilename, "")
file_stats = os.stat(tmpfilename)
assert len(Export_buff) == file_stats.st_size
- pass
# Import to SHAPER
model.begin()
assert res1 is not None
res1It = GeomAPI_ShapeExplorer(res1.shape(), GeomAPI_Shape.FACE)
assert res1It.more()
- shape1 = res1It.current()
+ res1It.current()
res1It.next()
assert not res1It.more()
p1 = res1.shape().middlePoint()
and math.fabs(p1.y() - 5) <= aTol
and math.fabs(p1.z() - 10) <= aTol
), "({}, {}, {}) != ({}, {}, {})".format(p1.x(), p1.y(), p1.z(), 5, 5, 10)
- pass
def testImportXAOMem_EmptyName():
module_dir = os.getenv("KERNEL_ROOT_DIR")
if module_dir:
run_script = os.path.join(module_dir, "bin", "salome", run_script)
- pass
sys.argv = [run_script]
sys.argv += ["--terminal"]
sys.argv += ["--modules=SHAPER,GEOM,SHAPERSTUDY,SMESH"]
killSalomeWithPort.killMyPort(port)
return
- pass
-
class MyTest(unittest.TestCase):
def testFunction(self):
SalomeSession(sys.argv[1])
- pass
-
unittest.main(argv=sys.argv[:1])
## The constructor.
def __init__(self):
ModelAPI.ModelAPI_Plugin.__init__(self)
- pass
## Creates the feature objects of this plugin by the feature string ID.
def createFeature(self, theFeatureID):
## The constructor.
def __init__(self):
ModelAPI.ModelAPI_Feature.__init__(self)
- pass
@staticmethod
## Export kind. Static.
self.geompy.addToStudyInFather(field, step, step_name)
# Remove the temporary file
os.remove(tmpXAOFile)
- pass
- pass
- pass
## Exports all shapes and groups into the GEOM module.
def execute(self):
self.geompy = geomBuilder.New()
self.exportViaXAO()
-
- pass
import ModelAPI
import ExchangeAPI
import EventsAPI
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
import GeomAlgoAPI
import salome
## The constructor.
def __init__(self):
ModelAPI.ModelAPI_Feature.__init__(self)
- pass
@staticmethod
## Export kind. Static.
self.session.closeAll()
def test_ConstructorWithValues(self):
- point = ConstructionAPI.ConstructionAPI_Point(self.feature, 10, "20", "x + 30")
+ ConstructionAPI.ConstructionAPI_Point(self.feature, 10, "20", "x + 30")
# self.assertEqual(10, point.x().value())
# self.assertEqual("20", point.y().text())
# self.assertEqual("x + 30", point.z().text())
Plane_1 = model.addPlane(Part_1_doc, model.selection("FACE", "Filling_1_1"), 10, False)
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
factory = ModelAPI_Session.get().validators()
assert factory.validate(Plane_1.feature())
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
from ModelAPI import *
from salome.shaper import model
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import sys
import salome
-from ModelAPI import *
+from ModelAPI import modelAPI_ResultConstruction
def assertPoint(aPoint):
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
"""
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Vertex
model.begin()
partSet = model.moduleDocument()
"""
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Vertex
model.begin()
partSet = model.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
model.begin()
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2016-01-04"
)
model.do()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Arc, SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# Initialization of the test
# =========================================================================
import os
-import math
from tempfile import TemporaryDirectory
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
from TestImport import testImport
):
# Import a reference part
aSession.startOperation("Add part")
- aPartFeature = aSession.moduleDocument().addFeature("Part")
+ aSession.moduleDocument().addFeature("Part")
aSession.finishOperation()
aPart = aSession.activeDocument()
def testExportXAO(theFile, theEmptyFormat=False):
type = "XAO"
- format = "XAO"
if theEmptyFormat:
type = "Regular"
- format = ""
# Import a reference part
aSession.startOperation("Add part")
- aPartFeature = aSession.moduleDocument().addFeature("Part")
+ aSession.moduleDocument().addFeature("Part")
aSession.finishOperation()
aPart = aSession.activeDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
def testImport(theType, theFile, theVolume, theArea, theDelta, theErrorExpected=False):
# Create a part for import
aSession.startOperation("Create part for import")
- aPartFeature = aSession.moduleDocument().addFeature("Part")
+ aSession.moduleDocument().addFeature("Part")
aSession.finishOperation()
aPart = aSession.activeDocument()
def testImportXAO():
# Create a part for import
aSession.startOperation("Create part for import")
- aPartFeature = aSession.moduleDocument().addFeature("Part")
+ aSession.moduleDocument().addFeature("Part")
aSession.finishOperation()
aPart = aSession.activeDocument()
app = QApplication([])
from tempfile import TemporaryDirectory
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, StringList, modelAPI_ResultPart, objectToFeature
data_dir = os.path.join(os.path.dirname(inspect.getfile(lambda: None)), "data")
from salome.shaper import model
import os
-import math
model.begin()
partSet = model.moduleDocument()
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
model.begin()
partSet = model.moduleDocument()
proc.kill()
out, err = proc.communicate()
error = "Killed by CPU limit."
- pass
print(err)
assert isOk, "Test failed. {}".format(error)
killSalomeWithPort.killMyPort(port)
return
- pass
-
class MyTest(unittest.TestCase):
def testFunction(self):
SalomeSession(sys.argv[1])
- pass
-
unittest.main(argv=sys.argv[:1])
assert Pipe_2.feature().error() == ""
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Pipe_2, 1)
model.testNbSubResults(Pipe_2, [0])
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Extrusion_1, 1)
model.testNbSubResults(Extrusion_1, [3])
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Pipe_1, 1)
model.testNbSubResults(Pipe_1, [0])
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Pipe_1, 1)
model.testNbSubResults(Pipe_1, [0])
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
from salome.shaper import model
model.begin()
model.do()
model.end()
-from ModelAPI import *
+from ModelAPI import modelAPI_ResultBody
PartitionFeature = Partition_1.feature()
assert len(PartitionFeature.results()) == 1
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Split_1, 1)
model.testNbSubResults(Split_1, [5])
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Extrusion_1, 1)
model.testNbSubResults(Extrusion_1, [0])
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
for aGroupIter in [Group_1, Group_2]:
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
for aGroupIter in [Group_1, Group_2, Group_3]:
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that resulting group selection is valid and names are different
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that partition constructed correctly
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Partition_2.feature())
model.end()
# check that resulting group selection is valid, names exist and different
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that all groups are correct
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
model.end()
# check that for the linear copy direction the elliptical edge is invalid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert not aFactory.validate(LinearCopy_1.feature())
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Circle, SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
#
from GeomAPI import GeomAPI_Pnt
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
model.end()
# check the extrusion-cut result is correct
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(ExtrusionCut_1.feature())
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(LinearCopy_2, 16)
model.testNbSubResults(LinearCopy_2, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(AngularCopy_1, 4)
model.testNbSubResults(AngularCopy_1, [0, 0, 0, 0])
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Part_1, 1)
model.testNbSubResults(Part_1, [0])
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# =========================================================================
-import os
import math
from ModelAPI import *
# =========================================================================
-import os
-import math
-
from ModelAPI import *
from GeomAPI import *
from salome.shaper import model
Part_1_doc.moveFeature(Group_1.feature(), Copy_1.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
Part_1_doc.moveFeature(Group_1.feature(), Copy_1.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
Part_1_doc.moveFeature(Group_1.feature(), Fillet_1.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
# Checks selection of the sub-shapes move to the end with combination of 2 Copy features in history
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
assert Copy_1.feature().results().size() == 2
-from ModelAPI import *
+from ModelAPI import modelAPI_ResultBody
assert Copy_1.feature().results()[0].data().name() == "Extrusion_1_1_1"
assert (
Copy_2 = model.addCopy(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], 1)
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert not aFactory.validate(Copy_1.feature())
model.testHaveNamingSubshapes(Defeaturing_1, model, Part_1_doc)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Defeaturing_1, 1)
model.testNbSubResults(Defeaturing_1, [4])
model.testHaveNamingSubshapes(Defeaturing_1, model, Part_1_doc)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Defeaturing_1, 1)
model.testNbSubResults(Defeaturing_1, [2])
model.testHaveNamingSubshapes(Defeaturing_1, model, Part_1_doc)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Defeaturing_1, 1)
model.testNbSubResults(Defeaturing_1, [2])
model.testHaveNamingSubshapes(Defeaturing_1, model, Part_1_doc)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Defeaturing_1, 1)
model.testNbSubResults(Defeaturing_1, [0])
model.testHaveNamingSubshapes(Defeaturing_1, model, Part_1_doc)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Defeaturing_1, 1)
model.testNbSubResults(Defeaturing_1, [0])
model.testHaveNamingSubshapes(Defeaturing_1, model, Part_1_doc)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Defeaturing_1, 1)
model.testNbSubResults(Defeaturing_1, [0])
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
# Create document
model.begin()
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
- Import_1 = model.addImport(Part_1_doc, file_path)
+ model.addImport(Part_1_doc, file_path)
model.do()
myDelta = 1e-6
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Intersection_1, 1)
model.testNbSubResults(Intersection_1, [6])
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Intersection_1, 1)
model.testNbSubResults(Intersection_1, [8])
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Intersection_1, 1)
model.testNbSubResults(Intersection_1, [2])
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Intersection_1, 1)
model.testNbSubResults(Intersection_1, [3])
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, modelAPI_ResultPart
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# =========================================================================
-import os
-import math
-
-from ModelAPI import *
+from ModelAPI import modelAPI_ResultConstruction
from salome.shaper import model
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
model.end()
# check all groups are valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
assert Part_1_doc.size("Groups") == 3
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
#
from GeomAPI import GeomAPI_Shape
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
#
from GeomAPI import GeomAPI_Shape
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
model.begin()
model.do()
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
# check middle point of the placed solid
shape = Placement_2.results()[0].resultSubShapePair()[0].shape()
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
model.do()
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, featureToCompositeFeature
aSession = ModelAPI_Session.get()
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
"""
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
- Import_1 = model.addImport(Part_1_doc, file_path)
+ model.addImport(Part_1_doc, file_path)
model.do()
myDelta = 1e-6
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_ResultBody, ModelAPI_ResultConstruction, removeResults
model.begin()
partSet = model.moduleDocument()
model.end()
# check the number of bodies = 1, number of construction = 0
-from ModelAPI import *
+from ModelAPI import ModelAPI_ResultBody, ModelAPI_ResultConstruction
assert Part_1.document().size(ModelAPI_ResultConstruction.group()) == 0
assert Part_1.document().size(ModelAPI_ResultBody.group()) == 1
model.end()
# check the number of parts = 0
-from ModelAPI import *
+from ModelAPI import ModelAPI_ResultPart
assert Part_1.document().size(ModelAPI_ResultPart.group()) == 0
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
__updated__ = "2014-12-16"
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, featureToCompositeFeature
aSession = ModelAPI_Session.get()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Ax1, GeomAPI_Dir, GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Ax1, GeomAPI_Dir, GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Ax1, GeomAPI_Dir, GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Ax1, GeomAPI_Dir, GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
-import sys
import salome
salome.salome_init()
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
from GeomAPI import *
from SketchAPI import *
-import math
model.begin()
partSet = model.moduleDocument()
from GeomAPI import *
from SketchAPI import *
-import math
model.begin()
partSet = model.moduleDocument()
from GeomAPI import *
from SketchAPI import *
-import math
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt, GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
from GeomDataAPI import *
from GeomAlgoAPI import *
from GeomAPI import *
-import math
aSession = ModelAPI_Session.get()
aDocument = aSession.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
from salome.shaper import model
-import os
model.begin()
partSet = model.moduleDocument()
from salome.shaper import model
-import os
model.begin()
partSet = model.moduleDocument()
from salome.shaper import model
-import os
### Create a Box
model.begin()
from salome.shaper import model
-import os
model.begin()
Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
-import os
from salome.shaper import model
model.begin()
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
-import os
from salome.shaper import model
model.begin()
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.testNbResults(Fuse_1, 1)
model.testNbSubResults(Fuse_1, [2])
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
model.begin()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
model.begin()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
model.begin()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
model.begin()
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
Reference = {}
# Faces are not applicable
)
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
Reference = {}
# Faces are not applicable
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt
import math
TOLERANCE = 1.0e-7
import math
-from GeomAPI import *
+from GeomAPI import (
+ GeomAPI_Ax1,
+ GeomAPI_Ax2,
+ GeomAPI_Ax3,
+ GeomAPI_Dir,
+ GeomAPI_Pnt,
+ GeomAPI_Pnt2d,
+)
TOLERANCE = 1.0e-7
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import math
from GeomAlgoAPI import GeomAlgoAPI_Circ2dBuilder as circBuilder
from GeomAlgoAPI import GeomAlgoAPI_CurveBuilder as curveBuilder
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import math
-from GeomAPI import *
+from GeomAPI import GeomAPI_Dir2d, GeomAPI_Ellipse2d, GeomAPI_Pnt2d
TOLERANCE = 1.0e-7
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import math
-from GeomAPI import *
+from GeomAPI import GeomAPI_Dir2d, GeomAPI_Lin, GeomAPI_Lin2d, GeomAPI_Pnt2d
TOLERANCE = 1.0e-7
from salome.shaper import model
-import math
TOLERANCE = 1.0e-7
# ===============================================================================
# Test GeomDataAPI static methods
# ===============================================================================
-from GeomDataAPI import *
+from GeomDataAPI import GeomDataAPI_Dir, GeomDataAPI_Point, GeomDataAPI_Point2D
assert GeomDataAPI_Point.typeId() == "Point"
assert GeomDataAPI_Dir.typeId() == "Dir"
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Cut_1, 1)
model.testNbSubResults(Cut_1, [3])
model.do()
# check the result validity
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(ExtrusionCut_2.feature())
)
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Shell_2.feature())
)
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Sketch_2.feature())
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
model.end()
# check the fillet validity
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Fillet_1.feature())
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
model.end()
# check that remove sub-shapes contains correct selection
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Remove_SubShapes_1.feature())
model.end()
# check that all groups are correct
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
]
Solid_1 = model.addSolid(Part_1_doc, Solid_1_objects)
# check that resulting build-solid feature is invalid: only one not-closed face is used
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Solid_1.feature()) == False
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Arc, SketchAPI_Line
from salome.shaper import model
model.end()
# check that resulting group selection is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Group_1.feature())
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
"""
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import FeatureList
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
model.end()
# check the result validity
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Edge_1.feature())
# ===============================================================================
# Test ModelAPI static methods
# ===============================================================================
-from ModelAPI import *
+from ModelAPI import (
+ ModelAPI_AttributeDocRef,
+ ModelAPI_AttributeDouble,
+ ModelAPI_AttributeRefAttr,
+ ModelAPI_AttributeRefList,
+ ModelAPI_AttributeReference,
+ ModelAPI_Feature,
+)
assert ModelAPI_Feature.group() == "Features"
assert ModelAPI_AttributeDocRef.typeId() == "DocRef"
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# produced from the scetch, then change the number of sketch contours, so, anytway all extrusions must
# still be selected in the Cut Boolean oepration
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
Test checks adding sketch into a folder
"""
-from ModelAPI import *
+from ModelAPI import FeatureList, ModelAPI_Session
from salome.shaper import model
model.begin()
model.end()
# check that placement is valid
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Placement_1.feature())
model.end()
# check that sketch_3 and extrusion are updated well
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(ExtrusionCut_2.feature())
# =========================================================================
# Initialization of the test
# =========================================================================
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
__updated__ = "2016-20-16"
from salome.shaper import model
from tempfile import TemporaryDirectory
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, StringList
model.begin()
partSet = model.moduleDocument()
from salome.shaper import model
from tempfile import TemporaryDirectory
-from ModelAPI import *
+from ModelAPI import (
+ ModelAPI_Session,
+ StringList,
+ modelAPI_ResultField,
+ modelAPI_ResultPart,
+ objectToFeature,
+)
model.begin()
partSet = model.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
from salome.shaper import model
from tempfile import TemporaryDirectory
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, StringList, modelAPI_ResultPart, objectToFeature
model.begin()
partSet = model.moduleDocument()
EpVoiles.setValue(0.18)
model.do()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session, objectToResult
aFactory = ModelAPI_Session.get().validators()
for i in range(Part_1_doc.size("Groups")):
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from GeomAPI import *
+from GeomAPI import GeomAPI_Ax3, GeomAPI_Dir, GeomAPI_Pnt
from salome.shaper import model
model.do()
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert aFactory.validate(Sketch_3.feature())
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(ExtrusionCut_1, 1)
model.testNbSubResults(ExtrusionCut_1, [0])
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.testNbResults(Part_1, 1)
model.testNbSubResults(Part_1, [0])
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
class DoubleTestCase(unittest.TestCase):
def test_create_default(self):
- default = ModelHighAPI.ModelHighAPI_Double()
+ ModelHighAPI.ModelHighAPI_Double()
def test_create_from_double(self):
- from_double = ModelHighAPI.ModelHighAPI_Double(100.0)
+ ModelHighAPI.ModelHighAPI_Double(100.0)
def test_create_from_text(self):
- from_string = ModelHighAPI.ModelHighAPI_Double("200 + x")
+ ModelHighAPI.ModelHighAPI_Double("200 + x")
if __name__ == "__main__":
class IntegerTestCase(unittest.TestCase):
def test_create_default(self):
- default = ModelHighAPI.ModelHighAPI_Integer()
+ ModelHighAPI.ModelHighAPI_Integer()
def test_create_from_integer(self):
- from_integer = ModelHighAPI.ModelHighAPI_Integer(100)
+ ModelHighAPI.ModelHighAPI_Integer(100)
def test_create_from_text(self):
- from_string = ModelHighAPI.ModelHighAPI_Integer("200 + x")
+ ModelHighAPI.ModelHighAPI_Integer("200 + x")
if __name__ == "__main__":
# due to the scenario, change the active document
model.begin()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
aSession.setActiveDocument(partSet, False)
# =========================================================================
from GeomDataAPI import *
from ModelAPI import *
-import math
import unittest
from salome.shaper import model
# =========================================================================
from GeomDataAPI import *
from ModelAPI import *
-import math
import unittest
from salome.shaper import model
# =========================================================================
# Initialization of the test
# =========================================================================
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
__updated__ = "2018-12-05"
FeaturesAddExtrusionFixture.setUp(self)
# Create extrusion
sketch = model.addSketch(self.part, model.defaultPlane("XOY"))
- circle = sketch.addCircle(0, 0, 10)
+ sketch.addCircle(0, 0, 10)
model.do()
base = sketch.selectFace()
class FeaturesAddExtrusionTestCase(FeaturesAddExtrusionFixture):
def test_add_extrusion_by_face_and_size(self):
sketch = model.addSketch(self.part, model.defaultPlane("XOY"))
- circle = sketch.addCircle(0, 0, 10)
+ sketch.addCircle(0, 0, 10)
model.do()
base = sketch.selectFace()
def test_add_extrusion_by_face_and_planes(self):
# base
base_sketch = model.addSketch(self.part, model.defaultPlane("XOY"))
- base_circle = base_sketch.addCircle(0, 0, 10)
+ base_sketch.addCircle(0, 0, 10)
# to
to_plane = model.defaultPlane("XOY")
to_plane.origin().setZ(10)
to_sketch = model.addSketch(self.part, to_plane)
- to_circle = to_sketch.addCircle(0, 0, 10)
+ to_sketch.addCircle(0, 0, 10)
# from
from_plane = model.defaultPlane("XOY")
from_plane.origin().setZ(-10)
from_sketch = model.addSketch(self.part, from_plane)
- from_circle = from_sketch.addCircle(0, 0, 10)
+ from_sketch.addCircle(0, 0, 10)
model.do()
to_plane = model.defaultPlane("XOY")
to_plane.origin().setZ(10)
to_sketch = model.addSketch(self.part, to_plane)
- to_circle = to_sketch.addCircle(0, 0, 10)
+ to_sketch.addCircle(0, 0, 10)
# from
from_plane = model.defaultPlane("XOY")
from_plane.origin().setZ(-10)
from_sketch = model.addSketch(self.part, from_plane)
- from_circle = from_sketch.addCircle(0, 0, 10)
+ from_sketch.addCircle(0, 0, 10)
model.do()
# Create revolution
# base
base_sketch = model.addSketch(self.part, model.defaultPlane("XOY"))
- circle = base_sketch.addCircle(0, 0, 10)
+ base_sketch.addCircle(0, 0, 10)
model.do()
def test_add_revolution_by_face_and_angles(self):
# base
base_sketch = model.addSketch(self.part, model.defaultPlane("XOY"))
- circle = base_sketch.addCircle(0, 0, 10)
+ base_sketch.addCircle(0, 0, 10)
model.do()
def test_add_revolution_by_face_and_planes(self):
# base
base_sketch = model.addSketch(self.part, model.defaultPlane("XOY"))
- base_circle = base_sketch.addCircle(0, 0, 10)
+ base_sketch.addCircle(0, 0, 10)
# to
to_plane = model.defaultPlane("XOY")
to_plane.origin().setZ(10)
to_sketch = model.addSketch(self.part, to_plane)
- to_circle = to_sketch.addCircle(0, 0, 10)
+ to_sketch.addCircle(0, 0, 10)
# from
from_plane = model.defaultPlane("XOY")
from_plane.origin().setZ(-10)
from_sketch = model.addSketch(self.part, from_plane)
- from_circle = from_sketch.addCircle(0, 0, 10)
+ from_sketch.addCircle(0, 0, 10)
model.do()
def test_revolution_set_planes_and_offsets(self):
# base
base_sketch = model.addSketch(self.part, model.defaultPlane("XOY"))
- base_circle = base_sketch.addCircle(0, 0, 10)
+ base_sketch.addCircle(0, 0, 10)
# to
to_plane = model.defaultPlane("XOY")
to_plane.origin().setZ(10)
to_sketch = model.addSketch(self.part, to_plane)
- to_circle = to_sketch.addCircle(0, 0, 10)
+ to_sketch.addCircle(0, 0, 10)
# from
from_plane = model.defaultPlane("XOY")
from_plane.origin().setZ(-10)
from_sketch = model.addSketch(self.part, from_plane)
- from_circle = from_sketch.addCircle(0, 0, 10)
+ from_sketch.addCircle(0, 0, 10)
model.do()
from salome.shaper import model
from salome.shaper import geom
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
model.begin()
partSet = model.moduleDocument()
import unittest
from salome.shaper import model
from TestSketcher import SketcherTestCase
-from ModelAPI import *
+from ModelAPI import ModelAPI_Feature
from GeomDataAPI import geomDataAPI_Point2D
-import logging
-
class SketcherAddLine(SketcherTestCase):
def setUp(self):
# START DEBUG PURPOSES
# Should be removed
-import os
import ModelAPI
# END DEBUG PURPOSES
if self.myEngine == None:
import SHAPERSTUDY_utils
- aComponent = SHAPERSTUDY_utils.findOrCreateComponent()
+ SHAPERSTUDY_utils.findOrCreateComponent()
self.myEngine = SHAPERSTUDY_utils.getEngine()
if self.myEngine != 1:
self.myEngine.StoreVariableName(theEntry, theVarName)
except:
self.myEngine = 1 # invalid access
- pass
# Instance of dumper
from salome.shaper import model
from salome.shaper import geom
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
def checkRectangle(lines, center, corner, tolerance=1.0e-7):
from salome.shaper import model
from salome.shaper import geom
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
import os
from salome.shaper import model
from salome.shaper import geom
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
import os
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
import os
#
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
import os
import os
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
import os
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
ModelAPI.ModelAPI_Plugin.__init__(self)
aSession = ModelAPI.ModelAPI_Session.get()
aSession.registerPlugin(self)
- pass
def createFeature(self, theFeatureID):
"""Override ModelAPI_Plugin.createFeature()"""
salome.standalone()
salome.salome_init()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aSession = ModelAPI_Session.get()
salome.salome_init()
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
salome.salome_init()
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
from salome.shaper import model
import ModelAPI
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape, GeomAPI_ShapeExplorer
import numpy as np
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
point = geom.Pnt2d(10.0, 10.0)
aPoint = self.sketch.addPoint(point)
aCircle = self.sketch.addCircle(point, 10.0)
- aCoincidence = self.sketch.setCoincident(aPoint.coordinates(), aCircle.center())
+ self.sketch.setCoincident(aPoint.coordinates(), aCircle.center())
model.do()
self.checkPoint(aPoint.coordinates(), point)
self.checkPoint(aCircle.center(), point)
nbMoves = 0
# Two vertical constraints: due to #1889 the sketch is invalid now, not overconstrained
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
aFactory = ModelAPI_Session.get().validators()
assert not aFactory.validate(SketchConstraintVertical_10.feature())
model.end()
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
validators = ModelAPI_Session.get().validators()
assert validators.validate(SketchProjection_1.feature())
Test case for issue #2018 "After split auxiliary circle edit of axiliary state of arc is wrong"
"""
-from ModelAPI import *
+from ModelAPI import FeatureSet, removeFeaturesAndReferences
from ModelAPI import ModelAPI_Feature
from ModelAPI import FeatureList
from ModelGeomAlgo import ModelGeomAlgo_Point2D
Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
lineStart = [26, 53]
"""
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
model.begin()
partSet = model.moduleDocument()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from ModelAPI import *
+from ModelAPI import ModelAPI_Session
from salome.shaper import model
model.begin()
"""
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
model.begin()
partSet = model.moduleDocument()
Test case for issue #2341 "SIGSEGV when trying to move a point of a projected axis"
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
Test case for issue #2427 "error in sketch solver"
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
Test case for issue #2481 "Application error when create fillet"
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
Test case for issue #2654 "crash with a split"
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
"""
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Constraint
model.begin()
partSet = model.moduleDocument()
"""
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
model.begin()
partSet = model.moduleDocument()
Test case for issue #2894 "SIGSEGV in trim after double-click"
"""
-from SketchAPI import *
+from SketchAPI import GeomAPI, SketchAPI_Point
from salome.shaper import model
#
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt2d
import math
ELL_CENTER_X = 10
from salome.shaper import model
from salome.shaper import geom
-from SketchAPI import *
+from SketchAPI import SketchAPI_Circle
model.begin()
partSet = model.moduleDocument()
from GeomAPI import *
from GeomDataAPI import *
from ModelAPI import *
-import math
from salome.shaper import model
aSession = ModelAPI_Session.get()
"""
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt2d
import random
TOLERANCE = 1.0e-7
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
import math
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
import math
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
import math
from GeomDataAPI import *
from ModelAPI import *
-import math
from salome.shaper import model
from GeomDataAPI import *
from ModelAPI import *
-import math
from salome.shaper import model
from GeomDataAPI import *
from ModelAPI import *
-import math
from salome.shaper import model
from GeomDataAPI import *
from ModelAPI import *
-import math
from salome.shaper import model
from GeomDataAPI import *
from ModelAPI import *
-import math
from salome.shaper import model
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
REF_VOLUME = 25018.7130187615
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
REF_VOLUME = 25018.7130187615
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
REF_VOLUME = 25018.7130187615
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
REF_VOLUME = 25018.7130187615
"""
import unittest
-import math
from salome.shaper import model
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
import math
TOLERANCE = 1.0e-7
import math
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Constraint
__updated__ = "2019-10-22"
TOLERANCE = 1.0e-6
import math
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Constraint
__updated__ = "2019-10-22"
TOLERANCE = 1.0e-6
import math
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Constraint, SketchAPI_SketchEntity
__updated__ = "2019-10-22"
TOLERANCE = 1.0e-6
# of the test
# =========================================================================
from salome.shaper import model
-from ModelAPI import *
-import math
+from ModelAPI import ModelAPI_Session
# =========================================================================
# Creation of a part
from salome.shaper import model
import math
-from GeomAPI import *
+from GeomAPI import GeomAPI_Pnt
TOLERANCE = 1.0e-7
"""
import unittest
-import math
from salome.shaper import model
"""
import unittest
-import math
from salome.shaper import model
from ModelAPI import *
from SketchAPI import SketchAPI_Sketch
from salome.shaper import model
-import math
__updated__ = "2017-04-06"
from ModelAPI import *
from SketchAPI import SketchAPI_Sketch
from salome.shaper import model
-import math
__updated__ = "2017-03-22"
anEllipseFeature = model.lastSubFeature(self.mySketch, "SketchEllipticArc")
self.myEllipse1 = SketchAPI_EllipticArc(anEllipseFeature)
- anEllipse = anEllipseFeature.lastResult().shape().edge().ellipse()
+ anEllipseFeature.lastResult().shape().edge().ellipse()
self.checkPointOnLine(self.myEllipse1.startPoint(), aLine)
# check number of features
model.testNbSubFeatures(self.mySketch, "SketchPoint", 7)
anEllipseFeature = model.lastSubFeature(self.mySketch, "SketchEllipticArc")
self.myEllipse1 = SketchAPI_EllipticArc(anEllipseFeature)
- anEllipse = anEllipseFeature.lastResult().shape().edge().ellipse()
+ anEllipseFeature.lastResult().shape().edge().ellipse()
self.checkPointOnLine(self.myEllipse1.endPoint(), aLine)
# check number of features
model.testNbSubFeatures(self.mySketch, "SketchPoint", 7)
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
import math
TOLERANCE = 1.0e-5
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
import math
TOLERANCE = 1.0e-5
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
import math
TOLERANCE = 1.0e-5
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
import math
TOLERANCE = 1.0e-5
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
import math
TOLERANCE = 1.0e-5
Unit test of SketchPlugin_IntersectionPoint class
"""
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
import unittest
import math
from GeomAPI import GeomAPI_Pnt2d
-from SketchAPI import *
+from SketchAPI import SketchAPI_EllipticArc
from salome.shaper import model
__updated__ = "2019-10-15"
def test_move_line_start_fixed(self):
"""Test 4. Movement of a line, which start point is fixed"""
- fixed = self.mySketch.setFixed(self.myLine.startPoint())
+ self.mySketch.setFixed(self.myLine.startPoint())
self.myDOF -= 2
model.do()
self.checkDOF()
def test_move_line_end_fixed(self):
"""Test 5. Movement of a line, which end point is fixed"""
- fixed = self.mySketch.setFixed(self.myLine.endPoint())
+ self.mySketch.setFixed(self.myLine.endPoint())
self.myDOF -= 2
model.do()
self.checkDOF()
def test_move_line_fully_fixed(self):
"""Test 6. Movement of fully fixed line (should not change its coordinates)"""
- fixed = self.mySketch.setFixed(self.myLine.defaultResult())
+ self.mySketch.setFixed(self.myLine.defaultResult())
self.myDOF -= 4
model.do()
"""Test 4. Movement of fully fixed point (should not be changed)"""
coord = [self.myPointCoordinates.x(), self.myPointCoordinates.y()]
- fixed = self.mySketch.setFixed(self.myPoint.result())
+ self.mySketch.setFixed(self.myPoint.result())
self.myDOF -= 2
model.do()
self.checkDOF()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
from salome.shaper import model
def checkOffset(theListIn, theListOut, theOutToIn, theDist, isReversed, nbIn, nbOut):
TOL = 6.0e-5
- aNbIn = theListIn.size()
+ theListIn.size()
aNbOut = theListOut.size()
# print("**checkOffset**")
#
from salome.shaper import model
-from SketchAPI import *
+from SketchAPI import SketchAPI_Point
model.begin()
partSet = model.moduleDocument()
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_BSpline, GeomAPI_Curve, GeomAPI_Pnt
import math
TOLERANCE = 1.0e-7
model.end()
-from GeomAPI import *
+from GeomAPI import GeomAPI_BSpline, GeomAPI_Curve, GeomAPI_Pnt
import math
TOLERANCE = 1.0e-7
"""
from salome.shaper import model
-from GeomAPI import *
+from GeomAPI import GeomAPI_Shape
# ==============================================================================
# Auxiliary functions
from GeomDataAPI import *
from ModelAPI import *
from GeomAPI import *
-import math
from salome.shaper import model
# =========================================================================
"""
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import FeatureSet, removeFeaturesAndReferences
def assertNbSubs(
"""
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import FeatureSet, removeFeaturesAndReferences
def assertNbSubs(
"""
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import FeatureSet, removeFeaturesAndReferences
def assertNbSubs(
"""
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import FeatureSet, removeFeaturesAndReferences
def assertNbSubs(
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
from GeomDataAPI import *
from ModelAPI import *
import collections
-import math
import random
from salome.shaper import model
-from ModelAPI import *
+from ModelAPI import (
+ FeatureList,
+ FeatureSet,
+ featureToCompositeFeature,
+ removeFeaturesAndReferences,
+)
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
from GeomDataAPI import *
from ModelGeomAlgo import ModelGeomAlgo_Point2D
from salome.shaper import geom
-import math
TOLERANCE = 1.0e-7
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import salome, salome_utils, os, sys
+import salome
+import salome_utils
+import sys
import SalomePyQt
import unittest
-import subprocess
-import ModelHighAPI, ModelAPI, PartSetAPI
+import ModelHighAPI
+import ModelAPI
+import PartSetAPI
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
def setUp(self):
salome.standalone()
salome.salome_init(self.testfile, embedded=1, forced=True)
- myStudyName = salome.myStudy._get_Name()
+ salome.myStudy._get_Name()
self.session = salome.naming_service.Resolve("/Kernel/Session")
self.session.emitMessage("connect_to_study")
if __name__ == "__main__":
import subprocess
- from time import sleep
import sys, os
import tempfile
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from SketchAPI import *
+from SketchAPI import SketchAPI_Line, SketchAPI_Point
from GeomAPI import GeomAPI_Shape
from salome.shaper import model
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import filecmp
import os
import shutil
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import re
-
def main():
source(findFile("scripts", "common.py"))