Table of Contents

Class ShellExtensions

Namespace
CADability.GeoObject
Assembly
CADability.dll

Extension methods for the analysis of shells, faces and edges.

public static class ShellExtensions
Inheritance
ShellExtensions
Inherited Members

Methods

Adjacency(Edge)

Classifies the edge by the two faces it connects: open (only one face), on the same surface, tangential, or with a convex (outer) or concave (inner) bend. The outer wall of a tube meets its end faces with convex edges, a cut-out in the wall is bounded by concave edges when seen from the outer wall.

public static ShellExtensions.AdjacencyType Adjacency(this Edge edge)

Parameters

edge Edge

Returns

ShellExtensions.AdjacencyType

AllEdgesAreConvex(Face, bool)

True, when all edges of the face are convex (or concave, if reverse) or tangential.

public static bool AllEdgesAreConvex(this Face face, bool reverse)

Parameters

face Face
reverse bool

Returns

bool

GetConvexParts(IEnumerable<Face>, bool)

Groups the faces into regions which are connected by convex (or concave, if reverse) or tangential edges.

public static List<List<Face>> GetConvexParts(IEnumerable<Face> faces, bool reverse)

Parameters

faces IEnumerable<Face>
reverse bool

Returns

List<List<Face>>

GetFaceDistances(Shell, Face, GeoPoint, out List<Face>, out List<double>, out List<GeoPoint>, out List<GeoPoint>)

Finds the faces of the shell which are parallel to distanceFrom (see ParallelDistance(ISurface, BoundingRect, ISurface, BoundingRect, GeoPoint, out GeoPoint2D, out GeoPoint2D)): for a sheet metal part or the flat walls of a rectangular tube these are the faces on the other side of the material, and the distance is the thickness. The lists contain the faces, the distances and the points on both faces.

public static int GetFaceDistances(this Shell shell, Face distanceFrom, GeoPoint touchingPoint, out List<Face> distanceTo, out List<double> distance, out List<GeoPoint> pointsFrom, out List<GeoPoint> pointsTo)

Parameters

shell Shell
distanceFrom Face
touchingPoint GeoPoint
distanceTo List<Face>
distance List<double>
pointsFrom List<GeoPoint>
pointsTo List<GeoPoint>

Returns

int

the number of faces found

PositionOf(ISurface, GeoPoint, GeoPoint2D, double, int)

Finds the (u,v) on surface that minimises the distance to target.

public static GeoPoint2D PositionOf(this ISurface surface, GeoPoint target, GeoPoint2D startValue, double tol = 1E-08, int maxIter = 30)

Parameters

surface ISurface

Parametric surface f(u,v).

target GeoPoint

3-D point P.

startValue GeoPoint2D

Initial guess (u0,v0).

tol double

Tolerance in world units.

maxIter int

Maximum number of Newton steps.

Returns

GeoPoint2D