OCCNurbsSurface
- class compas_occ.geometry.OCCNurbsSurface(*args, **kwargs)
- Bases: - OCCSurface,- NurbsSurface- Class representing a NURBS surface based on the BSplineSurface of the OCC geometry kernel. - Parameters:
- namestr, optional
- The name of the curve 
 
- Attributes:
- pointslist[list[Point]], read-only
- The control points of the surface. 
- weightslist[list[float]], read-only
- The weights of the control points of the surface. 
- knots_ulist[float], read-only
- The knots of the surface in the U direction, without multiplicities. 
- knots_vlist[float], read-only
- The knots of the surface in the V direction, without multiplicities. 
- mults_ulist[int], read-only
- The multiplicities of the knots of the surface in the U direction. 
- mults_vlist[int], read-only
- The multiplicities of the knots of the surface in the V direction. 
 
- pointslist[list[
 - Examples - Construct a surface from points… - from compas.geometry import Point from compas_occ.geometry import OCCNurbsSurface points = [ [Point(0, 0, 0), Point(1, 0, 0), Point(2, 0, 0), Point(3, 0, 0)], [Point(0, 1, 0), Point(1, 1, 2), Point(2, 1, 2), Point(3, 1, 0)], [Point(0, 2, 0), Point(1, 2, 2), Point(2, 2, 2), Point(3, 2, 0)], [Point(0, 3, 0), Point(1, 3, 0), Point(2, 3, 0), Point(3, 3, 0)], ] surface = OCCNurbsSurface.from_points(points=points) - Construct a surface from points… - from compas.geometry import Point from compas_occ.geometry import OCCNurbsSurface points = [ [Point(0, 0, 0), Point(1, 0, +0), Point(2, 0, +0), Point(3, 0, +0), Point(4, 0, +0), Point(5, 0, 0)], [Point(0, 1, 0), Point(1, 1, -1), Point(2, 1, -1), Point(3, 1, -1), Point(4, 1, -1), Point(5, 1, 0)], [Point(0, 2, 0), Point(1, 2, -1), Point(2, 2, +2), Point(3, 2, +2), Point(4, 2, -1), Point(5, 2, 0)], [Point(0, 3, 0), Point(1, 3, -1), Point(2, 3, +2), Point(3, 3, +2), Point(4, 3, -1), Point(5, 3, 0)], [Point(0, 4, 0), Point(1, 4, -1), Point(2, 4, -1), Point(3, 4, -1), Point(4, 4, -1), Point(5, 4, 0)], [Point(0, 5, 0), Point(1, 5, +0), Point(2, 5, +0), Point(3, 5, +0), Point(4, 5, +0), Point(5, 5, 0)], ] weights = [ [1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0], ] surface = OCCNurbsSurface.from_parameters( points=points, weights=weights, knots_u=[1.0, 1 + 1 / 9, 1 + 2 / 9, 1 + 3 / 9, 1 + 4 / 9, 1 + 5 / 9, 1 + 6 / 9, 1 + 7 / 9, 1 + 8 / 9, 2.0], knots_v=[0.0, 1 / 9, 2 / 9, 3 / 9, 4 / 9, 5 / 9, 6 / 9, 7 / 9, 8 / 9, 1.0], mults_u=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], mults_v=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], degree_u=3, degree_v=3, ) - Methods - Make an independent copy of the current surface. - Construct a NURBS surface from an extrusion of a basis curve. - Construct a NURBS surface from the infill between two, three or four contiguous NURBS curves. - Construct a NURBS surface by approximating or interpolating a 2D collection of points. - Construct a NURBS surface from an existing OCC Surface. - Construct a NURBS surface from explicit parameters. - Construct a NURBS surface from a plane. - Construct a NURBS surface from control points. - Inherited Methods - Converts the instance to a string. - Compute the axis aligned bounding box of the surface. - Compute the boundary curves of the surface. - Compute the closest point on the curve to a given point. - Compute the axis-aligned bounding box of the geometry. - Compute the oriented bounding box of the geometry. - Compute the curvature at a point on the surface. - Compute the local frame at a point on the curve. - Construct a surface from a cylinder. - Construct a surface from an existing OCC TopoDS_Face. - Construct a surface from a frame. - Construct an object of this type from a JSON file. - Construct an object of this type from a JSON string. - Construct a NURBS surface from a mesh grid. - Load a surface from an OBJ file. - Construct a surface from an existing OCC Surface. - Construct a surface from a sphere. - Load a NURBS surface from a STP file. - Construct a surface from a torus. - Compute the Gaussian curvature at a point on the surface. - Compute the intersections with a curve. - Compute the intersections with a line. - Compute the intersections with a plane. - Compute the isoparametric curve at parameter u. - Compute the isoparametric curve at parameter v. - Compute the mean curvature at a point on the surface. - Compute a normal at a point on the surface. - Compute the oriented bounding box of the surface. - Compute a point on the surface. - Compute point locations corresponding to evenly spaced parameters over the surface domain. - Rotate the geometry. - Returns a rotated copy of this geometry. - Scale the geometry. - Returns a scaled copy of this geometry. - Compute a hash of the data for comparison during version control using the sha256 algorithm. - Compute evenly spaced parameters over the surface domain in the U direction. - Compute evenly spaced parameters over the surface domain in the V direction. - Convert the surface to a BREP representation. - Convert an object to its native data representation and save it to a JSON file. - Convert an object to its native data representation and save it to a JSON string. - Convert the surface to a mesh. - Convert the surface to a polyhedron. - Convert the surface to a list of quads. - Write the surface geometry to a STP file. - Convert the surface to a triangle mesh. - Convert the surface to a list of triangles. - Convert the surface to a list of vertices and faces. - Transform this surface. - Returns a transformed copy of this geometry. - Translate the geometry. - Returns a translated copy of this geometry. - Validate the data against the object's data schema.