Method SetFromGeCurve
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SetFromGeCurve(object)
Gives the polyline the vertices and bulges of a chain or loop, as AutoCAD's SetFromGeCurve, written as
DxfWriter writes one as a LWPOLYLINE: a GeoPolyline2, GeoPolylineArc2,
GeoPolygon2 or GeoPolygonArc2 on the normal (0, 0, 1) at no elevation, closed for a loop,
read back by the matching method of the plane to the bit; a GeoPolyline3, GeoPolylineArc3,
GeoPolygon3 or GeoPolygonArc3 whose every vertex is within the default point tolerance of
the plane through its first vertex square to the polyline's own Normal, and no point of its arcs further
off it than the planar tolerance (a half circle of radius 100 turned 0.001 out of it stands 0.1 off, and is written
in its own plane), in the system of that normal, at the elevation of its first vertex, so that a mirrored polyline stays
mirrored and a chain on one line has a plane to be in: the polyline (0, 0), (10, 0) at the elevation 5 takes the chain
from (0, 0, 5) to (20, 0, 5) and gives it back from ToGeoPolyline3() to the bit. Any other of those is
written in the system of the plane it lies in within the default tolerance, its normal turned up in its largest
component; the chain from (0, 0, 0) to (10 000, 0, 0.1), on one line and off the polyline's plane by more than the
tolerance, lies in none and is refused, not flattened. Its handle, layer, look, thickness and extended data are kept,
as DxfEntity's setters keep them. Where the shape is written anew, its widths and its linetype
generation (Plinegen) are not kept; a shape written as the shape it has now is written, as the one
GetGeometry() gives, leaves it as it is, widths and fitting and all.
public override void SetFromGeCurve(object geCurve)
Parameters
geCurveobjectThe chain or loop.
Exceptions
- ArgumentException
Thrown when the shape is not one of those, is a chain of space that lies neither in the plane of the polyline's normal nor in one plane of its own within the default tolerance (one on a line off the polyline's plane among them), or is not one of finite numbers.
- InvalidOperationException
Thrown when the polyline is erased.