Table of Contents

Class Parametric

Namespace
CADability
Assembly
CADability.dll

Modifies a shell according to different operations. The operations are OffsetFaces, MoveFaces, ModifyRadius, ModifyFilletRadius (and more to come). The modification takes two steps: first applying the operation to the surfaces of the faces, second recalculating the egdes and vertices. This pair of steps may be repeated with different operations. Finally you get the result by calling Result(). If the modification is not possible, the result bwill be null.

The parametric must preserve the "topology" of the Shell: each face, edge, vertex in the provided shell must exactely correspond to a face, edge, vertex in the modified shell. And the modification must be possible, i.e. holes must be inside the shell, no self intersection of the shell and more constraints. The individual operations may yield invalid shells, while the result of several such operations may be valid.

public class Parametric
Inheritance
Parametric
Inherited Members

Constructors

Parametric(Shell)

public Parametric(Shell shell)

Parameters

shell Shell

Methods

Apply()

public bool Apply()

Returns

bool

GetAffectedObjects()

public IEnumerable<object> GetAffectedObjects()

Returns

IEnumerable<object>

GetDictionaries(out Dictionary<Face, Face>, out Dictionary<Edge, Edge>, out Dictionary<Vertex, Vertex>)

public void GetDictionaries(out Dictionary<Face, Face> faceDict, out Dictionary<Edge, Edge> edgeDict, out Dictionary<Vertex, Vertex> vertexDict)

Parameters

faceDict Dictionary<Face, Face>
edgeDict Dictionary<Edge, Edge>
vertexDict Dictionary<Vertex, Vertex>

ModifyEdgeRadius(IEnumerable<Edge>, double)

Modify the radius of an edge. There are typically several edges (2 in most cases), but they all describe the same circle, which is splitted because of periodicy.

public bool ModifyEdgeRadius(IEnumerable<Edge> edges, double newRadius)

Parameters

edges IEnumerable<Edge>
newRadius double

Returns

bool

ModifyFilletRadius(Face[], double)

A fillet is to be modified with a new radius. The parameter toModify contains all relevant faces, which are either faces where the surface is a ISurfaceOfArcExtrusion or a SphericalSurface. There is no need to follow these faces, the caller is responsible for this.

public bool ModifyFilletRadius(Face[] toModify, double newRadius)

Parameters

toModify Face[]
newRadius double

Returns

bool

true, if possible (but not guaranteed to be possible)

ModifyRadius(IEnumerable<Face>, double)

For faces on CylindricalSurface, ToroidalSurface, (maybe not SphericalSurface maybe some swept curve surface) this face should change its radius resp. MinorRadius.

When it is tangential in the direction of the circle to other faces (like a rounded edge is tangential to the faces of the original edge), then its position will be changed, so that it is still tangential to these faces (i.e. changing the radius of a rounded edge).

When it is tangential in the other direction (e.g. a cylinder followed by a torus segment, in a pipe or at multiple rounded edges) these tangential faces also change their radius and move to the same axis as their predecessor.

public bool ModifyRadius(IEnumerable<Face> toModify, double newRadius)

Parameters

toModify IEnumerable<Face>

a face from the original shell

newRadius double

the new radius of the surface

Returns

bool

MoveFaces(Dictionary<Face, GeoVector>, GeoVector, bool)

Specifies the faces which should be moved or kept on its place. Faces to be moved kept on its place have a null-vector as the value in the provided dictionary toMove. Other faces must be moved according to the provided vector. Typically there are two vectors as values of toMove: one is the null-vector, the other one the movement, or both are the half movement in opposite directions. The mainMovement is used to keep faces in place, which have surfaces that are invariant in this direction.

public void MoveFaces(Dictionary<Face, GeoVector> toMove, GeoVector mainMovement, bool moveConnected = false)

Parameters

toMove Dictionary<Face, GeoVector>
mainMovement GeoVector
moveConnected bool

true: faces connected to a moved face by a non-tangential edge or only by a vertex are moved along with it (unless their surface is invariant in the direction of mainMovement), false: only tangentially connected faces follow the movement

OffsetFaces(IEnumerable<Face>, double)

Modify the thickness or gauge of a part (or the whole) shell. faces already contains all the faces, which have to be modified or offset. there is no need to look at connected faces

public void OffsetFaces(IEnumerable<Face> faces, double offset)

Parameters

faces IEnumerable<Face>

The faces to modify (offset)

offset double

the offset by which the faces are offset

Result()

public Shell Result()

Returns

Shell

RotateFaces(Dictionary<Face, ModOp>, Axis, bool)

public void RotateFaces(Dictionary<Face, ModOp> toRotate, Axis rotationAxis, bool moveConnected = false)

Parameters

toRotate Dictionary<Face, ModOp>
rotationAxis Axis
moveConnected bool