Build face from edges or wires.
(*s: Shape)
| 5982 | |
| 5983 | @multidispatch |
| 5984 | def face(*s: Shape) -> Face: |
| 5985 | """ |
| 5986 | Build face from edges or wires. |
| 5987 | """ |
| 5988 | |
| 5989 | from OCP.BOPAlgo import BOPAlgo_Tools |
| 5990 | |
| 5991 | ws = Compound.makeCompound(w for el in s for w in _get_wires(el)).wrapped |
| 5992 | rv = TopoDS_Compound() |
| 5993 | |
| 5994 | status = BOPAlgo_Tools.WiresToFaces_s(ws, rv) |
| 5995 | |
| 5996 | if not status: |
| 5997 | raise ValueError("Face construction failed") |
| 5998 | |
| 5999 | return _get_one(_compound_or_shape(rv), "Face") |
| 6000 | |
| 6001 | |
| 6002 | @multidispatch |