]> SALOME platform Git repositories - modules/shaper.git/blob - src/FeaturesPlugin/Test/TestUnion4CurvedFaces_2.py
Salome HOME
2519dd469b9f186b555d37c29965d70c653753b8
[modules/shaper.git] / src / FeaturesPlugin / Test / TestUnion4CurvedFaces_2.py
1 ## version 2.1 of the License, or (at your option) any later version.
2 ##
3 ## This library is distributed in the hope that it will be useful,
4 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
5 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6 ## Lesser General Public License for more details.
7 ##
8 ## You should have received a copy of the GNU Lesser General Public
9 ## License along with this library; if not, write to the Free Software
10 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
11 ##
12 ## See http:##www.salome-platform.org/ or
13 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
14 ##
15
16 from salome.shaper import model
17
18 model.begin()
19 partSet = model.moduleDocument()
20 Part_1 = model.addPart(partSet)
21 Part_1_doc = Part_1.document()
22 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
23 SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
24 SketchPoint_1 = SketchProjection_1.createdFeature()
25 SketchArc_1 = Sketch_1.addArc(0, 0, 14.26163338647443, -11.82948087533604, 14.26163338647443, 11.82948087533609, False)
26 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchArc_1.center())
27 SketchLine_1 = Sketch_1.addLine(14.26163338647443, -11.82948087533604, 14.26163338647443, 11.82948087533609)
28 SketchLine_1.setAuxiliary(True)
29 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_1.startPoint())
30 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_1.endPoint())
31 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
32 model.do()
33 Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchArc_1_2")])
34 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "PartSet/OY"), 360, 0)
35 Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "PartSet/YOZ"), model.selection("FACE", "PartSet/XOZ"), model.selection("FACE", "PartSet/XOY"), model.selection("FACE", "Revolution_1_1")])
36 Union_1 = model.addUnion(Part_1_doc, [model.selection("FACE", "Partition_1_1_1"), model.selection("FACE", "Partition_1_1_2"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4")])
37 model.testHaveNamingSubshapes(Union_1,model,Part_1_doc)
38 model.do()
39 model.end()