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
surfaceISurfaceuvboundsBoundingRectmaxdegreeint
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
surfaceISurfaceuvboundsBoundingRectdegreeintuseNormalboolnPointsint
ImplicitPSurface(ISurface, BoundingRect, int, double)
public ImplicitPSurface(ISurface surface, BoundingRect uvbounds, int maxdegree, double precision)
Parameters
surfaceISurfaceuvboundsBoundingRectmaxdegreeintprecisiondouble
ImplicitPSurface(GeoPoint[])
Creates a quadric through these points (needs at least 10 points)
public ImplicitPSurface(GeoPoint[] samples)
Parameters
samplesGeoPoint[]
ImplicitPSurface(Polynom)
public ImplicitPSurface(Polynom polynom)
Parameters
polynomPolynom
ImplicitPSurface(Polynom, ModOp)
public ImplicitPSurface(Polynom polynom, ModOp m)
Parameters
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
Methods
FootPoint(GeoPoint)
public GeoPoint[] FootPoint(GeoPoint fromHere)
Parameters
fromHereGeoPoint
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
c3dExplicitPCurve3Dcurve to intersect with
udouble[]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
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
c3dExplicitPCurve3Dudouble[]
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
Returns
- GeoPoint[]
Normal(GeoPoint)
public GeoVector Normal(GeoPoint fromHere)
Parameters
fromHereGeoPoint
Returns
PerpendicularToGradient(ExplicitPCurve3D)
public double[] PerpendicularToGradient(ExplicitPCurve3D curve)
Parameters
curveExplicitPCurve3D
Returns
- double[]
PerpendicularToGradient(GeoPoint, GeoVector)
public double[] PerpendicularToGradient(GeoPoint lineStart, GeoVector lineDirection)
Parameters
Returns
- double[]
PolynomialDistance(GeoPoint)
public double PolynomialDistance(GeoPoint fromHere)
Parameters
fromHereGeoPoint