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
GeomTo
end point
public abstract Vector3D GeomTo { get; }
Property Value
GeomType
type of geometry
public GeometryType GeomType { get; protected set; }
Property Value
Length
geometry length ( 0 for point, line length for lines, perimeter for arc/circles )
public abstract double Length { get; }
Property Value
MidPoint
public abstract Vector3D MidPoint { get; }
Property Value
Vertexes
vertexes of this geom ( can be 1 for points, 2 for line/arc/circles )
public abstract IEnumerable<Vector3D> Vertexes { get; }
Property Value
Methods
BBox(double)
bbox of this geom
public abstract BBox3D BBox(double tol)
Parameters
tol
double
Returns
Copy()
create copy of this geometry.
public abstract Geometry Copy()
Returns
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
Returns
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
doublelength tolerance
other
Geometryother geom
checkSense
boolif false two geometry with different sense but same space coverage are considered equals
Returns
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
doubleother
GeometrythisSegmentMode
GeomSegmentModeif this is Line3D specifies how to consider
otherSegmentMode
GeomSegmentModeif other is Line3D specifies how to consider
Returns
Move(Vector3D)
public abstract Geometry Move(Vector3D delta)
Parameters
delta
Vector3D
Returns
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
doublebreaks
IEnumerable<Vector3D>
Returns
Operators
implicit operator EntityObject(Geometry)
convert to dxf entity
public static implicit operator EntityObject(Geometry geom)
Parameters
geom
Geometry
Returns
- EntityObject