NurbsSurface

class compas.geometry.NurbsSurface(*args, **kwargs)[source]

Bases: Surface

A NURBS surface is defined by control points, weights, knots, and a degree, in two directions U and V.

Parameters

name (str, optional) – The name of the surface.

Attributes
  • points (list[list[Point]], read-only) – The control points as rows along the U direction.

  • weights (list[list[float]], read-only) – The weights of the control points.

  • u_knots (list[float], read-only) – The knots in the U direction, without multiplicity.

  • v_knots (list[float], read-only) – The knots in the V direction, without multiplicity.

  • u_mults (list[int], read-only) – Multiplicity of the knots in the U direction.

  • v_mults (list[int], read-only) – Multiplicity of the knots in the V direction.

  • u_degree (list[int], read-only) – The degree of the surface in the U direction.

  • v_degree (list[int], read-only) – The degree of the surface in the V direction.

Methods

copy

Make an independent copy of the surface.

from_data

Construct a BSpline surface from its data representation.

from_fill

Construct a NURBS surface from the infill between two NURBS curves.

from_meshgrid

Construct a NURBS surface from a mesh grid.

from_parameters

Construct a NURBS surface from explicit parameters.

from_points

Construct a NURBS surface from control points.

from_step

Load a NURBS surface from a STP file.

Inherited Methods

aabb

Compute the axis aligned bounding box of the surface.

boundary

Compute the boundary curves of the surface.

closest_point

Compute the closest point on the curve to a given point.

curvature_at

Compute the curvature at a point on the surface.

frame_at

Compute the local frame at a point on the curve.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

from_obj

Load a surface from an OBJ file.

intersections_with_line

Compute the intersections with a line.

obb

Compute the oriented bounding box of the surface.

point_at

Compute a point on the surface.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

to_mesh

Convert the surface to a quad mesh.

to_step

Write the surface geometry to a STP file.

to_tesselation

Convert the surface to a triangle mesh.

to_triangles

Convert the surface to a list of triangles.

transform

Transform the geometry.

transformed

Returns a transformed copy of this geometry.

u_isocurve

Compute the isoparametric curve at parameter u.

u_space

Compute evenly spaced parameters over the surface domain in the U direction.

v_isocurve

Compute the isoparametric curve at parameter v.

v_space

Compute evenly spaced parameters over the surface domain in the V direction.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.

xyz

Compute point locations corresponding to evenly spaced parameters over the surface domain.