Show / Hide Table of Contents

Class Line

The line is a IGeoObject. It is actually a line segment not an infinite line.

Inheritance
System.Object
IGeoObjectImpl
Line
Implements
IGeoObject
ILayer
IStyle
IOctTreeInsertable
System.IComparable
IFeedBack
System.ICloneable
IColorDef
ILineWidth
ILinePattern
System.Runtime.Serialization.ISerializable
ICurve
IExtentedableCurve
IExplicitPCurve3D
IJsonSerialize
IExportStep
Inherited Members
IGeoObjectImpl.isChanging
IGeoObjectImpl.MakeChange(IGeoObjectImpl, String)
IGeoObjectImpl.SetSerializationValue(String, Object)
IGeoObjectImpl.UniqueId
IGeoObjectImpl.WillChangeEvent
IGeoObjectImpl.DidChangeEvent
IGeoObjectImpl.FeedBackChangedEvent
IGeoObjectImpl.FireWillChange(GeoObjectChange)
IGeoObjectImpl.FireDidChange(GeoObjectChange)
IGeoObjectImpl.ModifyInverse(ModOp)
IGeoObjectImpl.HasChildren()
IGeoObjectImpl.NumChildren
IGeoObjectImpl.Child(Int32)
IGeoObjectImpl.Owner
IGeoObjectImpl.IsAttributeUsed(Object)
IGeoObjectImpl.AttributeChanged(INamedAttribute)
IGeoObjectImpl.CopyAttributes(IGeoObject)
IGeoObjectImpl.Attributes
IGeoObjectImpl.CustomAttributeKeys
IGeoObjectImpl.SetNamedAttribute(String, INamedAttribute)
IGeoObjectImpl.GetNamedAttribute(String)
IGeoObjectImpl.GetAttributeProperties(IFrame)
IGeoObjectImpl.UpdateAttributes(IAttributeListContainer)
IGeoObjectImpl.UserData
IGeoObjectImpl.isModifyingWithMouse
IGeoObjectImpl.ModifyWithMouse(Object, String, Boolean)
IGeoObjectImpl.PrePaintTo3D(IPaintTo3D)
IGeoObjectImpl.PaintTo3DList(IPaintTo3D, ICategorizedDislayLists)
IGeoObjectImpl.OwnedItems
IGeoObjectImpl.IsVisible
IGeoObjectImpl.PropagateAttributes(Layer, ColorDef)
IGeoObjectImpl.Decompose()
IGeoObjectImpl.Actuator
IGeoObjectImpl.SetColorDef(ColorDef, ColorDef)
IGeoObjectImpl.Layer
IGeoObjectImpl.Style
IGeoObjectImpl.StyleIsValid
IGeoObjectImpl.GetExtent(IGeoObject, Projection, Boolean)
IGeoObjectImpl.IsOwnedByBlockRef(IGeoObject)
IGeoObjectImpl.ChangingUserData(IGeoObject, String, Object)
IGeoObjectImpl.ChangingUserData(IGeoObject, String, Object, Boolean)
IGeoObjectImpl.ICloneable.Clone()
IGeoObjectImpl.IComparable.CompareTo(Object)
IGeoObjectImpl.GetAdditionalContextMenueEvent
IGeoObjectImpl.IFeedBack.GetExtent()
IGeoObjectImpl.JsonGetObjectData(IJsonWriteData)
IGeoObjectImpl.JsonSetObjectData(IJsonReadData)
IGeoObjectImpl.JsonSerializationDone()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability.GeoObject
Assembly: CADability.dll
Syntax
[Serializable]
public class Line : IGeoObjectImpl, IGeoObject, ILayer, IStyle, IOctTreeInsertable, IComparable, IFeedBack, ICloneable, IColorDef, ILineWidth, ILinePattern, ISerializable, ICurve, IExtentedableCurve, ISimpleCurve, IExplicitPCurve3D, IJsonSerialize, IExportStep

Constructors

| Improve this Doc View Source

Line()

Empty protected constructor.

Declaration
protected Line()
| Improve this Doc View Source

Line(SerializationInfo, StreamingContext)

Constructor required by deserialization

Declaration
protected Line(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

SerializationInfo

System.Runtime.Serialization.StreamingContext context

StreamingContext

Fields

| Improve this Doc View Source

Constructor

Provide a delegate here if you want you Line derived class to be created each time CADability creates a line.

Declaration
public static Line.ConstructionDelegate Constructor
Field Value
Type Description
Line.ConstructionDelegate
| Improve this Doc View Source

OnPaintTo3D

Declaration
public static Line.PaintTo3DDelegate OnPaintTo3D
Field Value
Type Description
Line.PaintTo3DDelegate

Properties

| Improve this Doc View Source

ColorDef

Declaration
public ColorDef ColorDef { get; set; }
Property Value
Type Description
ColorDef
| Improve this Doc View Source

Description

Declaration
public override string Description { get; }
Property Value
Type Description
System.String
Overrides
IGeoObjectImpl.Description
| Improve this Doc View Source

EndDirection

Declaration
public GeoVector EndDirection { get; }
Property Value
Type Description
GeoVector
| Improve this Doc View Source

EndPoint

Sets or gets the endpoint of the line. Setting the endpoint causes the line to fire the WillChangeEvent and the DidChangeEvent.

Declaration
public virtual GeoPoint EndPoint { get; set; }
Property Value
Type Description
GeoPoint
| Improve this Doc View Source

IsClosed

Declaration
public bool IsClosed { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsSingular

Declaration
public bool IsSingular { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Length

Gets or sets the length of the line. Setting the length modifies the endpoint and keeps the startpoint and causes the line to fire the WillChangeEvent and the DidChangeEvent.

Declaration
public double Length { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

LengthFixPoint

do not use, used only internaly.

Declaration
public GeoPoint LengthFixPoint { get; }
Property Value
Type Description
GeoPoint
| Improve this Doc View Source

LinePattern

Declaration
public LinePattern LinePattern { get; set; }
Property Value
Type Description
LinePattern
| Improve this Doc View Source

LineWidth

Declaration
public LineWidth LineWidth { get; set; }
Property Value
Type Description
LineWidth
| Improve this Doc View Source

PreferredStyle

Declaration
public override Style.EDefaultFor PreferredStyle { get; }
Property Value
Type Description
Style.EDefaultFor
Overrides
IGeoObjectImpl.PreferredStyle
| Improve this Doc View Source

StartDirection

Declaration
public GeoVector StartDirection { get; }
Property Value
Type Description
GeoVector
| Improve this Doc View Source

StartPoint

Sets or gets the startpoint of the line. Setting the startpoint causes the line to fire the WillChangeEvent and the DidChangeEvent.

Declaration
public virtual GeoPoint StartPoint { get; set; }
Property Value
Type Description
GeoPoint

Methods

| Improve this Doc View Source

Clone()

Overrides Clone() and implements Clone(). Returns a clone of this line.

Declaration
public override IGeoObject Clone()
Returns
Type Description
IGeoObject

the clone

Overrides
IGeoObjectImpl.Clone()
| Improve this Doc View Source

Construct()

The only way to create a line. There are no public constructors for the line to assure that this is the only way to construct a line.

Declaration
public static Line Construct()
Returns
Type Description
Line
| Improve this Doc View Source

CopyGeometry(IGeoObject)

Overrides CopyGeometry(IGeoObject) and implements CopyGeometry(IGeoObject). Copies the start and endpoint of the given line. This method causes the line to fire the WillChangeEvent and the DidChangeEvent.

Declaration
public override void CopyGeometry(IGeoObject ToCopyFrom)
Parameters
Type Name Description
IGeoObject ToCopyFrom

must be a line, to copy data from

Overrides
IGeoObjectImpl.CopyGeometry(IGeoObject)
| Improve this Doc View Source

DirectionAt(Double)

Implements DirectionAt(Double)

Declaration
public GeoVector DirectionAt(double Position)
Parameters
Type Name Description
System.Double Position
Returns
Type Description
GeoVector
| Improve this Doc View Source

FindSnapPoint(SnapPointFinder)

Overrides FindSnapPoint(SnapPointFinder)

Declaration
public override void FindSnapPoint(SnapPointFinder spf)
Parameters
Type Name Description
SnapPointFinder spf
Overrides
IGeoObjectImpl.FindSnapPoint(SnapPointFinder)
| Improve this Doc View Source

GetBoundingCube()

Overrides GetBoundingCube()

Declaration
public override BoundingCube GetBoundingCube()
Returns
Type Description
BoundingCube
Overrides
IGeoObjectImpl.GetBoundingCube()
| Improve this Doc View Source

GetExtent(Projection, ExtentPrecision)

Overrides GetExtent(Projection, ExtentPrecision)

Declaration
public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
Parameters
Type Name Description
Projection projection
ExtentPrecision extentPrecision
Returns
Type Description
BoundingRect
Overrides
IGeoObjectImpl.GetExtent(Projection, ExtentPrecision)
| Improve this Doc View Source

GetExtent(Double)

Overrides GetExtent(Double)

Declaration
public override BoundingCube GetExtent(double precision)
Parameters
Type Name Description
System.Double precision
Returns
Type Description
BoundingCube
Overrides
IGeoObjectImpl.GetExtent(Double)
| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Implements ISerializable:GetObjectData

Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context
Overrides
IGeoObjectImpl.GetObjectData(SerializationInfo, StreamingContext)
| Improve this Doc View Source

GetPlanarState()

Implements GetPlanarState()

Declaration
public PlanarState GetPlanarState()
Returns
Type Description
PlanarState
| Improve this Doc View Source

GetPlane()

Implements GetPlane()

Declaration
public Plane GetPlane()
Returns
Type Description
Plane
| Improve this Doc View Source

GetProjectedCurve(Plane)

Implements GetProjectedCurve(Plane)

Declaration
public ICurve2D GetProjectedCurve(Plane p)
Parameters
Type Name Description
Plane p
Returns
Type Description
ICurve2D
| Improve this Doc View Source

GetQuadTreeItem(Projection, ExtentPrecision)

Overrides GetQuadTreeItem(Projection, ExtentPrecision)

Declaration
public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
Parameters
Type Name Description
Projection projection
ExtentPrecision extentPrecision
Returns
Type Description
IQuadTreeInsertableZ
Overrides
IGeoObjectImpl.GetQuadTreeItem(Projection, ExtentPrecision)
| Improve this Doc View Source

GetShowProperties(IFrame)

Liefert die Liste aller anzuzeigenden Properties

Declaration
public override IShowProperty GetShowProperties(IFrame Frame)
Parameters
Type Name Description
IFrame Frame
Returns
Type Description
IShowProperty
Overrides
IGeoObjectImpl.GetShowProperties(IFrame)
| Improve this Doc View Source

HasValidData()

Overrides HasValidData()

Declaration
public override bool HasValidData()
Returns
Type Description
System.Boolean
Overrides
IGeoObjectImpl.HasValidData()
| Improve this Doc View Source

HitTest(ref BoundingCube, Double)

Overrides HitTest(ref BoundingCube, Double)

Declaration
public override bool HitTest(ref BoundingCube cube, double precision)
Parameters
Type Name Description
BoundingCube cube
System.Double precision
Returns
Type Description
System.Boolean
Overrides
IGeoObjectImpl.HitTest(ref BoundingCube, Double)
| Improve this Doc View Source

HitTest(Projection, BoundingRect, Boolean)

Overrides HitTest(Projection, BoundingRect, Boolean)

Declaration
public override bool HitTest(Projection projection, BoundingRect rect, bool onlyInside)
Parameters
Type Name Description
Projection projection
BoundingRect rect
System.Boolean onlyInside
Returns
Type Description
System.Boolean
Overrides
IGeoObjectImpl.HitTest(Projection, BoundingRect, Boolean)
| Improve this Doc View Source

HitTest(Projection.PickArea, Boolean)

Overrides HitTest(Projection.PickArea, Boolean)

Declaration
public override bool HitTest(Projection.PickArea area, bool onlyInside)
Parameters
Type Name Description
Projection.PickArea area
System.Boolean onlyInside
Returns
Type Description
System.Boolean
Overrides
IGeoObjectImpl.HitTest(Projection.PickArea, Boolean)
| Improve this Doc View Source

IsInPlane(Plane)

Implements IsInPlane(Plane)

Declaration
public bool IsInPlane(Plane p)
Parameters
Type Name Description
Plane p
Returns
Type Description
System.Boolean
| Improve this Doc View Source

MakeLine(GeoPoint, GeoPoint)

Declaration
public static Line MakeLine(GeoPoint p1, GeoPoint p2)
Parameters
Type Name Description
GeoPoint p1
GeoPoint p2
Returns
Type Description
Line
| Improve this Doc View Source

Modify(ModOp)

Overrides Modify(ModOp) and implements Modify(ModOp).

Declaration
public override void Modify(ModOp m)
Parameters
Type Name Description
ModOp m

the operator for the modification

Overrides
IGeoObjectImpl.Modify(ModOp)
| Improve this Doc View Source

PaintTo3D(IPaintTo3D)

Overrides PaintTo3D(IPaintTo3D)

Declaration
public override void PaintTo3D(IPaintTo3D paintTo3D)
Parameters
Type Name Description
IPaintTo3D paintTo3D
Overrides
IGeoObjectImpl.PaintTo3D(IPaintTo3D)
| Improve this Doc View Source

PointAt(Double)

Implements PointAt(Double)

Declaration
public GeoPoint PointAt(double Position)
Parameters
Type Name Description
System.Double Position
Returns
Type Description
GeoPoint
| Improve this Doc View Source

Position(GeoPoint, GeoVector, Double)

Overrides Position(GeoPoint, GeoVector, Double)

Declaration
public override double Position(GeoPoint fromHere, GeoVector direction, double precision)
Parameters
Type Name Description
GeoPoint fromHere
GeoVector direction
System.Double precision
Returns
Type Description
System.Double
Overrides
IGeoObjectImpl.Position(GeoPoint, GeoVector, Double)
| Improve this Doc View Source

PositionOf(GeoPoint)

Implements PositionOf(GeoPoint)

Declaration
public double PositionOf(GeoPoint p)
Parameters
Type Name Description
GeoPoint p
Returns
Type Description
System.Double
| Improve this Doc View Source

PositionOf(GeoPoint, Plane)

Implements PositionOf(GeoPoint, Plane)

Declaration
public double PositionOf(GeoPoint p, Plane pl)
Parameters
Type Name Description
GeoPoint p
Plane pl
Returns
Type Description
System.Double
| Improve this Doc View Source

PositionOf(GeoPoint, Double)

Implements PositionOf(GeoPoint, Double)

Declaration
public double PositionOf(GeoPoint p, double prefer)
Parameters
Type Name Description
GeoPoint p
System.Double prefer
Returns
Type Description
System.Double
| Improve this Doc View Source

PrepareDisplayList(Double)

Overrides PrepareDisplayList(Double)

Declaration
public override void PrepareDisplayList(double precision)
Parameters
Type Name Description
System.Double precision
Overrides
IGeoObjectImpl.PrepareDisplayList(Double)
| Improve this Doc View Source

SetTwoPoints(GeoPoint, GeoPoint)

Sets the start and endpoint of the line. This method causes the line to fire the WillChangeEvent and the DidChangeEvent.

Declaration
public void SetTwoPoints(GeoPoint startPoint, GeoPoint endPoint)
Parameters
Type Name Description
GeoPoint startPoint

the new startpoint

GeoPoint endPoint

the new endpoint

| Improve this Doc View Source

Split(Double)

Implements Split(Double)

Declaration
public ICurve[] Split(double Position)
Parameters
Type Name Description
System.Double Position
Returns
Type Description
ICurve[]
| Improve this Doc View Source

Split(Double, Double)

Implements Split(Double, Double)

Declaration
public ICurve[] Split(double Position1, double Position2)
Parameters
Type Name Description
System.Double Position1
System.Double Position2
Returns
Type Description
ICurve[]
| Improve this Doc View Source

Trim(Double, Double)

Implements Trim(Double, Double)

Declaration
public void Trim(double StartPos, double EndPos)
Parameters
Type Name Description
System.Double StartPos
System.Double EndPos

Events

| Improve this Doc View Source

Constructed

Declaration
public static event Line.ConstructedDelegate Constructed
Event Type
Type Description
Line.ConstructedDelegate

Explicit Interface Implementations

| Improve this Doc View Source

IColorDef.SetTopLevel(ColorDef)

Declaration
void IColorDef.SetTopLevel(ColorDef newValue)
Parameters
Type Name Description
ColorDef newValue
| Improve this Doc View Source

IColorDef.SetTopLevel(ColorDef, Boolean)

Declaration
void IColorDef.SetTopLevel(ColorDef newValue, bool overwriteChildNullColor)
Parameters
Type Name Description
ColorDef newValue
System.Boolean overwriteChildNullColor
| Improve this Doc View Source

ICurve.Approximate(Boolean, Double)

Declaration
ICurve ICurve.Approximate(bool linesOnly, double maxError)
Parameters
Type Name Description
System.Boolean linesOnly
System.Double maxError
Returns
Type Description
ICurve
| Improve this Doc View Source

ICurve.Clone()

Declaration
ICurve ICurve.Clone()
Returns
Type Description
ICurve
| Improve this Doc View Source

ICurve.CloneModified(ModOp)

Declaration
ICurve ICurve.CloneModified(ModOp m)
Parameters
Type Name Description
ModOp m
Returns
Type Description
ICurve
| Improve this Doc View Source

ICurve.DistanceTo(GeoPoint)

Declaration
double ICurve.DistanceTo(GeoPoint p)
Parameters
Type Name Description
GeoPoint p
Returns
Type Description
System.Double
| Improve this Doc View Source

ICurve.GetExtent()

Declaration
BoundingCube ICurve.GetExtent()
Returns
Type Description
BoundingCube
| Improve this Doc View Source

ICurve.GetExtrema(GeoVector)

Declaration
double[] ICurve.GetExtrema(GeoVector direction)
Parameters
Type Name Description
GeoVector direction
Returns
Type Description
System.Double[]
| Improve this Doc View Source

ICurve.GetPlaneIntersection(Plane)

Declaration
double[] ICurve.GetPlaneIntersection(Plane plane)
Parameters
Type Name Description
Plane plane
Returns
Type Description
System.Double[]
| Improve this Doc View Source

ICurve.GetSavePositions()

Declaration
double[] ICurve.GetSavePositions()
Returns
Type Description
System.Double[]
| Improve this Doc View Source

ICurve.GetSelfIntersections()

Declaration
double[] ICurve.GetSelfIntersections()
Returns
Type Description
System.Double[]
| Improve this Doc View Source

ICurve.HitTest(BoundingCube)

Declaration
bool ICurve.HitTest(BoundingCube cube)
Parameters
Type Name Description
BoundingCube cube
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ICurve.IsComposed

Declaration
bool ICurve.IsComposed { get; }
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ICurve.Length

Declaration
double ICurve.Length { get; }
Returns
Type Description
System.Double
| Improve this Doc View Source

ICurve.ParameterToPosition(Double)

Declaration
double ICurve.ParameterToPosition(double parameter)
Parameters
Type Name Description
System.Double parameter
Returns
Type Description
System.Double
| Improve this Doc View Source

ICurve.PositionAtLength(Double)

Declaration
double ICurve.PositionAtLength(double position)
Parameters
Type Name Description
System.Double position
Returns
Type Description
System.Double
| Improve this Doc View Source

ICurve.PositionToParameter(Double)

Declaration
double ICurve.PositionToParameter(double position)
Parameters
Type Name Description
System.Double position
Returns
Type Description
System.Double
| Improve this Doc View Source

ICurve.Reverse()

Declaration
void ICurve.Reverse()
| Improve this Doc View Source

ICurve.SameGeometry(ICurve, Double)

Declaration
bool ICurve.SameGeometry(ICurve other, double precision)
Parameters
Type Name Description
ICurve other
System.Double precision
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ICurve.SubCurves

Declaration
ICurve[] ICurve.SubCurves { get; }
Returns
Type Description
ICurve[]
| Improve this Doc View Source

ICurve.TangentPosition(GeoVector)

Declaration
double[] ICurve.TangentPosition(GeoVector direction)
Parameters
Type Name Description
GeoVector direction
Returns
Type Description
System.Double[]
| Improve this Doc View Source

ICurve.TryPointDeriv2At(Double, out GeoPoint, out GeoVector, out GeoVector)

Declaration
bool ICurve.TryPointDeriv2At(double position, out GeoPoint point, out GeoVector deriv1, out GeoVector deriv2)
Parameters
Type Name Description
System.Double position
GeoPoint point
GeoVector deriv1
GeoVector deriv2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IExtentedableCurve.GetExtendedCurve(ExtentedableCurveDirection)

Declaration
IOctTreeInsertable IExtentedableCurve.GetExtendedCurve(ExtentedableCurveDirection direction)
Parameters
Type Name Description
ExtentedableCurveDirection direction
Returns
Type Description
IOctTreeInsertable
| Improve this Doc View Source

IExplicitPCurve3D.GetExplicitPCurve3D()

Declaration
ExplicitPCurve3D IExplicitPCurve3D.GetExplicitPCurve3D()
Returns
Type Description
ExplicitPCurve3D
| Improve this Doc View Source

IExportStep.Export(ExportStep, Boolean)

Declaration
int IExportStep.Export(ExportStep export, bool topLevel)
Parameters
Type Name Description
ExportStep export
System.Boolean topLevel
Returns
Type Description
System.Int32
| Improve this Doc View Source

IJsonSerialize.GetObjectData(IJsonWriteData)

Declaration
void IJsonSerialize.GetObjectData(IJsonWriteData data)
Parameters
Type Name Description
IJsonWriteData data
| Improve this Doc View Source

IJsonSerialize.SetObjectData(IJsonReadData)

Declaration
void IJsonSerialize.SetObjectData(IJsonReadData data)
Parameters
Type Name Description
IJsonReadData data

Implements

IGeoObject
ILayer
IStyle
IOctTreeInsertable
System.IComparable
IFeedBack
System.ICloneable
IColorDef
ILineWidth
ILinePattern
System.Runtime.Serialization.ISerializable
ICurve
IExtentedableCurve
IExplicitPCurve3D
IJsonSerialize
IExportStep
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX