Remove Extra Edges

 1#!/usr/bin/env python
 2
 3import salome
 4salome.salome_init()
 5
 6from salome.shaper import model
 7
 8model.begin()
 9partSet = model.moduleDocument()
10
11### Create Part
12Part_1 = model.addPart(partSet)
13Part_1_doc = Part_1.document()
14
15### Create Point
16Point_2 = model.addPoint(Part_1_doc, 0, 0, 10)
17
18### Create Sphere
19Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "Point_1"), 10)
20
21### Create Box
22Box_1 = model.addBox(Part_1_doc, 0, 0, -5, 20, 20, 20)
23
24### Create Cut
25Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Sphere_1_1")], [model.selection("SOLID", "Box_1_1")], keepSubResults = True)
26
27### Create RemoveExtraEdges
28RemoveExtraEdges_1 = model.addRemoveExtraEdges(Part_1_doc, model.selection("SOLID", "Cut_1_1"), True)
29
30model.end()

Download this script