X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FTest%2FTest1064.py;h=b404f65a0c3e0f3a42485e1ac5b291b34de46856;hb=b7f954c1e5b9da1fc425908ac4edfebb513ebf23;hp=d94163a191e231dab4433599a4676e5ada4a8c41;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/ModelAPI/Test/Test1064.py b/src/ModelAPI/Test/Test1064.py index d94163a19..b404f65a0 100644 --- a/src/ModelAPI/Test/Test1064.py +++ b/src/ModelAPI/Test/Test1064.py @@ -1,22 +1,21 @@ -## Copyright (C) 2014-2017 CEA/DEN, EDF R&D -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -## -## See http:##www.salome-platform.org/ or -## email : webmaster.salome@opencascade.com -## +# Copyright (C) 2014-2019 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# """ Test1064.py @@ -71,14 +70,10 @@ aPart = aSession.activeDocument() #========================================================================= # Make extrusion on triangle #========================================================================= -aSketchResult = aSketchFeature.firstResult() -aSketchEdges = modelAPI_ResultConstruction(aSketchResult).shape() -aSketchFaces = ShapeList() -GeomAlgoAPI_SketchBuilder.createFaces( - origin.pnt(), dirx.dir(), norm.dir(), aSketchEdges, aSketchFaces) +aSketchResult = modelAPI_ResultConstruction(aSketchFeature.firstResult()) aSession.startOperation() anExtrusionFt = aPart.addFeature("Extrusion") -anExtrusionFt.selectionList("base").append(aSketchResult, aSketchFaces[0]) +anExtrusionFt.selectionList("base").append(aSketchResult, aSketchResult.face(0)) anExtrusionFt.string("CreationMethod").setValue("BySizes") anExtrusionFt.real("to_size").setValue(50) anExtrusionFt.real("from_size").setValue(0) @@ -93,7 +88,7 @@ aSession.setActiveDocument(aPartSet) aPlane = aPartSet.addFeature("Plane") aPlane.string("creation_method").setValue("by_other_plane") aPlane.string("by_other_plane_option").setValue("by_distance_from_other") -aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_1") +aPlane.selection("plane").selectSubShape("face", "Part_1/_weak_name_5_Extrusion_1_1") aPlane.real("distance").setValue(0.001) aPlane.boolean("reverse").setValue(False) aSession.finishOperation()