artist.nurbs.utils ================== .. py:module:: artist.nurbs.utils Functions --------- .. autoapisummary:: artist.nurbs.utils.create_nurbs_evaluation_grid artist.nurbs.utils.create_planar_nurbs_control_points Module Contents --------------- .. py:function:: create_nurbs_evaluation_grid(number_of_evaluation_points: torch.Tensor, epsilon: float = 1e-07, device: torch.device | None = None) -> torch.Tensor Create a grid of evaluation points for a NURBS surface. Parameters ---------- number_of_evaluation_points : torch.Tensor The number of nurbs evaluation points in east and north direction. Shape is ``[2]``. epsilon : float Offset for the NURBS evaluation points (default is 1e-7). NURBS are defined in the interval of [0, 1] but have numerical instabilities at their endpoints. Therefore, the evaluation points need a small offset from the endpoints. device : torch.device | None The device on which to perform computations or load tensors and models (default is None). If None, ``ARTIST`` will automatically select the most appropriate device (CUDA or CPU) based on availability and OS. Returns ------- torch.Tensor The evaluation points. Shape is ``[number_of_evaluation_points_e * number_of_evaluation_points_n, 2]``. .. py:function:: create_planar_nurbs_control_points(number_of_control_points: torch.Tensor, canting: torch.Tensor, device: torch.device | None = None) -> torch.Tensor Create planar NURBS control points for each facet. The generated control points form a flat, equidistant grid. The grid extent is derived from the norm of the canting vectors, which encode the dimensions of the facets. Parameters ---------- number_of_control_points : torch.Tensor The number of NURBS control points. Shape is ``[2]``. canting : torch.Tensor The canting vector for each facet. Shape is ``[number_of_facets, 2, 4]``. device : torch.device | None The device on which to perform computations or load tensors and models (default is None). If None, ``ARTIST`` will automatically select the most appropriate device (CUDA or CPU) based on availability and OS. Returns ------- torch.Tensor Planar control point grids for each facet. Shape is ``[number_of_facets, number_of_control_points_u_direction, number_of_control_points_v_direction, 3]``.