I created two arcs on a sketch plane lets name them: arc1 and arc2. I would like to make a face or filling from the area between. So I would like to pass them to the filling function. Here is the code:
from salome.shaper import model model.begin() partSet = model.moduleDocument() part = model.addPart(partSet) part_doc = part.document() Sketch = model.addSketch(part_doc, model.defaultPlane("XOY")) arc1 = Sketch.addArc(0, 0, -1, 0, 1, 0, True) arc2 = Sketch.addArc(0, 0, -1.1, 0, 1.1, 0, True) model.addFilling(part_doc, [Sketch.result()]) #this is not working model.addFilling(part_doc, [arc1.result(), arc2.result()]) #this is not working model.addFilling(part_doc, [model.selection("FACE", Sketch.name() + "/" + arc1.result().name()+"_2"), model.selection("FACE", Sketch.name() + "/" + arc2.result().name()+"_2")]) #this is working but it is ugly, can we do better?
Unfortunatelly, I cannot found a proper and nice way how to pass arc1, arc2 or Sketch variable to a Filling function. I found some workaround, which is the last line, but it is not very nice.
Can you tell me how to do it properly?