OCCSurface

class compas_occ.geometry.OCCSurface(name=None)[source]

Bases: compas.geometry.surfaces.surface.Surface

Class representing a general surface object.

Parameters

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

Attributes
  • continuity (int, read-only) – The degree of continuity of the surface.

  • 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.

  • u_domain (tuple[float, float], read-only) – The parameter domain of the surface in the U direction.

  • v_domain (tuple[float, float], read-only) – The parameter domain of the surface in the V direction.

  • is_u_periodic (bool, read-only) – Flag indicating if the surface is periodic in the U direction.

  • is_v_periodic (bool, read-only) – Flag indicating if the surface is periodic in the V direction.

Other Attributes
  • occ_surface (Geom_Surface) – The underlying OCC surface.

  • occ_shape (TopoDS_Shape, read-only) – An OCC face containing the surface converted to a shape.

  • occ_face (TopoDS_Face, read-only) – An OCC face containing the surface.

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_face

Construct surface from an existing OCC TopoDS_Face.

from_occ

Construct a NUBRS surface from an existing OCC BSplineSurface.

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_step

Write the surface geometry to a STP file.

to_tesselation

Convert the surface to a triangle mesh.

transform

Transform this surface.

u_isocurve

Compute the isoparametric curve at parameter u.

v_isocurve

Compute the isoparametric curve at parameter v.

Inherited Methods

copy

Make an independent copy of the data object.

from_data

Construct an object of this type from the provided data.

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.

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.

validate_data

Validate the object's data against its data schema (self.DATASCHEMA).

validate_json

Validate the object's data against its json schema (self.JSONSCHEMA).