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
periodicSurfaceISurfacethe periodic surface (or surface with a pole) to be reparameterized
boundsBoundingRectthe part of the parameter space of
periodicSurfaceto 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
infoSerializationInfocontextStreamingContext
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
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
Methods
AdaptToCurves(IEnumerable<ICurve>)
public ISurface AdaptToCurves(IEnumerable<ICurve> curves)
Parameters
curvesIEnumerable<ICurve>
Returns
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
curveICurve2D
Returns
- double[]
Clone()
Returns an identical but independant copy of this surface
public override ISurface Clone()
Returns
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
CopyFromISurfacewhere 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
uvGeoPoint2DPoint in the parameter space
locationGeoPointResulting 3D point
duGeoVectorResulting derivation in u
dvGeoVectorResulting derivation in v
duuGeoVectordvvGeoVectorduvGeoVector
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
uvGeoPoint2DPoint in the parameter space
locationGeoPointResulting 3D point
duGeoVectorResulting derivation in u
dvGeoVectorResulting 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
Returns
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
Returns
GetModified(ModOp)
Returns a clone of this surface modified by the given ModOp.
public override ISurface GetModified(ModOp m)
Parameters
mModOphow to modify
Returns
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
GetObjectData(IJsonWriteData)
public void GetObjectData(IJsonWriteData data)
Parameters
dataIJsonWriteData
GetPropertyEntry(IFrame)
Gets the IPropertyEntry to display this surface in the property grid (may be null)
public override IPropertyEntry GetPropertyEntry(IFrame frame)
Parameters
frameIFrame
Returns
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
IsInside(GeoPoint2D)
True, if the provided uv value is inside the definition domain
public bool IsInside(GeoPoint2D uv)
Parameters
uvGeoPoint2D
Returns
PointAt(GeoPoint2D)
Returns the 3-dimensional point at the given u/v point
public override GeoPoint PointAt(GeoPoint2D uv)
Parameters
uvGeoPoint2Dposition
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
pGeoPointpoint
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
uvGeoPoint2D
Returns
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
thisBoundsBoundingRectBounds for this surface
otherISurfaceOther surface
otherBoundsBoundingRectBounds of other surface
precisiondoubleRequired precision
firstToSecondModOp2DTransformation between different u/v systems
Returns
- bool
True if the surfaces are geometrically equal
SetObjectData(IJsonReadData)
public void SetObjectData(IJsonReadData data)
Parameters
dataIJsonReadData
UDirection(GeoPoint2D)
Returns the direction at the given u/v point in direction of the u-axis
public override GeoVector UDirection(GeoPoint2D uv)
Parameters
uvGeoPoint2Dposition
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
uvGeoPoint2Dposition
Returns
- GeoVector
direction