OCCSurface

class compas_occ.geometry.OCCSurface(*args, **kwargs)

Bases: Surface

Class representing a general surface object.

Parameters:
namestr, optional

The name of the surface.

Attributes:
continuityint, read-only

The degree of continuity of the surface.

degree_ulist[int], read-only

The degree of the surface in the U direction.

degree_vlist[int], read-only

The degree of the surface in the V direction.

domain_utuple[float, float], read-only

The parameter domain of the surface in the U direction.

domain_vtuple[float, float], read-only

The parameter domain of the surface in the V direction.

is_periodic_ubool, read-only

Flag indicating if the surface is periodic in the U direction.

is_periodic_vbool, read-only

Flag indicating if the surface is periodic in the V direction.

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.

copy

Make an independent copy of the current surface.

curvature_at

Compute the curvature at a point on the surface.

frame_at

Compute the local frame at a point on the curve.

from_face

Construct surface from an existing OCC TopoDS_Face.

from_occ

Construct a NUBRS surface from an existing OCC BSplineSurface.

from_plane

Construct a surface from a plane.

gaussian_curvature_at

Compute the Gaussian curvature at a point on the surface.

intersections_with_curve

Compute the intersections with a curve.

intersections_with_line

Compute the intersections with a line.

isocurve_u

Compute the isoparametric curve at parameter u.

isocurve_v

Compute the isoparametric curve at parameter v.

mean_curvature_at

Compute the mean curvature at a point on the surface.

obb

Compute the oriented bounding box of the surface.

point_at

Compute a point on the surface.

to_step

Write the surface geometry to a STP file.

to_tesselation

Convert the surface to a triangle mesh.

transform

Transform this surface.

Inherited Methods

ToString

Converts the instance to a string.

compute_aabb

Compute the axis-aligned bounding box of the geometry.

compute_obb

Compute the oriented bounding box of the geometry.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

from_obj

Load a surface from an OBJ file.

from_step

Load a surface from a STP file.

intersections_with_plane

Compute the intersections with a plane.

normal_at

Compute a normal at a point on the surface.

pointgrid

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

rotate

Rotate the geometry.

rotated

Returns a rotated copy of this geometry.

scale

Scale the geometry.

scaled

Returns a scaled copy of this geometry.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

space_u

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

space_v

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

to_brep

Convert the surface to a BREP representation.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

to_mesh

Convert the surface to a mesh.

to_polyhedron

Convert the surface to a polyhedron.

to_quads

Convert the surface to a list of quads.

to_triangles

Convert the surface to a list of triangles.

to_vertices_and_faces

Convert the surface to a list of vertices and faces.

transformed

Returns a transformed copy of this geometry.

translate

Translate the geometry.

translated

Returns a translated copy of this geometry.

validate_data

Validate the data against the object's data schema.