Table of Contents

Class ImplicitPSurface

Namespace
CADability
Assembly
CADability.dll

A surface, defined by a polynom in 3 variables. The surface is defined as P(x,y,z)==0.

public class ImplicitPSurface
Inheritance
ImplicitPSurface
Inherited Members

Constructors

ImplicitPSurface(ISurface, BoundingRect, int)

public ImplicitPSurface(ISurface surface, BoundingRect uvbounds, int maxdegree)

Parameters

surface ISurface
uvbounds BoundingRect
maxdegree int

ImplicitPSurface(ISurface, BoundingRect, int, bool, int)

Approximate the provided surface with a imlicit polynomial surface. Uses points an normals of the surface. Yields good results for quadrics (degree==2) and for ruled surfaces.

public ImplicitPSurface(ISurface surface, BoundingRect uvbounds, int degree, bool useNormal, int nPoints = 0)

Parameters

surface ISurface
uvbounds BoundingRect
degree int
useNormal bool
nPoints int

ImplicitPSurface(ISurface, BoundingRect, int, double)

public ImplicitPSurface(ISurface surface, BoundingRect uvbounds, int maxdegree, double precision)

Parameters

surface ISurface
uvbounds BoundingRect
maxdegree int
precision double

ImplicitPSurface(GeoPoint[])

Creates a quadric through these points (needs at least 10 points)

public ImplicitPSurface(GeoPoint[] samples)

Parameters

samples GeoPoint[]

ImplicitPSurface(Polynom)

public ImplicitPSurface(Polynom polynom)

Parameters

polynom Polynom

ImplicitPSurface(Polynom, ModOp)

public ImplicitPSurface(Polynom polynom, ModOp m)

Parameters

polynom Polynom
m ModOp

Properties

Polynom

Returns the implicit polynom of this surface (i.e. polynom(x,y,z)==0 for all points on the surface)

public Polynom Polynom { get; }

Property Value

Polynom

Methods

FootPoint(GeoPoint)

public GeoPoint[] FootPoint(GeoPoint fromHere)

Parameters

fromHere GeoPoint

Returns

GeoPoint[]

Intersect(ExplicitPCurve3D, out double[])

Returns the intersection points of the provided curve with this surface.

public GeoPoint[] Intersect(ExplicitPCurve3D c3d, out double[] u)

Parameters

c3d ExplicitPCurve3D

curve to intersect with

u double[]

returns the parameter values for the curve of the intersection points

Returns

GeoPoint[]

the intersection points

Intersect(GeoPoint, GeoVector, out double[])

public GeoPoint[] Intersect(GeoPoint sp, GeoVector dir, out double[] u)

Parameters

sp GeoPoint
dir GeoVector
u double[]

Returns

GeoPoint[]

LagrangeReduction3()

Modifies the surface into it's "canonical" position. A sphere will be around the origin, a cylinder will be around the z-axis, a cone will be around the z-axis with its apex at the origin. The returned ModOp modifies the canonical form into the original form. Makes only sense for quadrics

public ModOp LagrangeReduction3()

Returns

ModOp

the modification that transforms the canonical form into the initial form

MinMaxToCurve(ExplicitPCurve3D, out double[])

public GeoPoint[] MinMaxToCurve(ExplicitPCurve3D c3d, out double[] u)

Parameters

c3d ExplicitPCurve3D
u double[]

Returns

GeoPoint[]

MinMaxToPatch(GeoPoint, GeoVector, GeoVector)

Returns a list of all points of the surface, where there is a minimum or maximum distance to the plane, defined by loc, dirx, diry. Returns only those points, which have a (perpendicular) footpoint in the parallelogram, defined by the parameters.

public GeoPoint[] MinMaxToPatch(GeoPoint loc, GeoVector dirx, GeoVector diry)

Parameters

loc GeoPoint
dirx GeoVector
diry GeoVector

Returns

GeoPoint[]

Normal(GeoPoint)

public GeoVector Normal(GeoPoint fromHere)

Parameters

fromHere GeoPoint

Returns

GeoVector

PerpendicularToGradient(ExplicitPCurve3D)

public double[] PerpendicularToGradient(ExplicitPCurve3D curve)

Parameters

curve ExplicitPCurve3D

Returns

double[]

PerpendicularToGradient(GeoPoint, GeoVector)

public double[] PerpendicularToGradient(GeoPoint lineStart, GeoVector lineDirection)

Parameters

lineStart GeoPoint
lineDirection GeoVector

Returns

double[]

PolynomialDistance(GeoPoint)

public double PolynomialDistance(GeoPoint fromHere)

Parameters

fromHere GeoPoint

Returns

double