Approximate shape with b-splines of the specified degree. :param degree: Maximum degree. :param tolerance: Approximation tolerance. :param nurbs: Use rational splines.
(
self: T, degree: int = 3, tolerance: float = 1e-3, nurbs: bool = False
)
| 1636 | return vertices, triangles |
| 1637 | |
| 1638 | def toSplines( |
| 1639 | self: T, degree: int = 3, tolerance: float = 1e-3, nurbs: bool = False |
| 1640 | ) -> T: |
| 1641 | """ |
| 1642 | Approximate shape with b-splines of the specified degree. |
| 1643 | |
| 1644 | :param degree: Maximum degree. |
| 1645 | :param tolerance: Approximation tolerance. |
| 1646 | :param nurbs: Use rational splines. |
| 1647 | """ |
| 1648 | |
| 1649 | params = ShapeCustom_RestrictionParameters() |
| 1650 | |
| 1651 | result = ShapeCustom.BSplineRestriction_s( |
| 1652 | self.wrapped, |
| 1653 | tolerance, # 3D tolerance |
| 1654 | tolerance, # 2D tolerance |
| 1655 | degree, |
| 1656 | 1, # dumy value, degree is leading |
| 1657 | ga.GeomAbs_C0, |
| 1658 | ga.GeomAbs_C0, |
| 1659 | True, # set degree to be leading |
| 1660 | not nurbs, |
| 1661 | params, |
| 1662 | ) |
| 1663 | |
| 1664 | return self.__class__(result) |
| 1665 | |
| 1666 | def toNURBS(self: T,) -> T: |
| 1667 | """ |
no outgoing calls