Returns a surface enclosed by a closed polygon defined by 'edges' and 'constraints'. :param edges: edges :type edges: list of edges or wires :param constraints: constraints :type constraints: list of points or edges :param continuity: OCC.Core.GeomAb
(
cls,
edges: Iterable[Edge | Wire],
constraints: Iterable[Edge | Wire | VectorLike | gp_Pnt],
continuity: GeomAbs_Shape = GeomAbs_C0,
degree: int = 3,
nbPtsOnCur: int = 15,
nbIter: int = 2,
anisotropy: bool = False,
tol2d: float = 0.00001,
tol3d: float = 0.0001,
tolAng: float = 0.01,
tolCurv: float = 0.1,
maxDeg: int = 8,
maxSegments: int = 9,
)
| 3498 | |
| 3499 | @classmethod |
| 3500 | def makeNSidedSurface( |
| 3501 | cls, |
| 3502 | edges: Iterable[Edge | Wire], |
| 3503 | constraints: Iterable[Edge | Wire | VectorLike | gp_Pnt], |
| 3504 | continuity: GeomAbs_Shape = GeomAbs_C0, |
| 3505 | degree: int = 3, |
| 3506 | nbPtsOnCur: int = 15, |
| 3507 | nbIter: int = 2, |
| 3508 | anisotropy: bool = False, |
| 3509 | tol2d: float = 0.00001, |
| 3510 | tol3d: float = 0.0001, |
| 3511 | tolAng: float = 0.01, |
| 3512 | tolCurv: float = 0.1, |
| 3513 | maxDeg: int = 8, |
| 3514 | maxSegments: int = 9, |
| 3515 | ) -> Face: |
| 3516 | """ |
| 3517 | Returns a surface enclosed by a closed polygon defined by 'edges' and 'constraints'. |
| 3518 | |
| 3519 | :param edges: edges |
| 3520 | :type edges: list of edges or wires |
| 3521 | :param constraints: constraints |
| 3522 | :type constraints: list of points or edges |
| 3523 | :param continuity: OCC.Core.GeomAbs continuity condition |
| 3524 | :param degree: >=2 |
| 3525 | :param nbPtsOnCur: number of points on curve >= 15 |
| 3526 | :param nbIter: number of iterations >= 2 |
| 3527 | :param anisotropy: bool Anisotropy |
| 3528 | :param tol2d: 2D tolerance >0 |
| 3529 | :param tol3d: 3D tolerance >0 |
| 3530 | :param tolAng: angular tolerance |
| 3531 | :param tolCurv: tolerance for curvature >0 |
| 3532 | :param maxDeg: highest polynomial degree >= 2 |
| 3533 | :param maxSegments: greatest number of segments >= 2 |
| 3534 | """ |
| 3535 | |
| 3536 | n_sided = BRepOffsetAPI_MakeFilling( |
| 3537 | degree, |
| 3538 | nbPtsOnCur, |
| 3539 | nbIter, |
| 3540 | anisotropy, |
| 3541 | tol2d, |
| 3542 | tol3d, |
| 3543 | tolAng, |
| 3544 | tolCurv, |
| 3545 | maxDeg, |
| 3546 | maxSegments, |
| 3547 | ) |
| 3548 | |
| 3549 | # outer edges |
| 3550 | for el in edges: |
| 3551 | if isinstance(el, Edge): |
| 3552 | n_sided.Add(el.wrapped, continuity) |
| 3553 | else: |
| 3554 | for el_edge in el.Edges(): |
| 3555 | n_sided.Add(el_edge.wrapped, continuity) |
| 3556 | |
| 3557 | # (inner) constraints |