Show / Hide Table of Contents

Class IGeoObjectImpl

This class helps to implement IGeoObject by implementing some IGeoObject methods in a default way and by offering some helper methods.

Inheritance
System.Object
IGeoObjectImpl
Block
BlockRef
BSpline
Dimension
Ellipse
Face
GeneralCurve
Icon
Line
Path
Picture
Point
Polyline
Shell
Solid
Text
UnscaledGeoObject
Implements
IGeoObject
ILayer
IStyle
IOctTreeInsertable
System.IComparable
System.Runtime.Serialization.ISerializable
IFeedBack
System.ICloneable
Inherited Members
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
public abstract class IGeoObjectImpl : IGeoObject, ILayer, IStyle, IOctTreeInsertable, IComparable, ISerializable, IFeedBack, ICloneable

Constructors

| Improve this Doc View Source

IGeoObjectImpl()

Constructor that initializes some members. Must always be called

Declaration
protected IGeoObjectImpl()
| Improve this Doc View Source

IGeoObjectImpl(SerializationInfo, StreamingContext)

Constructor required by deserialization

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

SerializationInfo

System.Runtime.Serialization.StreamingContext context

StreamingContext

| Improve this Doc View Source

IGeoObjectImpl(StreamingContext)

Declaration
protected IGeoObjectImpl(StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.StreamingContext context

Fields

| Improve this Doc View Source

isChanging

Each call to FireWillChange(GeoObjectChange) increments this value, each call to FireDidChange(GeoObjectChange) decrements this value. If isChanging is 0 then the object is in a stable state.

Declaration
protected int isChanging
Field Value
Type Description
System.Int32
| Improve this Doc View Source

isModifyingWithMouse

depreciated

Declaration
protected bool isModifyingWithMouse
Field Value
Type Description
System.Boolean

Properties

| Improve this Doc View Source

Actuator

Sets or gets the drive assiziated with this GeoObject

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

Attributes

Implements Attributes. Returns a collection af all CADability attributes used by this GeoObject. Non CADability attributes must be handled by your code.

Declaration
public INamedAttribute[] Attributes { get; }
Property Value
Type Description
INamedAttribute[]
| Improve this Doc View Source

CustomAttributeKeys

Declaration
public virtual string[] CustomAttributeKeys { get; }
Property Value
Type Description
System.String[]
| Improve this Doc View Source

Description

Returns a textual description of the GeoObject. Mainly used for debugging purposes

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

IsVisible

Reads or writes the visible flag. Invisible objects ar not displayed.

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

Layer

Fully implements Layer. Stores the layer in a private member. Setting raises the WillChangeEvent and DidChangeEvent.

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

NumChildren

Overrides NumChildren. The default implementation returns 0.

Declaration
public virtual int NumChildren { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

OwnedItems

Returns an array of objects owned by this object. E.g. a face is owned by a shell.

Declaration
public virtual IGeoObject[] OwnedItems { get; }
Property Value
Type Description
IGeoObject[]
| Improve this Doc View Source

Owner

Overrides Owner. Fully implements set and get property and saves the value in a private member.

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

PreferredStyle

Returns the preferred style for this objects, see Style.EDefaultFor.

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

Style

Fully implements Style. Stores the style in a private member. Setting raises the WillChangeEvent and DidChangeEvent.

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

StyleIsValid

Returns true, if the setting of the style of this object is identical to the setting of the individual attributes, false otherwise

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

UniqueId

Declaration
public int UniqueId { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

UserData

Fully implements UserData. No need to override.

Declaration
public virtual UserData UserData { get; }
Property Value
Type Description
UserData

Methods

| Improve this Doc View Source

AttributeChanged(INamedAttribute)

Overrides AttributeChanged(INamedAttribute). Checks all CADability attributes. Checking your own attributes is left to your code.

Declaration
public virtual bool AttributeChanged(INamedAttribute attribute)
Parameters
Type Name Description
INamedAttribute attribute
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ChangingUserData(IGeoObject, String, Object)

Declaration
public static IDisposable ChangingUserData(IGeoObject involved, string key, object oldValue)
Parameters
Type Name Description
IGeoObject involved
System.String key
System.Object oldValue
Returns
Type Description
System.IDisposable
| Improve this Doc View Source

ChangingUserData(IGeoObject, String, Object, Boolean)

Declaration
public static IDisposable ChangingUserData(IGeoObject involved, string key, object oldValue, bool onlyAttribute)
Parameters
Type Name Description
IGeoObject involved
System.String key
System.Object oldValue
System.Boolean onlyAttribute
Returns
Type Description
System.IDisposable
| Improve this Doc View Source

Child(Int32)

Overrides Child(Int32). The default implementation throws a GeoObjectException NoChildren.

Declaration
public virtual IGeoObject Child(int Index)
Parameters
Type Name Description
System.Int32 Index
Returns
Type Description
IGeoObject
| Improve this Doc View Source

Clone()

Overrides Clone(). Must be implemented by each GeoObject. No default implementation.

Declaration
public abstract IGeoObject Clone()
Returns
Type Description
IGeoObject
| Improve this Doc View Source

CopyAttributes(IGeoObject)

Implements CopyAttributes(IGeoObject). The default implementation handles all CADability attributes and leaves the handling of non CADability attributes to your code.

Declaration
public virtual void CopyAttributes(IGeoObject ToCopyFrom)
Parameters
Type Name Description
IGeoObject ToCopyFrom

GeoObject to copy attribute data from

| Improve this Doc View Source

CopyGeometry(IGeoObject)

Overrides CopyGeometry(IGeoObject), but doesn't implement it. Must be implemented by each GeoObject.

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

GeoObject to copy geometrical data from

| Improve this Doc View Source

Decompose()

Decomposes this GeoObject into simpler GeoObjects. May return null if there are no simpler objects.

Declaration
public virtual GeoObjectList Decompose()
Returns
Type Description
GeoObjectList
| Improve this Doc View Source

FindSnapPoint(SnapPointFinder)

Implements FindSnapPoint(SnapPointFinder), but does nothing. Should be overridden.

Declaration
public virtual void FindSnapPoint(SnapPointFinder spf)
Parameters
Type Name Description
SnapPointFinder spf
| Improve this Doc View Source

FireDidChange(GeoObjectChange)

Helper method to raise the DidChangeEvent.

Declaration
protected void FireDidChange(GeoObjectChange Change)
Parameters
Type Name Description
GeoObjectChange Change

type of chage that did happen

| Improve this Doc View Source

FireWillChange(GeoObjectChange)

Helper method to rais the WillChangeEvent.

Declaration
protected void FireWillChange(GeoObjectChange Change)
Parameters
Type Name Description
GeoObjectChange Change

type of chage that is about to happen

| Improve this Doc View Source

GetAttributeProperties(IFrame)

Implements GetAttributeProperties(IFrame). The default implementation returns ShowProperties for all CADability attributes.

Declaration
public virtual IShowProperty[] GetAttributeProperties(IFrame Frame)
Parameters
Type Name Description
IFrame Frame

the frame of the view

Returns
Type Description
IShowProperty[]

list of showproperties

| Improve this Doc View Source

GetBoundingCube()

Implements GetBoundingCube() abstract. Must be overridden.

Declaration
public abstract BoundingCube GetBoundingCube()
Returns
Type Description
BoundingCube

the bounding cube

| Improve this Doc View Source

GetExtent(IGeoObject, Projection, Boolean)

Returns the bounding rectangle of the GeoObject with respect to a specified projection

Declaration
public static BoundingRect GetExtent(IGeoObject go, Projection projection, bool regardLineWidth)
Parameters
Type Name Description
IGeoObject go

the GeoObject

Projection projection

the projection

System.Boolean regardLineWidth

regard line with

Returns
Type Description
BoundingRect

the bounding rectangle

| Improve this Doc View Source

GetExtent(Projection, ExtentPrecision)

Returns the 2 dimensional extent of objects for a specific projection.

Declaration
public abstract BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
Parameters
Type Name Description
Projection projection

The projection for which the extent is beeing queried

ExtentPrecision extentPrecision

Raw or exact extent

Returns
Type Description
BoundingRect

The 2 dimensional extent.

| Improve this Doc View Source

GetExtent(Double)

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

GetNamedAttribute(String)

Implements GetNamedAttribute(String). The default implementation handles all CADability attributes and leaves the handling of non CADability attributes to your code.

Declaration
public virtual INamedAttribute GetNamedAttribute(string key)
Parameters
Type Name Description
System.String key

key or typename of attribute to set

Returns
Type Description
INamedAttribute

the named attribute

| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Implements ISerializable.GetObjectData. Saves UserData, Layer and Style. All other properties of the GeoObject must be saved by the derived class. don't forget to call the base implementation

Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

info

System.Runtime.Serialization.StreamingContext context

context

| Improve this Doc View Source

GetQuadTreeItem(Projection, ExtentPrecision)

Deprecated.

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

GetShowProperties(IFrame)

Should be overridden and return a IShowProperty derived object that handles the display and modification of the properties of the IGeoObject derived object. Default implementation return null.

Declaration
public virtual IShowProperty GetShowProperties(IFrame Frame)
Parameters
Type Name Description
IFrame Frame
Returns
Type Description
IShowProperty
| Improve this Doc View Source

HasChildren()

Overrides HasChildren(). The deafult implementation returns false.

Declaration
public virtual bool HasChildren()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

HasValidData()

Default implementation of IGeoObject.HasValidData. Returns true. Override if the derived object can decide itself.

Declaration
public virtual bool HasValidData()
Returns
Type Description
System.Boolean

true

| Improve this Doc View Source

HitTest(ref BoundingCube, Double)

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

HitTest(Projection, BoundingRect, Boolean)

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

HitTest(Projection.PickArea, Boolean)

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

IsAttributeUsed(Object)

/// Overrides IsAttributeUsed(Object). The default implementation recursively calls IsAttributeUsed for all children (if any) and then checks the usage for all attributes implemented by CADability. No checks are performed for non CADability attributes. So you can override this method to handle your own attributes and call the base implementation for CADability attributes.

Declaration
public virtual bool IsAttributeUsed(object attribute)
Parameters
Type Name Description
System.Object attribute

attribut to check

Returns
Type Description
System.Boolean

true if used by this GeoObject

| Improve this Doc View Source

IsOwnedByBlockRef(IGeoObject)

Checks whether the GeoObject is owned by a BlockRef object.

Declaration
public static bool IsOwnedByBlockRef(IGeoObject toTest)
Parameters
Type Name Description
IGeoObject toTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

JsonGetObjectData(IJsonWriteData)

Declaration
protected void JsonGetObjectData(IJsonWriteData data)
Parameters
Type Name Description
IJsonWriteData data
| Improve this Doc View Source

JsonSerializationDone()

Declaration
protected void JsonSerializationDone()
| Improve this Doc View Source

JsonSetObjectData(IJsonReadData)

Declaration
protected void JsonSetObjectData(IJsonReadData data)
Parameters
Type Name Description
IJsonReadData data
| Improve this Doc View Source

MakeChange(IGeoObjectImpl, String)

Declaration
public static IDisposable MakeChange(IGeoObjectImpl geoObject, string propertyName)
Parameters
Type Name Description
IGeoObjectImpl geoObject
System.String propertyName
Returns
Type Description
System.IDisposable
| Improve this Doc View Source

Modify(ModOp)

Overrides Modify(ModOp). Must be implemented by each GeoObject. No default implementation.

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

the modification

| Improve this Doc View Source

ModifyInverse(ModOp)

Modify with the inverse modification. Calls Modify(m.GetInverse());

Declaration
public virtual void ModifyInverse(ModOp m)
Parameters
Type Name Description
ModOp m
| Improve this Doc View Source

ModifyWithMouse(Object, String, Boolean)

depreciated

Declaration
public virtual bool ModifyWithMouse(object sender, string propertyName, bool startModify)
Parameters
Type Name Description
System.Object sender
System.String propertyName
System.Boolean startModify
Returns
Type Description
System.Boolean
| Improve this Doc View Source

PaintTo3D(IPaintTo3D)

Patin the object to th IPaintTo3D interface.

Declaration
public abstract void PaintTo3D(IPaintTo3D paintTo3D)
Parameters
Type Name Description
IPaintTo3D paintTo3D

Target for the paint operation

| Improve this Doc View Source

PaintTo3DList(IPaintTo3D, ICategorizedDislayLists)

Implements PaintTo3DList(IPaintTo3D, ICategorizedDislayLists)

Declaration
public virtual void PaintTo3DList(IPaintTo3D paintTo3D, ICategorizedDislayLists lists)
Parameters
Type Name Description
IPaintTo3D paintTo3D
ICategorizedDislayLists lists
| Improve this Doc View Source

Position(GeoPoint, GeoVector, Double)

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

PrePaintTo3D(IPaintTo3D)

Hier kann man Dinge vor OpenList tun (da sie selbst vielleicht ein OpenList benötigen)

Declaration
public virtual void PrePaintTo3D(IPaintTo3D paintTo3D)
Parameters
Type Name Description
IPaintTo3D paintTo3D
| Improve this Doc View Source

PrepareDisplayList(Double)

Called before PaintTo3D(IPaintTo3D) is called, should implement the time consuming work for the display (like calculationg the triangulation of Faces or Polylines of Curves). Not normally used by user code.

Declaration
public abstract void PrepareDisplayList(double precision)
Parameters
Type Name Description
System.Double precision

Required precision

| Improve this Doc View Source

PropagateAttributes(Layer, ColorDef)

Sets the provided layer and color to this object and propagates these attributes to the owned objects.

Declaration
public virtual void PropagateAttributes(Layer layer, ColorDef colorDef)
Parameters
Type Name Description
Layer layer

Layer to set

ColorDef colorDef

Color to set

| Improve this Doc View Source

SetColorDef(ref ColorDef, ColorDef)

Hilfsfunktion zum Setzen der Farbe und gleichzeitig die Events feuern

Declaration
protected void SetColorDef(ref ColorDef color, ColorDef c)
Parameters
Type Name Description
ColorDef color

Referenz auf die i.a. private Membervariable

ColorDef c

der neue Farbwert

| Improve this Doc View Source

SetNamedAttribute(String, INamedAttribute)

Implements SetNamedAttribute(String, INamedAttribute). The default implementation handles all CADability attributes and leaves the handling of non CADability attributes to your code.

Declaration
public void SetNamedAttribute(string key, INamedAttribute toSet)
Parameters
Type Name Description
System.String key

key or typename of attribute to set

INamedAttribute toSet

attribute

| Improve this Doc View Source

SetSerializationValue(String, Object)

Declaration
protected void SetSerializationValue(string Name, object Value)
Parameters
Type Name Description
System.String Name
System.Object Value
| Improve this Doc View Source

UpdateAttributes(IAttributeListContainer)

Implements UpdateAttributes(IAttributeListContainer) for all CADability attributes. Non CADability attributes are not handled and must be handled if there are any.

Declaration
public virtual void UpdateAttributes(IAttributeListContainer alc)
Parameters
Type Name Description
IAttributeListContainer alc

Events

| Improve this Doc View Source

DidChangeEvent

Event that is raised when the GeoObject did change.

Declaration
public event ChangeDelegate DidChangeEvent
Event Type
Type Description
ChangeDelegate
| Improve this Doc View Source

FeedBackChangedEvent

Declaration
public event FeedBackChangedDelegate FeedBackChangedEvent
Event Type
Type Description
FeedBackChangedDelegate
| Improve this Doc View Source

GetAdditionalContextMenueEvent

Declaration
public static event IGeoObjectImpl.GetAdditionalContextMenueDelegate GetAdditionalContextMenueEvent
Event Type
Type Description
IGeoObjectImpl.GetAdditionalContextMenueDelegate
| Improve this Doc View Source

WillChangeEvent

Event that is raised when the GeoObject is about to change.

Declaration
public event ChangeDelegate WillChangeEvent
Event Type
Type Description
ChangeDelegate

Explicit Interface Implementations

| Improve this Doc View Source

IFeedBack.GetExtent()

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

ICloneable.Clone()

Declaration
object ICloneable.Clone()
Returns
Type Description
System.Object
| Improve this Doc View Source

IComparable.CompareTo(Object)

Declaration
int IComparable.CompareTo(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Int32

Implements

IGeoObject
ILayer
IStyle
IOctTreeInsertable
System.IComparable
System.Runtime.Serialization.ISerializable
IFeedBack
System.ICloneable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX