C# Class R3.Geometry.Shapeways

Class with utility method for generating meshes for shapeways models.
Datei anzeigen Open project: roice3/Honeycombs Class Usage Examples

Public Methods

Method Description
AddArc ( Vector3D center, double arcRadius, Vector3D v1, Vector3D normal, double angleTot, int numPoints, double>.System sizeFunc ) : void
AddCornucopia ( Vector3D outerPoints, double>.System outerSizeFunc, Vector3D innerPoints, double>.System innerSizeFunc ) : void

Add a cornucopia. NOTE: outerPoints and innerPoints are ordered in a different direction.

AddCurve ( Vector3D points, double>.System sizeFunc ) : void

Adds a curve to a mesh.

AddCurve ( Vector3D points, double>.System sizeFunc, Vector3D start, Vector3D end ) : void
AddCurve ( Vector3D points, double size ) : void

Add a curve with a constant radius size.

AddSegment ( Vector3D d1, Vector3D d2 ) : void

Function to add one segment of our curve. d1 and d2 are two pre-calc'd disks of points perpendicular to the curve.

AddSphere ( Vector3D center, double radius ) : void

Add a sphere to a mesh.

CalcArcPoints ( Vector3D center, double radius, Vector3D v1, Vector3D normal, double angleTot ) : Vector3D[]

Helper to calculate points along an arc.

CalcArcPoints ( Vector3D center, double radius, Vector3D v1, Vector3D normal, double angleTot, int numPoints ) : Vector3D[]

Helper to calculate points along an arc. XXX - This function belongs in a better shared location.

Shapeways ( ) : System.Collections.Generic

Private Methods

Method Description
AddCap ( Vector3D center, Vector3D diskPoints, bool reverse = false ) : void

Function to add a cap to the end of our curve, so that it will be 'manifold'.

AddCurve ( List disks, Vector3D points, Vector3D start, Vector3D end ) : void
AddRing ( Vector3D disk1Points, Vector3D disk2Points ) : void

Adds an annulus.

CalcDisks ( Vector3D points, double>.System sizeFunc, bool reverse = false ) : List

Helper to calculate a set of disks perpendicular to a polyline.

CalcDisks ( Vector3D points, double radii, bool reverse = false ) : List
CurveAxis ( Vector3D p1, Vector3D p2, Vector3D p3 ) : Vector3D

Used to get the axis of a polyline at a point p2, given adjacent points.

CurvePerp ( Vector3D p1, Vector3D p2, Vector3D p3 ) : Vector3D

Used to get the perpendicular to the polyline at a point p2, given adjacent points.

Disk ( Vector3D p, Vector3D axis, Vector3D perpendicular, int divisions, bool reverse = false ) : Vector3D[]

Create a circle of points, centered at p.

Method Details

AddArc() public method

public AddArc ( Vector3D center, double arcRadius, Vector3D v1, Vector3D normal, double angleTot, int numPoints, double>.System sizeFunc ) : void
center Vector3D
arcRadius double
v1 Vector3D
normal Vector3D
angleTot double
numPoints int
sizeFunc double>.System
return void

AddCornucopia() public method

Add a cornucopia. NOTE: outerPoints and innerPoints are ordered in a different direction.
public AddCornucopia ( Vector3D outerPoints, double>.System outerSizeFunc, Vector3D innerPoints, double>.System innerSizeFunc ) : void
outerPoints Vector3D
outerSizeFunc double>.System
innerPoints Vector3D
innerSizeFunc double>.System
return void

AddCurve() public method

Adds a curve to a mesh.
public AddCurve ( Vector3D points, double>.System sizeFunc ) : void
points Vector3D
sizeFunc double>.System
return void

AddCurve() public method

public AddCurve ( Vector3D points, double>.System sizeFunc, Vector3D start, Vector3D end ) : void
points Vector3D
sizeFunc double>.System
start Vector3D
end Vector3D
return void

AddCurve() public method

Add a curve with a constant radius size.
public AddCurve ( Vector3D points, double size ) : void
points Vector3D
size double
return void

AddSegment() public method

Function to add one segment of our curve. d1 and d2 are two pre-calc'd disks of points perpendicular to the curve.
public AddSegment ( Vector3D d1, Vector3D d2 ) : void
d1 Vector3D
d2 Vector3D
return void

AddSphere() public method

Add a sphere to a mesh.
public AddSphere ( Vector3D center, double radius ) : void
center Vector3D
radius double
return void

CalcArcPoints() public static method

Helper to calculate points along an arc.
public static CalcArcPoints ( Vector3D center, double radius, Vector3D v1, Vector3D normal, double angleTot ) : Vector3D[]
center Vector3D
radius double
v1 Vector3D
normal Vector3D
angleTot double
return Vector3D[]

CalcArcPoints() public static method

Helper to calculate points along an arc. XXX - This function belongs in a better shared location.
public static CalcArcPoints ( Vector3D center, double radius, Vector3D v1, Vector3D normal, double angleTot, int numPoints ) : Vector3D[]
center Vector3D
radius double
v1 Vector3D
normal Vector3D
angleTot double
numPoints int
return Vector3D[]

Shapeways() public method

public Shapeways ( ) : System.Collections.Generic
return System.Collections.Generic