Drawing3d documented Class Library

Curve3D Members

Curve3D overview

Public Static (Shared) Fields

RegisteredCurves Holds a list of curve types for copying curves and array of curves. A curve will be written in a stream and read from a stream. The basic concept contains the method LoadFromStream and SaveToStream By registrating
Register(1, typeof(Line3));
Register(3, typeof(Bezier3D));
Register(4, typeof(QSpline3D));
Register(5, typeof(Nurbs3D));
Register(6, typeof(BSpline3D));
The curves can reconsturcted by calling the empty constructor

Public Static (Shared) Methods

FindType Gets the associated type of an ID
Register Register a CurveType.
registerAliases Register "alias"-names for some types.

Public Instance Constructors

Curve3D Constructor Constructor without parameters.

Public Instance Fields

OnChanged This event is fired by the method Changed
Tag Tag is a free programmable property

Public Instance Properties

A Gets the starting point of the curve by calling getA.
Atang Returns and sets the start tangent. See getAtang and Btang
B Gets the endpoint of the curve by calling getB.
Btang Returns and sets the end tangent. See getBtang and Atang.
Closed Gets and sets the information, that the curve is closed, ie A = B.
CurveLength Retrieves the length of the curve.
fromParam Retrieves and sets the starting parameter. All parameters are within the interval [fromParam, toParam]. Initial value is 0;
Maxrect A property, which calls GetMaxrect
Neighbors If a Curve3D is a contur curve of a Face this array contains both Neighbors. In generally this are two.
Resolution Retrieves and sets the resolution of the curve. The default value is 20.
toParam Retrieves and sets the end parameter. All parameters are within the interval [fromParam, toParam]. Initialvalue is 1;
Visible Several classes use this property and hide a curve, where visible is false.

Public Instance Methods

Changed This method is called, when the curve is changed. It fires the event OnChanged
Clone Produces an exact copy of the curve by using the BinaryFormatter. So you have to mark a new instance of Curve with the attribute [Serializable].
Copy Copy the Curve. Some instances override this method.
Derivation It returns the first deriavation of the function defined in the method Value. All parameter t are taken from the interval [fromParam,toParam].
DistanceOverloaded. This method calculates the distance of a LineType to a Curve only in case, when the distance is smaller then MaxDist, otherwise big will be returned. You can imagine a cylinders with radius MaxDist around the Curve. If the line goes through the "curved" cylinder, then the distance will be calculated and returned.
Equals (inherited from Object) 
GetHashCode (inherited from Object) 
GetMaxrectOverloaded. Gets a minimal Box, which contains a curve, transformed by a transformation.
GetType (inherited from Object) 
InsertPoint Inserts a point at the position, which is given by Param.
Invert Inverts the orientation of a curve. The base-method is empty. You should override it in a derived class.
LengthToParam Converts a length to a param, which can be used in the method Value.
NormalCross Calculates a point of a Curve, which is nearest to "Point"
ParamToLength Calculates the length of a part of the curve, which is given from 0 to the value param.
SetBorder Restricts the Curve to the startpoint A and the endpoint B. The method works regular only if A and B are "close to the curve".
Slice This method trims the curve to the part between "from" and "to". The base-method sets fromParam = from and toParam = to. In general this is not the best solution. So it is better to override this method without calling to the base method.
ToArray This method fills values, calculated by the function Value in an array, starting at index.
ToString (inherited from Object) 
ToxyzArray Gets an array of Resolution+1 interpolationpoints.
Transform Transforms a Curve with the transformation given by m. The method in the base class is empty. So you have to override this function, if you want to transform a Curve.
Value Its implement a function from R --> R³
public xyz Value(double t){
return new xyz(cos(t), sin(t),t);
}
public xyz Drivation(double t){
return new xyz(-sin(t), cos(t),1);
}
This example implements an screw curve.

Protected Instance Methods

Finalize (inherited from Object) 
getA This is the virtual Get-Method of A. By default it calls 'Value(fromParam)'.
getAtang This method is the getMethod of the Atang-property, which retrieves the start tangent. By default Derivation(fromParam) is returned.
getB This is the virtual Get-Method of B. By default, it provides 'Value(toParam)'.
getBtang This method is the getMethod of the Btang-property, which retrieves the Endtangent. By default Derivaion(toParam) is returned.
GetMaxrectOverloaded. Gets the smaller rectangle, which contains the curve.
getVisible virtual getmethod of the property Visible
MemberwiseClone (inherited from Object) 
setA This is the virtual setter method of the property A
setAtang This is the virtual setter method of the property Atang
setB This is the virtual setter method of the property B
setBtang This is the virtual set method of the property B
SetClosed Virtual Settermethod of Closed-property
setVisible Virtual setmethod of the property Visible

See Also

Curve3D Class | Drawing3d.Curves Namespace