MCPcopy Index your code
hub / github.com/CadQuery/cadquery / nbSurface

Function nbSurface

cadquery/occ_impl/nurbs.py:733–829  ·  view source on GitHub ↗

NURBS book A3.5 with modifications to handle periodicity. Parameters ---------- u : Array U parameter values. v : Array V parameter values. uorder : int B-spline u order. vorder : int B-spline v order. uknots : Array U knot ve

(
    u: Array,
    v: Array,
    uorder: int,
    vorder: int,
    uknots: Array,
    vknots: Array,
    pts: Array,
    uperiodic: bool = False,
    vperiodic: bool = False,
)

Source from the content-addressed store, hash-verified

731
732@njit
733def nbSurface(
734 u: Array,
735 v: Array,
736 uorder: int,
737 vorder: int,
738 uknots: Array,
739 vknots: Array,
740 pts: Array,
741 uperiodic: bool = False,
742 vperiodic: bool = False,
743) -> Array:
744 """
745 NURBS book A3.5 with modifications to handle periodicity.
746
747 Parameters
748 ----------
749 u : Array
750 U parameter values.
751 v : Array
752 V parameter values.
753 uorder : int
754 B-spline u order.
755 vorder : int
756 B-spline v order.
757 uknots : Array
758 U knot vector..
759 vknots : Array
760 V knot vector..
761 pts : Array
762 Control points.
763 uperiodic : bool, optional
764 U periodicity flag. The default is False.
765 vperiodic : bool, optional
766 V periodicity flag. The default is False.
767
768 Returns
769 -------
770 Array
771 Surface values.
772
773 """
774
775 # number of control points
776 nub = pts.shape[0]
777 nvb = pts.shape[1]
778
779 # handle periodicity
780 u_, uknots_ext, minspanu, maxspanu, deltaspanu = _preprocess(
781 u, uorder, uknots, uperiodic
782 )
783 v_, vknots_ext, minspanv, maxspanv, deltaspanv = _preprocess(
784 v, vorder, vknots, vperiodic
785 )
786
787 # number of param values
788 nu = np.size(u)
789
790 # chunk sizes

Callers 1

__call__Method · 0.85

Calls 4

_preprocessFunction · 0.85
nbFindSpanFunction · 0.85
nbBasisFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected