SurfaceBroker

public static class SurfaceBroker
Represents one of several standard surface-like data types. Components which operate on or yield surface data of various kinds can use this type to avoid unnecessary casting in input or output parameters.

Methods

Cast

#
public static SurfaceLikeType Cast(object data, out Surface p1, out Brep p3, out SubD p4)
Cast an object to the correct surface type.
data (object)Data to convert.
p1 (out Surface)If data is of type Surface, instance will be returned here.
p3 (out Brep)If data is of type Brep, instance will be returned here.
p4 (out SubD)If data is of type SubD, instance will be returned here.
Type of converted data.

CastOrConvert

#
public static SurfaceLikeType CastOrConvert(object data, out Surface p1, out Brep p3, out SubD p4)
Cast or convert an object to a surface type if possible.
data (object)Data to cast.
p1 (out Surface)Output in case data is a Surface.
p3 (out Brep)Output in case data is a Brep.
p4 (out SubD)Output in case data is a SubD.
Numeric type, if any.

Convert

#
public static SurfaceLikeType Convert(object data, out Surface p1, out Brep p3, out SubD p4)
Convert an object to a surface type if possible.
data (object)Data to cast.
p1 (out Surface)If data is of type Surface, instance will be returned here.
p3 (out Brep)If data is of type Brep, instance will be returned here.
p4 (out SubD)If data is of type SubD, instance will be returned here.
Numeric type, if any.

IsSurface

#
public static SurfaceLikeType IsSurface(object data)
Check whether a value is a kind of surface.
data (object)Data to check.
Type of surface, or None is the data is null or not a surface type.

ToBrep

#
public static Brep ToBrep(object datum)
Try to convert a surface like type to a brep.
datum (object)

ToBreps

#
public static IEnumerable<Brep> ToBreps(IEnumerable<object> data)
Try to convert a collection of surface like data into Breps.
data (IEnumerable<object>)

ToNurbsSurface

#
public static NurbsSurface ToNurbsSurface(object datum, out string warning, out string error)
Try to convert surface like data into an honest to goodness NURBS surface.
datum (object)Surface like data to convert.
warning (out string)Warning messahe in case the data had to be converted into Nurbs.
error (out string)Error message in case the data could not be converted into Nurbs.

ToSubD

#
public static SubD ToSubD(object datum, out string failure)
Try to convert surface like data into an honest to goodness SubD.
datum (object)Surface like data to convert.
failure (out string)Failure reason.

ToSurface

#
public static Surface ToSurface(object datum, out string failure)
Try to convert surface like data into an honest to goodness Surface.
datum (object)Surface like data to convert.
failure (out string)Failure reason.