Class Loop
- Namespace
- SearchAThing.Sci
- Assembly
- netcore-sci.dll
planar edges loop containing line and arcs
public class Loop
- Inheritance
-
Loop
- Inherited Members
- Extension Methods
Constructors
Loop(double, Plane3D, IEnumerable<Edge>, bool, bool)
precondition: edges must lie on given plane
public Loop(double tol, Plane3D plane, IEnumerable<Edge> _edges, bool checkSense, bool checkSort = false)
Parameters
Loop(double, IEnumerable<Edge>, Plane3D, bool)
create loop from given edges, plane template
public Loop(double tol, IEnumerable<Edge> edges, Plane3D plane, bool checkSense = true)
Parameters
tol
doubleedges
IEnumerable<Edge>plane
Plane3DcheckSense
bool
Loop(double, IEnumerable<Edge>, bool, bool)
create loop from given edge template ; plane is detected from edges distribution
public Loop(double tol, IEnumerable<Edge> edges, bool checkSense = true, bool checkSort = false)
Parameters
tol
doubleedges
IEnumerable<Edge>checkSense
boolcheckSort
bool
Loop(double, Polyline2D)
create a loop from given lwpolyline template
public Loop(double tol, Polyline2D lwPolyline)
Parameters
tol
doublelwPolyline
Polyline2D
Properties
A0ProgeCadScript
public string A0ProgeCadScript { get; }
Property Value
A0QCadScript
public string A0QCadScript { get; }
Property Value
Area
(cached) area of the loop ( segment and arc are evaluated )
public double Area { get; }
Property Value
BBox
(cached) bbox of this loop WCS coords
public BBox3D BBox { get; }
Property Value
CSBox
(cached) bbox of this loop CS coords
public BBox3D CSBox { get; }
Property Value
Edges
loop edges ( line, arc )
public IReadOnlyList<Edge> Edges { get; }
Property Value
Length
(cached) loop perimeter length
public double Length { get; }
Property Value
MidPoint
(cached) geometric midpoint of all edges midpoint of this loop ( used in Contains for ray construction )
public Vector3D MidPoint { get; }
Property Value
Plane
plane where loop edges resides
public Plane3D Plane { get; }
Property Value
Tol
public double Tol { get; }
Property Value
Methods
Contains(double, Edge, LoopContainsEdgeMode)
test if given edge contained in this loop
public bool Contains(double tol, Edge edge, LoopContainsEdgeMode mode = LoopContainsEdgeMode.InsideOrPerimeter)
Parameters
tol
doubleedge
Edgemode
LoopContainsEdgeMode
Returns
Contains(double, Loop, LoopContainsEdgeMode)
states if this loop contains given other loop
public bool Contains(double tol, Loop other, LoopContainsEdgeMode mode = LoopContainsEdgeMode.InsideOrPerimeter)
Parameters
tol
doubleother
Loopmode
LoopContainsEdgeMode
Returns
ContainsPoint(double, Vector3D, LoopContainsPointMode)
states if given point is included into this loop
public bool ContainsPoint(double tol, Vector3D pt, LoopContainsPointMode mode)
Parameters
tol
doublept
Vector3Dmode
LoopContainsPointMode
Returns
DebugDump(int)
public string DebugDump(int digits = 3)
Parameters
digits
int
Returns
DxfEntity(double)
create dxf lwpolyline from this loop
public Polyline2D DxfEntity(double tol)
Parameters
tol
double
Returns
- Polyline2D
Equals(double, Loop)
check if two loops equals
public bool Equals(double tol, Loop other)
Parameters
Returns
InvertSense(double)
retrieve another loop with reversed edges with sense toggled
public Loop InvertSense(double tol)
Parameters
tol
double
Returns
Move(Vector3D)
move loop (plane and edges) of given delta
public Loop Move(Vector3D delta)
Parameters
delta
Vector3D
Returns
ProgeCadScript(bool)
public string ProgeCadScript(bool final = true)
Parameters
final
bool
Returns
QCadScript(bool)
qcad 2d script
public string QCadScript(bool final = true)
Parameters
final
booladds QQ command
Returns
ToHatch(double, HatchPattern, bool)
create an hatch from given loop, pattern
public Hatch ToHatch(double tol, HatchPattern pattern, bool associative = true)
Parameters
Returns
- Hatch
ToLwPolyline(double)
create dxf lwpolyline from this loop
public Polyline2D ToLwPolyline(double tol)
Parameters
tol
double
Returns
- Polyline2D
ToString()
public override string ToString()
Returns
Vertexes(double)
loop edge distinct filtered vertexes ( not optimized )
public IEnumerable<Vector3D> Vertexes(double tol)
Parameters
tol
double