Skip to content

OffsetSurface

Public Class

A mathematical representation of an offset surface.

Definition of offset surface, quoted from the STEP manual ISO 10303-42:2000(E): This is a procedural definition of a simple offset surface at a normal distance from the originating surface. Distance may be positive, negative, or zero to indicate the preferred side of the surface. The offset surface takes its parametrization directly from that of its basis surface, corresponding points having identical parameter values. The offset surface is parametrized as O(u, v) = S(u, v) + d*N(u, v), where N(u, v) is the oriented unit normal vector of the basis surface S at parameter value (u, v), and d is the signed offset distance.

In Revit, we restrict the types of basis surfaces for which an OffsetSurf can be created for the following reasons:

  • The offsets of Plane, CylindricalSurface, ConicalSurface and RevolvedSurface are of the same type as the original surface and they have closed form solutions. So those surfaces are not taken as basis surfaces of the OffsetSurface class. That leaves HermiteSurface and RuledSurface.
  • As a Revit surface, we require the OffsetSurface to be C2 continuous. That implies that the basis surface should be C3 continuous. That is because the OffsetSurface evaluation involves the normal of the basis surface and the order of continuity of the normal is one less than that of the surface.
  • HermiteSurfaces in general are not C3 continuous, even though some of them can be. A RuledSurface will be C3 continuous if its parametric curves are C3 continuous. So we don’t allow a HermiteSurface to be a basis surface and allow only RuledSurfaces whose parametric curves are C3 continuous as basis surfaces of the OffsetSurface class.

The OffsetSurface class will own a copy of the basis surface and use it for many of its methods, which may implicitly assume that the OffsetSurface and the basis surface have the same envelope. So we keep the envelopes of the OffsetSurf and its basis surface in sync.

Inheritance Hierarchy

System.Object
Autodesk.Revit.DB.Surface
Autodesk.Revit.DB.OffsetSurface

Namespace: Autodesk.Revit.DB

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public class OffsetSurface : Surface

The OffsetSurface type exposes the following members.

Properties

Name

Description


Public Property
IsValidObject

Specifies whether the .NET object represents a valid Revit entity.
(Inherited from Surface)


Public Property
OrientationMatchesParametricOrientation

Indicates whether this Surface’s orientation is the same as or opposite to its parametric orientation.
(Inherited from Surface)


Methods

Name

Description


Public Method

(Inherited from Surface)


Public Method

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)


Public Method

Returns a copy of basis surface of this OffsetSurface.


Public Method
GetBoundingBoxUV

Gets the UV bounding box of the surface.
(Inherited from Surface)


Public Method

GetHashCode

Serves as the default hash function.
(Inherited from Object)


Public Method

Returns offset distance of this OffsetSurface.


Public Method

GetType

Gets the Type of the current instance.
(Inherited from Object)


Public Method

Indicates whether the orientation of the OffsetSurface is same as that of its basis surface, in the sense that their oriented normals at any (u, v) have the same direction.


Public Method

Project a 3D point orthogonally onto a surface (to find the nearest point). Throws InvalidOperationException if the projection fails.
(Inherited from Surface)


Public Method

Project a 3D point orthogonally onto a surface (to find the nearest point). This method is meant to be used when a good approximate solution for the projection is available. Throws InvalidOperationException if the projection fails.
(Inherited from Surface)


Public Method

ToString

Returns a string that represents the current object.
(Inherited from Object)