Table of Contents

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

tol double
plane Plane3D
_edges IEnumerable<Edge>
checkSense bool
checkSort bool

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 double
edges IEnumerable<Edge>
plane Plane3D
checkSense 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 double
edges IEnumerable<Edge>
checkSense bool
checkSort bool

Loop(double, Polyline2D)

create a loop from given lwpolyline template

public Loop(double tol, Polyline2D lwPolyline)

Parameters

tol double
lwPolyline Polyline2D

Properties

A0ProgeCadScript

public string A0ProgeCadScript { get; }

Property Value

string

A0QCadScript

public string A0QCadScript { get; }

Property Value

string

Area

(cached) area of the loop ( segment and arc are evaluated )

public double Area { get; }

Property Value

double

BBox

(cached) bbox of this loop WCS coords

public BBox3D BBox { get; }

Property Value

BBox3D

CSBox

(cached) bbox of this loop CS coords

public BBox3D CSBox { get; }

Property Value

BBox3D

Edges

loop edges ( line, arc )

public IReadOnlyList<Edge> Edges { get; }

Property Value

IReadOnlyList<Edge>

Length

(cached) loop perimeter length

public double Length { get; }

Property Value

double

MidPoint

(cached) geometric midpoint of all edges midpoint of this loop ( used in Contains for ray construction )

public Vector3D MidPoint { get; }

Property Value

Vector3D

Plane

plane where loop edges resides

public Plane3D Plane { get; }

Property Value

Plane3D

Tol

public double Tol { get; }

Property Value

double

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 double
edge Edge
mode LoopContainsEdgeMode

Returns

bool

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 double
other Loop
mode LoopContainsEdgeMode

Returns

bool

ContainsPoint(double, Vector3D, LoopContainsPointMode)

states if given point is included into this loop

public bool ContainsPoint(double tol, Vector3D pt, LoopContainsPointMode mode)

Parameters

tol double
pt Vector3D
mode LoopContainsPointMode

Returns

bool

DebugDump(int)

public string DebugDump(int digits = 3)

Parameters

digits int

Returns

string

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

tol double
other Loop

Returns

bool

InvertSense(double)

retrieve another loop with reversed edges with sense toggled

public Loop InvertSense(double tol)

Parameters

tol double

Returns

Loop

Move(Vector3D)

move loop (plane and edges) of given delta

public Loop Move(Vector3D delta)

Parameters

delta Vector3D

Returns

Loop

ProgeCadScript(bool)

public string ProgeCadScript(bool final = true)

Parameters

final bool

Returns

string

QCadScript(bool)

qcad 2d script

public string QCadScript(bool final = true)

Parameters

final bool

adds QQ command

Returns

string

ToHatch(double, HatchPattern, bool)

create an hatch from given loop, pattern

public Hatch ToHatch(double tol, HatchPattern pattern, bool associative = true)

Parameters

tol double
pattern HatchPattern
associative bool

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

string

Vertexes(double)

loop edge distinct filtered vertexes ( not optimized )

public IEnumerable<Vector3D> Vertexes(double tol)

Parameters

tol double

Returns

IEnumerable<Vector3D>