Table of Contents

Class Geometry

Namespace
SearchAThing.Sci
Assembly
netcore-sci.dll

base abstract type for geometries such as Vector3D, Line3D, Arc3D and Circle3D

public abstract class Geometry
Inheritance
Geometry
Derived
Inherited Members

Constructors

Geometry(GeometryType)

protected Geometry(GeometryType type)

Parameters

type GeometryType

Properties

DxfEntity

dxf entity representing this geom

public abstract EntityObject DxfEntity { get; }

Property Value

EntityObject

GeomFrom

start point

public abstract Vector3D GeomFrom { get; }

Property Value

Vector3D

GeomTo

end point

public abstract Vector3D GeomTo { get; }

Property Value

Vector3D

GeomType

type of geometry

public GeometryType GeomType { get; protected set; }

Property Value

GeometryType

Length

geometry length ( 0 for point, line length for lines, perimeter for arc/circles )

public abstract double Length { get; }

Property Value

double

MidPoint

public abstract Vector3D MidPoint { get; }

Property Value

Vector3D

Vertexes

vertexes of this geom ( can be 1 for points, 2 for line/arc/circles )

public abstract IEnumerable<Vector3D> Vertexes { get; }

Property Value

IEnumerable<Vector3D>

Methods

BBox(double)

bbox of this geom

public abstract BBox3D BBox(double tol)

Parameters

tol double

Returns

BBox3D

Copy()

create copy of this geometry.

public abstract Geometry Copy()

Returns

Geometry

Remarks

it's required to call base.CopyFrom(other) to ensure geometry properties to be copied.

Divide(int, bool)

find split points for this geometry splitter int cnt parts

public abstract IEnumerable<Vector3D> Divide(int cnt, bool include_endpoints = false)

Parameters

cnt int
include_endpoints bool

if true GeomFrom and GeomTo will added

Returns

IEnumerable<Vector3D>

GeomEquals(double, Geometry, bool)

states if this geom equals to given other

public abstract bool GeomEquals(double tol, Geometry other, bool checkSense = false)

Parameters

tol double

length tolerance

other Geometry

other geom

checkSense bool

if false two geometry with different sense but same space coverage are considered equals

Returns

bool

GeomIntersect(double, Geometry, GeomSegmentMode, GeomSegmentMode)

find intersections between this and another geometry resulting in zero or more geometries.

public abstract IEnumerable<Geometry> GeomIntersect(double tol, Geometry other, GeomSegmentMode thisSegmentMode = GeomSegmentMode.FromTo, GeomSegmentMode otherSegmentMode = GeomSegmentMode.FromTo)

Parameters

tol double
other Geometry
thisSegmentMode GeomSegmentMode

if this is Line3D specifies how to consider

otherSegmentMode GeomSegmentMode

if other is Line3D specifies how to consider

Returns

IEnumerable<Geometry>

Move(Vector3D)

public abstract Geometry Move(Vector3D delta)

Parameters

delta Vector3D

Returns

Geometry

Split(double, IEnumerable<Vector3D>)

split geometry in given break points. precondition: breaks must lie on the geometry perimeter

public abstract IEnumerable<Geometry> Split(double tol, IEnumerable<Vector3D> breaks)

Parameters

tol double
breaks IEnumerable<Vector3D>

Returns

IEnumerable<Geometry>

Operators

implicit operator EntityObject(Geometry)

convert to dxf entity

public static implicit operator EntityObject(Geometry geom)

Parameters

geom Geometry

Returns

EntityObject