Class Shell
Inheritance
System.Object
Shell
Implements
System.IComparable
System.ICloneable
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
[Serializable]
public class Shell : IGeoObjectImpl, IGeoObject, ILayer, IStyle, IOctTreeInsertable, IComparable, IFeedBack, ICloneable, ISerializable, IColorDef, IGetSubShapes, IGeoObjectOwner, IDeserializationCallback, IExportStep
Constructors
|
Improve this Doc
View Source
Shell()
Declaration
|
Improve this Doc
View Source
Shell(SerializationInfo, StreamingContext)
Declaration
protected Shell(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
|
| System.Runtime.Serialization.StreamingContext |
context |
|
Fields
|
Improve this Doc
View Source
Constructed
Declaration
public static Shell.ConstructedDelegate Constructed
Field Value
|
Improve this Doc
View Source
Constructor
Declaration
public static Shell.ConstructionDelegate Constructor
Field Value
|
Improve this Doc
View Source
OnPaintTo3D
Declaration
public static Shell.PaintTo3DDelegate OnPaintTo3D
Field Value
Properties
|
Improve this Doc
View Source
ColorDef
Declaration
public ColorDef ColorDef { get; set; }
Property Value
|
Improve this Doc
View Source
Edges
Returns all the edges of this Shell. Each egde is unique in the array
but may belong to two different faces.
Declaration
public Edge[] Edges { get; }
Property Value
|
Improve this Doc
View Source
Faces
Returns all Face of this shell. Do not modify the returned array since it is
(for better performance) the original array contained in this Shell.
Declaration
public Face[] Faces { get; }
Property Value
|
Improve this Doc
View Source
FeatureAxis
Declaration
public GeoObjectList FeatureAxis { get; }
Property Value
|
Improve this Doc
View Source
IsClosed
Checks whether the shall is closed, i.e. all edges of all faces connect two faces of this shell.
Declaration
public bool IsClosed { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Layer
Declaration
public override Layer Layer { get; set; }
Property Value
Overrides
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
NameOrEmpty
Declaration
public string NameOrEmpty { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
OpenEdges
Returns all edges, which have only a PrimaryFace. If there are edges with references to faces, which do not belong to this shell,
these references are removed and the edges are treated as open edges.
Declaration
public Edge[] OpenEdges { get; }
Property Value
|
Improve this Doc
View Source
OpenEdgesExceptPoles
Declaration
public Edge[] OpenEdgesExceptPoles { get; }
Property Value
|
Improve this Doc
View Source
OwnedItems
Declaration
public override IGeoObject[] OwnedItems { get; }
Property Value
Overrides
|
Improve this Doc
View Source
PreferredStyle
Declaration
public override Style.EDefaultFor PreferredStyle { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Vertices
Declaration
public Vertex[] Vertices { get; }
Property Value
Methods
|
Improve this Doc
View Source
AssertOutwardOrientation()
Declaration
public void AssertOutwardOrientation()
|
Improve this Doc
View Source
Clone()
Declaration
public override IGeoObject Clone()
Returns
Overrides
|
Improve this Doc
View Source
CloseEdgeLoop(List<Edge>, Boolean)
Takes a (closed) loop of edges of this shell as parameter sortedEdges and tries to create a shell, which connects the edges.
It heals the hole, described by sortedEdges. The edges are sorted so that following the edges they go clockwise around the hole to fix.
Declaration
public HashSet<Face> CloseEdgeLoop(List<Edge> sortedEdges, bool addToShell)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<Edge> |
sortedEdges |
Edges, which only have the PrimaryFace set (the SecondaryFace must be null)
|
| System.Boolean |
addToShell |
|
Returns
| Type |
Description |
| System.Collections.Generic.HashSet<Face> |
|
|
Improve this Doc
View Source
CloseOpenEdges(Dictionary<Edge, ISurface>)
Close all open edges by adding new faces
Declaration
public bool CloseOpenEdges(Dictionary<Edge, ISurface> proposedSurfaces = null)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.Dictionary<Edge, ISurface> |
proposedSurfaces |
|
Returns
| Type |
Description |
| System.Boolean |
true, if the Shell is now closed, false otherwise
|
|
Improve this Doc
View Source
CombineConnectedFaces()
Adjacent faces that share a common surface are replaced by a single face
Declaration
public int CombineConnectedFaces()
Returns
| Type |
Description |
| System.Int32 |
Number of faces that have been combined
|
|
Improve this Doc
View Source
Construct()
Declaration
public static Shell Construct()
Returns
|
Improve this Doc
View Source
CopyGeometry(IGeoObject)
Declaration
public override void CopyGeometry(IGeoObject ToCopyFrom)
Parameters
Overrides
|
Improve this Doc
View Source
Decompose()
Declaration
public override GeoObjectList Decompose()
Returns
Overrides
|
Improve this Doc
View Source
FeatureFromEdges(Edge[], Face[])
edgeLoop must be a closed set of edges on this shell. The shell will be splitted at this loop.
All edges in edgeLoop join one of the faces in facesToCutoff. These parts of the shell will not be used.
At this loop, which remains open in the first step, the resulting shell will be closed by faces with surfaces from facesToCutOff.
Declaration
public Shell FeatureFromEdges(Edge[] edgeLoop, Face[] facesToCutOff)
Parameters
| Type |
Name |
Description |
| Edge[] |
edgeLoop |
|
| Face[] |
facesToCutOff |
|
Returns
|
Improve this Doc
View Source
FeatureFromFace(Face)
Tries to find a feature like a drill hole or a part sticking out of the shell starting with this face.
The rule is that faces connected with the face toStartWith are combined until the open edges have the same underlying surface. There might be one
or two loops of such open edges (two loops for a hole going through the body).
Declaration
public Shell FeatureFromFace(Face toStartWith)
Parameters
| Type |
Name |
Description |
| Face |
toStartWith |
|
Returns
|
Improve this Doc
View Source
Find other instances of the "form" given by the parameter form. The faces in form must be a subset of faces of this shell.
Returned are other subsets of faces of this shell that describe the same form.
Declaration
public Face[][] FindSameForm(Face[] form, double precision, Shell.FindSameFormSearchMode mode)
Parameters
Returns
| Type |
Description |
| Face[][] |
|
|
Improve this Doc
View Source
FindSnapPoint(SnapPointFinder)
Declaration
public override void FindSnapPoint(SnapPointFinder spf)
Parameters
Overrides
|
Improve this Doc
View Source
FreeCachedMemory()
Declaration
public void FreeCachedMemory()
|
Improve this Doc
View Source
FromFaces(Face[])
Declaration
public static Shell FromFaces(params Face[] faces)
Parameters
| Type |
Name |
Description |
| Face[] |
faces |
|
Returns
|
Improve this Doc
View Source
GetBoundingCube()
Declaration
public override BoundingCube GetBoundingCube()
Returns
Overrides
|
Improve this Doc
View Source
GetEnclosedPart(Path, Double)
Preliminary: Returns the enclosed part of the shell which is inside the border
Declaration
public Shell GetEnclosedPart(Path closedBorder, double precision)
Parameters
| Type |
Name |
Description |
| Path |
closedBorder |
|
| System.Double |
precision |
|
Returns
|
Improve this Doc
View Source
GetExtent(Projection, ExtentPrecision)
Declaration
public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetExtent(Double)
Declaration
public override BoundingCube GetExtent(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Returns
Overrides
|
Improve this Doc
View Source
GetOffset(Double, Boolean, Dictionary<Edge, Edge>)
Declaration
public Shell[] GetOffset(double dist, bool allowOpenEdges = true, Dictionary<Edge, Edge> parallelEdges = null)
Parameters
| Type |
Name |
Description |
| System.Double |
dist |
|
| System.Boolean |
allowOpenEdges |
|
| System.Collections.Generic.Dictionary<Edge, Edge> |
parallelEdges |
|
Returns
|
Improve this Doc
View Source
GetPlaneIntersection(PlaneSurface)
Returns the curves that result from a planar intersection of this shell with the provided plane.
The curves are properly clipped.
Declaration
public ICurve[] GetPlaneIntersection(PlaneSurface pl)
Parameters
| Type |
Name |
Description |
| PlaneSurface |
pl |
The plane to intersect with
|
Returns
| Type |
Description |
| ICurve[] |
Array of intersection curves
|
|
Improve this Doc
View Source
GetQuadTreeItem(Projection, ExtentPrecision)
Declaration
public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetShadow(Plane)
Returns a SimpleShape with the outline and holes of the shadow of the projection of the shell perpendicular on the provided plane.
Declaration
public SimpleShape GetShadow(Plane onThisPlane)
Parameters
| Type |
Name |
Description |
| Plane |
onThisPlane |
|
Returns
|
Improve this Doc
View Source
GetShowProperties(IFrame)
Declaration
public override IShowProperty GetShowProperties(IFrame Frame)
Parameters
| Type |
Name |
Description |
| IFrame |
Frame |
|
Returns
Overrides
|
Improve this Doc
View Source
HasOpenEdgesExceptPoles()
Declaration
public bool HasOpenEdgesExceptPoles()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
HitTest(ref BoundingCube, Double)
Declaration
public override bool HitTest(ref BoundingCube cube, double precision)
Parameters
| Type |
Name |
Description |
| BoundingCube |
cube |
|
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
HitTest(Projection, BoundingRect, Boolean)
Declaration
public override bool HitTest(Projection projection, BoundingRect rect, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
HitTest(Projection.PickArea, Boolean)
Declaration
public override bool HitTest(Projection.PickArea area, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
IsInside(GeoPoint)
Declaration
public bool IsInside(GeoPoint toTest)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
MakeRegularSurfaces(Double)
Declaration
public void MakeRegularSurfaces(double maxError)
Parameters
| Type |
Name |
Description |
| System.Double |
maxError |
|
|
Improve this Doc
View Source
MakeThick(Double, Double)
Declaration
public Solid MakeThick(double innerDist, double outerDist)
Parameters
| Type |
Name |
Description |
| System.Double |
innerDist |
|
| System.Double |
outerDist |
|
Returns
|
Improve this Doc
View Source
Modify(ModOp)
Declaration
public override void Modify(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
|
Overrides
|
Improve this Doc
View Source
PaintTo3D(IPaintTo3D)
Declaration
public override void PaintTo3D(IPaintTo3D paintTo3D)
Parameters
Overrides
|
Improve this Doc
View Source
PaintTo3DList(IPaintTo3D, ICategorizedDislayLists)
Declaration
public override void PaintTo3DList(IPaintTo3D paintTo3D, ICategorizedDislayLists lists)
Parameters
Overrides
|
Improve this Doc
View Source
Position(GeoPoint, GeoVector, Double)
Declaration
public override double Position(GeoPoint fromHere, GeoVector direction, double precision)
Parameters
Returns
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
PrepareDisplayList(Double)
Declaration
public override void PrepareDisplayList(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Overrides
|
Improve this Doc
View Source
RecalcVertices()
Declaration
public void RecalcVertices()
|
Improve this Doc
View Source
ReverseOrientation()
Declaration
public void ReverseOrientation()
|
Improve this Doc
View Source
Returns true, if this shell and the other shell describe the same form. The two shells may be at different positions in 3d space, but may not be rotated,
i.e. must have the same orientation in 3d space.
Declaration
public bool SameForm(Shell other, double precision, out ModOp translation)
Parameters
| Type |
Name |
Description |
| Shell |
other |
the other shell
|
| System.Double |
precision |
maximum difference in the geometry of the two shells accepted as still beeing equal
|
| ModOp |
translation |
how to move the other shell to coincide with this shell
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
SetFaces(Face[])
Sets the faces of a shell. The faces must all be connected to form a single shell, they may have free edges.
This is not checked. This method does not accumulate the faces.
Declaration
public void SetFaces(Face[] faces)
Parameters
| Type |
Name |
Description |
| Face[] |
faces |
The new faces that build the shell
|
|
Improve this Doc
View Source
SetFaces(Shell, Face[])
Declaration
public void SetFaces(Shell sh, Face[] faces)
Parameters
|
Improve this Doc
View Source
SplitPeriodicFaces()
Declaration
public void SplitPeriodicFaces()
|
Improve this Doc
View Source
TestIntersection(List<ICurve>)
Declaration
public bool TestIntersection(List<ICurve> toTestWith)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<ICurve> |
toTestWith |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Volume(Double)
Declaration
public double Volume(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Double |
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IColorDef.SetTopLevel(ColorDef)
Declaration
void IColorDef.SetTopLevel(ColorDef newValue)
Parameters
|
Improve this Doc
View Source
IColorDef.SetTopLevel(ColorDef, Boolean)
Declaration
void IColorDef.SetTopLevel(ColorDef newValue, bool overwriteChildNullColor)
Parameters
| Type |
Name |
Description |
| ColorDef |
newValue |
|
| System.Boolean |
overwriteChildNullColor |
|
|
Improve this Doc
View Source
IGeoObjectOwner.Add(IGeoObject)
Declaration
void IGeoObjectOwner.Add(IGeoObject toAdd)
Parameters
|
Improve this Doc
View Source
IGeoObjectOwner.Remove(IGeoObject)
Declaration
void IGeoObjectOwner.Remove(IGeoObject toRemove)
Parameters
|
Improve this Doc
View Source
IExportStep.Export(ExportStep, Boolean)
Declaration
int IExportStep.Export(ExportStep export, bool topLevel)
Parameters
| Type |
Name |
Description |
| ExportStep |
export |
|
| System.Boolean |
topLevel |
|
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
IDeserializationCallback.OnDeserialization(Object)
Declaration
void IDeserializationCallback.OnDeserialization(object sender)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
|
Improve this Doc
View Source
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
|
| System.Runtime.Serialization.StreamingContext |
context |
|
Implements
System.IComparable
System.ICloneable
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback