Table of Contents

Class NonPeriodicSurface

Namespace
CADability.GeoObject
Assembly
CADability.dll

Non-periodic surface made from an underlying periodic surface. The underlying periodic surface must be periodic in u or in v and may have a pole at the minimum or maximum of the non periodic parameter. The underlying periodic surface may also be non periodic but have one singularity, which will be removed.

public class NonPeriodicSurface : ISurfaceImpl, ISurface, IOctTreeInsertable, ISerializable, IDeserializationCallback, IRestrictedDomain, IJsonSerialize, IJsonSerializeDone
Inheritance
NonPeriodicSurface
Implements
Inherited Members
Extension Methods

Constructors

NonPeriodicSurface()

Empty constructor for JSON serialization

protected NonPeriodicSurface()

NonPeriodicSurface(ISurface, BoundingRect)

Creates a non-periodic surface which describes the same geometry as the provided periodic surface (or surface with a pole) with a different parametric system.

public NonPeriodicSurface(ISurface periodicSurface, BoundingRect bounds)

Parameters

periodicSurface ISurface

the periodic surface (or surface with a pole) to be reparameterized

bounds BoundingRect

the part of the parameter space of periodicSurface to be covered by this surface; in the periodic direction the full period is used instead of the provided interval

NonPeriodicSurface(SerializationInfo, StreamingContext)

protected NonPeriodicSurface(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo
context StreamingContext

Properties

IsUPeriodic

Returns true, if this surface is periodic in the u direction (e.g. a cylinder) false otherwise.

public override bool IsUPeriodic { get; }

Property Value

bool

IsVPeriodic

Returns true, if this surface is periodic in the v direction (e.g. a torus) false otherwise.

public override bool IsVPeriodic { get; }

Property Value

bool

Methods

AdaptToCurves(IEnumerable<ICurve>)

public ISurface AdaptToCurves(IEnumerable<ICurve> curves)

Parameters

curves IEnumerable<ICurve>

Returns

ISurface

Clip(ICurve2D)

Clip the provided curve at the bounds of the domain. The result are pairs of parameters of the curve, which define segments, that are inside the domain.

public double[] Clip(ICurve2D curve)

Parameters

curve ICurve2D

Returns

double[]

Clone()

Returns an identical but independant copy of this surface

public override ISurface Clone()

Returns

ISurface

CopyData(ISurface)

Copies the data of the given surface to this surface. The two surfaces are guaranteed to be of the same type. (Used after Clone() and Modify(ModOp) to restore the original values).

public override void CopyData(ISurface CopyFrom)

Parameters

CopyFrom ISurface

where to copy the data from

Derivation2At(GeoPoint2D, out GeoPoint, out GeoVector, out GeoVector, out GeoVector, out GeoVector, out GeoVector)

Returns the point, the two first derivations and the three second derivations of the surface at the provided parameter position.

public override void Derivation2At(GeoPoint2D uv, out GeoPoint location, out GeoVector du, out GeoVector dv, out GeoVector duu, out GeoVector dvv, out GeoVector duv)

Parameters

uv GeoPoint2D

Point in the parameter space

location GeoPoint

Resulting 3D point

du GeoVector

Resulting derivation in u

dv GeoVector

Resulting derivation in v

duu GeoVector
dvv GeoVector
duv GeoVector

DerivationAt(GeoPoint2D, out GeoPoint, out GeoVector, out GeoVector)

Returns the point and the two derivations of the suface in a single call. It returns the same result as calling PointAt(GeoPoint2D), VDirection(GeoPoint2D) und VDirection(GeoPoint2D) succesively but is often faster than the three seperate calls.

public override void DerivationAt(GeoPoint2D uv, out GeoPoint location, out GeoVector du, out GeoVector dv)

Parameters

uv GeoPoint2D

Point in the parameter space

location GeoPoint

Resulting 3D point

du GeoVector

Resulting derivation in u

dv GeoVector

Resulting derivation in v

FixedU(double, double, double)

Returns a curve where the u parameter of this surface is fixed and the v parameter starts a vmin and ends at vmax

public override ICurve FixedU(double u, double vmin, double vmax)

Parameters

u double
vmin double
vmax double

Returns

ICurve

FixedV(double, double, double)

Returns a curve where the v parameter of this surface is fixed and the u parameter starts a umin and ends at umax

public override ICurve FixedV(double v, double umin, double umax)

Parameters

v double
umin double
umax double

Returns

ICurve

GetModified(ModOp)

Returns a clone of this surface modified by the given ModOp.

public override ISurface GetModified(ModOp m)

Parameters

m ModOp

how to modify

Returns

ISurface

GetNaturalBounds(out double, out double, out double, out double)

Returns the natural bounds of the surface. The returned values may be infinite

public override void GetNaturalBounds(out double umin, out double umax, out double vmin, out double vmax)

Parameters

umin double
umax double
vmin double
vmax double

GetObjectData(IJsonWriteData)

public void GetObjectData(IJsonWriteData data)

Parameters

data IJsonWriteData

GetPropertyEntry(IFrame)

Gets the IPropertyEntry to display this surface in the property grid (may be null)

public override IPropertyEntry GetPropertyEntry(IFrame frame)

Parameters

frame IFrame

Returns

IPropertyEntry

GetSafeParameterSteps(double, double, double, double, out double[], out double[])

Gets spans of the parameterspace that are guaranteed to contain only one inflection point. The returned intu should contain umin as first and umax as last value (same with v)

public override void GetSafeParameterSteps(double umin, double umax, double vmin, double vmax, out double[] intu, out double[] intv)

Parameters

umin double
umax double
vmin double
vmax double
intu double[]
intv double[]

IsInside(GeoPoint2D)

True, if the provided uv value is inside the definition domain

public bool IsInside(GeoPoint2D uv)

Parameters

uv GeoPoint2D

Returns

bool

PointAt(GeoPoint2D)

Returns the 3-dimensional point at the given u/v point

public override GeoPoint PointAt(GeoPoint2D uv)

Parameters

uv GeoPoint2D

position

Returns

GeoPoint

point

PositionOf(GeoPoint)

Returns the u/v position of the given point. It is assumed that the point is on the surface, if not the result is undetermined.

public override GeoPoint2D PositionOf(GeoPoint p)

Parameters

p GeoPoint

point

Returns

GeoPoint2D

position

RestrictedPointAt(GeoPoint2D)

Same as PointAt(GeoPoint2D), but when uv is outside the definition domain, the resulting point is forced inside the domain

public GeoPoint RestrictedPointAt(GeoPoint2D uv)

Parameters

uv GeoPoint2D

Returns

GeoPoint

ReverseOrientation()

Reverses the orientation of this surface. The normal vector will point to the other side after this operation. The returned ModOp2D determins how (u,v) coordinates of the parameter space have to be transformed to define the same 3d point.

public override ModOp2D ReverseOrientation()

Returns

ModOp2D

Transformation of the parameter space

SameGeometry(BoundingRect, ISurface, BoundingRect, double, out ModOp2D)

Returns true if this surface and the other surface are geometrically identical, i.e. describe the same surface in 3D space. The may have a different u/v system. The returned firstToSecond contains the ModOp to convert from the u/v system of the first surface to the second surface.

public override bool SameGeometry(BoundingRect thisBounds, ISurface other, BoundingRect otherBounds, double precision, out ModOp2D firstToSecond)

Parameters

thisBounds BoundingRect

Bounds for this surface

other ISurface

Other surface

otherBounds BoundingRect

Bounds of other surface

precision double

Required precision

firstToSecond ModOp2D

Transformation between different u/v systems

Returns

bool

True if the surfaces are geometrically equal

SetObjectData(IJsonReadData)

public void SetObjectData(IJsonReadData data)

Parameters

data IJsonReadData

UDirection(GeoPoint2D)

Returns the direction at the given u/v point in direction of the u-axis

public override GeoVector UDirection(GeoPoint2D uv)

Parameters

uv GeoPoint2D

position

Returns

GeoVector

direction

VDirection(GeoPoint2D)

Returns the direction at the given u/v point in direction of the v-axis

public override GeoVector VDirection(GeoPoint2D uv)

Parameters

uv GeoPoint2D

position

Returns

GeoVector

direction