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
edgeEdge
Returns
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
Returns
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
facesIEnumerable<Face>reversebool
Returns
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
shellShelldistanceFromFacetouchingPointGeoPointdistanceToList<Face>distanceList<double>pointsFromList<GeoPoint>pointsToList<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
surfaceISurfaceParametric surface f(u,v).
targetGeoPoint3-D point P.
startValueGeoPoint2DInitial guess (u0,v0).
toldoubleTolerance in world units.
maxIterintMaximum number of Newton steps.