MCPcopy
hub / github.com/CadQuery/cadquery / nbSurfaceDer

Function nbSurfaceDer

cadquery/occ_impl/nurbs.py:833–944  ·  view source on GitHub ↗

NURBS book A3.6 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. dorder : int Maximum der

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

Source from the content-addressed store, hash-verified

831
832@njit
833def nbSurfaceDer(
834 u: Array,
835 v: Array,
836 uorder: int,
837 vorder: int,
838 dorder: int,
839 uknots: Array,
840 vknots: Array,
841 pts: Array,
842 uperiodic: bool = False,
843 vperiodic: bool = False,
844) -> Array:
845 """
846 NURBS book A3.6 with modifications to handle periodicity.
847
848 Parameters
849 ----------
850 u : Array
851 U parameter values.
852 v : Array
853 V parameter values.
854 uorder : int
855 B-spline u order.
856 vorder : int
857 B-spline v order.
858 dorder : int
859 Maximum derivative order.
860 uknots : Array
861 U knot vector..
862 vknots : Array
863 V knot vector..
864 pts : Array
865 Control points.
866 uperiodic : bool, optional
867 U periodicity flag. The default is False.
868 vperiodic : bool, optional
869 V periodicity flag. The default is False.
870
871 Returns
872 -------
873 Array
874 Surface and derivative values.
875
876 """
877
878 # max derivative orders
879 du = min(dorder, uorder)
880 dv = min(dorder, vorder)
881
882 # number of control points
883 nub = pts.shape[0]
884 nvb = pts.shape[1]
885
886 # handle periodicity
887 u_, uknots_ext, minspanu, maxspanu, deltaspanu = _preprocess(
888 u, uorder, uknots, uperiodic
889 )
890 v_, vknots_ext, minspanv, maxspanv, deltaspanv = _preprocess(

Callers 1

derMethod · 0.85

Calls 4

_preprocessFunction · 0.85
nbFindSpanFunction · 0.85
nbBasisDerFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected