Show / Hide Table of Contents

Class Model

Inheritance
System.Object
IShowPropertyImpl
Model
Implements
IShowProperty
IPropertyEntry
System.Runtime.Serialization.ISerializable
IGeoObjectOwner
System.Collections.IEnumerable
ICommandHandler
ICategorizedDislayLists
System.Runtime.Serialization.IDeserializationCallback
IJsonSerialize
IJsonSerializeDone
Inherited Members
IShowPropertyImpl.propertyTreeView
IShowPropertyImpl.labelText
IShowPropertyImpl.resourceId
IShowPropertyImpl.flagsToSuppress
IShowPropertyImpl.SuppressFlags(ShowPropertyLabelFlags)
IShowPropertyImpl.Frame
IShowPropertyImpl.IShowProperty.Added(IPropertyTreeView)
IShowPropertyImpl.Added(IPropertyTreeView)
IShowPropertyImpl.Selected()
IShowPropertyImpl.UnSelected()
IShowPropertyImpl.ChildSelected(IShowProperty)
IShowPropertyImpl.Opened(Boolean)
IShowPropertyImpl.Removed(IPropertyTreeView)
IShowPropertyImpl.ShowOpen(Boolean)
IShowPropertyImpl.Select()
IShowPropertyImpl.InfoText
IShowPropertyImpl.HelpLink
IShowPropertyImpl.OwnerDrawHeight
IShowPropertyImpl.IShowProperty.SetTabIndex(Int32)
IShowPropertyImpl.StateChangedEvent
IShowPropertyImpl.SetFocus()
IShowPropertyImpl.Hidden
IShowPropertyImpl.ReadOnly
IShowPropertyImpl.Refresh()
IShowPropertyImpl.OnEnterPressed()
IShowPropertyImpl.OnVisibilityChanged(Boolean)
IShowPropertyImpl.IsSelected
IShowPropertyImpl.Concat(IShowProperty[], IShowProperty[])
IShowPropertyImpl.Update(IShowProperty)
IShowPropertyImpl.SelectedBckgColor
IShowPropertyImpl.SelectedTextColor
IShowPropertyImpl.UnselectedBckgColor
IShowPropertyImpl.UnselectedTextColor
IShowPropertyImpl.IPropertyEntry.IsOpen
IShowPropertyImpl.HasDropDownButton
IShowPropertyImpl.ValueIsEditable
IShowPropertyImpl.Flags
IShowPropertyImpl.Label
IShowPropertyImpl.Value
IShowPropertyImpl.ResourceId
IShowPropertyImpl.Parent
IShowPropertyImpl.SubItems
IShowPropertyImpl.ButtonClicked(PropertyEntryButton)
IShowPropertyImpl.OpenOrCloseSubEntries()
IShowPropertyImpl.propertyPage
IShowPropertyImpl.Added(IPropertyPage)
IShowPropertyImpl.Removed(IPropertyPage)
IShowPropertyImpl.GetDropDownList()
IShowPropertyImpl.StartEdit(Boolean)
IShowPropertyImpl.EndEdit(Boolean, Boolean, String)
IShowPropertyImpl.EditTextChanged(String)
IShowPropertyImpl.IPropertyEntry.Index
IShowPropertyImpl.IPropertyEntry.IndentLevel
IShowPropertyImpl.Selected(IPropertyEntry)
IShowPropertyImpl.UnSelected(IPropertyEntry)
IShowPropertyImpl.ListBoxSelected(Int32)
IShowPropertyImpl.DeferUpdate
IShowPropertyImpl.PropertyEntryChangedStateEvent
IShowPropertyImpl.PropertyEntryChangedState(StateChangedArgs)
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
Assembly: CADability.dll
Syntax
[Serializable]
public class Model : IShowPropertyImpl, IShowProperty, IPropertyEntry, ISerializable, IGeoObjectOwner, IEnumerable, ICommandHandler, ICategorizedDislayLists, IDeserializationCallback, IJsonSerialize, IJsonSerializeDone

Constructors

| Improve this Doc View Source

Model()

Creates an empty model.

Declaration
public Model()
| Improve this Doc View Source

Model(SerializationInfo, StreamingContext)

Constructor required by deserialization

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

SerializationInfo

System.Runtime.Serialization.StreamingContext context

StreamingContext

Properties

| Improve this Doc View Source

AllDrives

Returns the list of all IDrive of this model. Only used in connection with AnimatedView.

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

AllObjects

Returns a list of all objects owned by this model. Removing or adding objects from or to the returned list doesn't remove or add the objects from or to the model.

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

AllSchedules

Returns the list of all Schedules of this model. Only used in connection with AnimatedView.

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

ContextMenu

Declaration
public override MenuWithHandler[] ContextMenu { get; }
Property Value
Type Description
MenuWithHandler[]
Overrides
IShowPropertyImpl.ContextMenu
| Improve this Doc View Source

Count

Returns the count of GeoObjects in this model.

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

EntryType

Overrides EntryType, returns GroupTitle.

Declaration
public override ShowPropertyEntryType EntryType { get; }
Property Value
Type Description
ShowPropertyEntryType
Overrides
IShowPropertyImpl.EntryType
| Improve this Doc View Source

Extent

Returns the extent of the model, i.e. a bounding cube enclosing all objects.

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

Item[Int32]

Indexer to access the GeoObjects owned by this model by index.

Declaration
public IGeoObject this[int Index] { get; }
Parameters
Type Name Description
System.Int32 Index

Index of the required GeoObject

Property Value
Type Description
IGeoObject
| Improve this Doc View Source

LabelText

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

LabelType

Overrides LabelType,

Declaration
public override ShowPropertyLabelFlags LabelType { get; }
Property Value
Type Description
ShowPropertyLabelFlags
Overrides
IShowPropertyImpl.LabelType
| Improve this Doc View Source

MinExtend

A minimal extend of the Model. This will be the extend of the Model if the Model is empty. This is also used in other circumstances (e.g. dieplay of the grid)

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

Name

The name of the model.

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

NoSingleAddEvents

Set to true, if you don't want AddingGeoObjectEvent rsp. GeoObjectAddedEvent beeing fired after AddingGeoObjectsEvent rsp. GeoObjectsAddedEvent has been called. False is the default value.

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

OctTree

Access to the OctTree containing all geometrical objects of the model. Do not modify the octtree to avoid inconsitencies between model and octtree. Use the octtree for fast access to the objects in the model from geometrical constraints.

Declaration
public OctTree<IGeoObject> OctTree { get; }
Property Value
Type Description
OctTree<IGeoObject>
| Improve this Doc View Source

SubEntries

Overrides SubEntries, returns the subentries in this property view.

Declaration
public override IShowProperty[] SubEntries { get; }
Property Value
Type Description
IShowProperty[]
Overrides
IShowPropertyImpl.SubEntries
| Improve this Doc View Source

SubEntriesCount

Overrides SubEntriesCount, returns the number of subentries in this property view.

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

Undo

Gets or sets the undo-system. Usually this is the undosystem of the Project containing this model.

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

UserData

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

Methods

| Improve this Doc View Source

Add(GeoObjectList)

Adds multiple GeoObjects to this model.

Declaration
public void Add(GeoObjectList ListToAdd)
Parameters
Type Name Description
GeoObjectList ListToAdd

List of the GeoObjects to add

| Improve this Doc View Source

Add(IGeoObject)

Adds an object to this model. If the model is beeing displayed the object will appear in the view immediately.

Declaration
public void Add(IGeoObject ObjectToAdd)
Parameters
Type Name Description
IGeoObject ObjectToAdd

The GeoObject to add

| Improve this Doc View Source

Add(IGeoObject[])

Adds multiple GeoObjects to this model.

Declaration
public void Add(IGeoObject[] ListToAdd)
Parameters
Type Name Description
IGeoObject[] ListToAdd

Array of the GeoObjects to add

| Improve this Doc View Source

AdjustPoint(SnapPointFinder, Projection, Set<Layer>)

Adjusts the point defined by spf (SourcePoint and Projection) according to the settings of spf (SnapPointFinder.SnapModes and other properties) by checking all objects in the visibleLayers. As a result SnapPoint and DidSnap will be set.

Declaration
public void AdjustPoint(SnapPointFinder spf, Projection projection, Set<Layer> visibleLayers)
Parameters
Type Name Description
SnapPointFinder spf

Point to be adjusted and mode how to adjust

Projection projection

Projection

Set<Layer> visibleLayers

Visible layers to consider

| Improve this Doc View Source

AdjustPoint(SnapPointFinder, Set<Layer>)

Searches for the best point in this model which corresponds to the mouse position and the active snap modes. Mouse position and snap modes are contained in the spf parameter, where also the result is returned

Declaration
public void AdjustPoint(SnapPointFinder spf, Set<Layer> visibleLayers)
Parameters
Type Name Description
SnapPointFinder spf

SnapPointFinder class which contains the snap mode and the mouse position

Set<Layer> visibleLayers

Layers to be included in the search

| Improve this Doc View Source

ClearDisplayLists()

Deprecated, still public for legacy reasons.

Declaration
public void ClearDisplayLists()
| Improve this Doc View Source

Finalize()

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

GetExtent(Projection)

Returns a 2 dimensional bounding rctangle enclosing the projection of all GeoObjects of the model.

Declaration
public BoundingRect GetExtent(Projection pr)
Parameters
Type Name Description
Projection pr

The projection to be applied to the GeoObjects

Returns
Type Description
BoundingRect
| Improve this Doc View Source

GetObjectsFromBox(BoundingCube)

Returns all objects of the model that are inside ore close to the provided box.

Declaration
public GeoObjectList GetObjectsFromBox(BoundingCube box)
Parameters
Type Name Description
BoundingCube box

Box from which to seek objects

Returns
Type Description
GeoObjectList

List of objects in or close to the box

| Improve this Doc View Source

GetObjectsFromRect(BoundingRect, Projection, Set<Layer>, PickMode, FilterList)

Returns all objects of the model that are touched by the pickrect, whos layers are in the visibleLayers set and which are accepted by the filterList.

Declaration
public GeoObjectList GetObjectsFromRect(BoundingRect pickrect, Projection projection, Set<Layer> visibleLayers, PickMode pickMode, FilterList filterList)
Parameters
Type Name Description
BoundingRect pickrect

Area that specifies which objects are beeing tested

Projection projection

The projection in which the pickrect is defined

Set<Layer> visibleLayers

Set of layers which are visible (and hence should be used for the test)

PickMode pickMode

Single or multiple objects

FilterList filterList

List of conditions

Returns
Type Description
GeoObjectList

List of objects that fulfill all conditions

| Improve this Doc View Source

GetObjectsFromRect(Projection.PickArea, Set<Layer>, PickMode, FilterList, GeoObjectList)

Returns all objects of the model that are touched by the area, whos layers are in the visibleLayers set and which are accepted by the filterList.

Declaration
public GeoObjectList GetObjectsFromRect(Projection.PickArea area, Set<Layer> visibleLayers, PickMode pickMode, FilterList filterList, GeoObjectList toAvoid = null)
Parameters
Type Name Description
Projection.PickArea area

Area that specifies which objects are beeing tested

Set<Layer> visibleLayers

Set of layers which are visible (and hence should be used for the test)

PickMode pickMode

Single or multiple objects

FilterList filterList

List of conditions

GeoObjectList toAvoid

List of objects not to select

Returns
Type Description
GeoObjectList

List of objects that fulfill all conditions

| Improve this Doc View Source

IsAttributeUsed(Object)

Determins whether an attribute (e.g. Layer, LinePattern) is used by any GeoObjects of this model.

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

Attribut to test

Returns
Type Description
System.Boolean

True, if attribute is used, false otherwise.

| Improve this Doc View Source

LabelChanged(String)

Overrides LabelChanged(String)

Declaration
public override void LabelChanged(string NewText)
Parameters
Type Name Description
System.String NewText
Overrides
IShowPropertyImpl.LabelChanged(String)
| Improve this Doc View Source

MoveToBack(IGeoObject)

Declaration
public void MoveToBack(IGeoObject iGeoObject)
Parameters
Type Name Description
IGeoObject iGeoObject
| Improve this Doc View Source

MoveToFront(IGeoObject)

Declaration
public void MoveToFront(IGeoObject iGeoObject)
Parameters
Type Name Description
IGeoObject iGeoObject
| Improve this Doc View Source

ParallelTriangulation(Double)

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

Remove(GeoObjectList)

Removes a list of GeoObjects from this model. Objects that dont belong to the model will be ignored.

Declaration
public void Remove(GeoObjectList ToRemove)
Parameters
Type Name Description
GeoObjectList ToRemove

List of GeoObjects to be removed

| Improve this Doc View Source

Remove(IGeoObject)

Removes a GeoObject from the model. If the GeoObject doesnt belong to this model it will be ignored.

Declaration
public void Remove(IGeoObject ToRemove)
Parameters
Type Name Description
IGeoObject ToRemove

GeoObject to remove

| Improve this Doc View Source

Remove(IGeoObject[])

Removes an array of GeoObjects from this model. Objects that dont belong to the model will be ignored.

Declaration
public void Remove(IGeoObject[] ToRemove)
Parameters
Type Name Description
IGeoObject[] ToRemove

Array of geoObjects to remove

| Improve this Doc View Source

Remove(HashSet<IGeoObject>)

Declaration
public void Remove(HashSet<IGeoObject> HToRemove)
Parameters
Type Name Description
System.Collections.Generic.HashSet<IGeoObject> HToRemove
| Improve this Doc View Source

RemoveAll()

Remove all objects from this model.

Declaration
public void RemoveAll()
| Improve this Doc View Source

RemoveSolid(Solid, Boolean)

Removes the given solid from all other solids in the model. If there are no solids in the model or this solid is disjoint with all other solids in the model there will be no effect.

Declaration
public bool RemoveSolid(Solid solid, bool onlySameLayer)
Parameters
Type Name Description
Solid solid

the solid to remove

System.Boolean onlySameLayer

if true: check only with solids on the same layer

Returns
Type Description
System.Boolean
| Improve this Doc View Source

UniteSolid(Solid, Boolean)

Unites the given solid with all other solids in the model. If there are no other solids or the solid is disjoint with all other solids this solid will simply bee added.

Declaration
public bool UniteSolid(Solid solid, bool onlySameLayer)
Parameters
Type Name Description
Solid solid

the solid to unite

System.Boolean onlySameLayer

if true: check only with solids on the same layer

Returns
Type Description
System.Boolean

Events

| Improve this Doc View Source

AddingGeoObjectEvent

This event will be fired before an object is added to this model. The event handler can prevent the object beeing added to the model

Declaration
public event Model.AddingGeoObject AddingGeoObjectEvent
Event Type
Type Description
Model.AddingGeoObject
| Improve this Doc View Source

AddingGeoObjectsEvent

This event will be fired before multiple objects are beeing added. There is no sense in modifying the provided array of objects. There will be an additional call to AddingGeoObjectEvent and GeoObjectAddedEvent for each objects (where you can prevent the object beeing added) and a final call to GeoObjectsAddedEvent.

Declaration
public event Model.AddingGeoObjects AddingGeoObjectsEvent
Event Type
Type Description
Model.AddingGeoObjects
| Improve this Doc View Source

CalculateExtentForZoomTotalEvent

Declaration
public event Model.CalculateExtentForZoomTotalDelegate CalculateExtentForZoomTotalEvent
Event Type
Type Description
Model.CalculateExtentForZoomTotalDelegate
| Improve this Doc View Source

ExtentChangedEvent

This event will be fired when objects have been added, removed or modified which resulted in a different extent (of the bounding box) of the model.

Declaration
public event Model.ExtentChangedDelegate ExtentChangedEvent
Event Type
Type Description
Model.ExtentChangedDelegate
| Improve this Doc View Source

GeoObjectAddedEvent

This event will be fired when an object is added to this model.

Declaration
public event Model.GeoObjectAdded GeoObjectAddedEvent
Event Type
Type Description
Model.GeoObjectAdded
| Improve this Doc View Source

GeoObjectDidChangeEvent

This event will be fired when an object contained in this model did change.

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

GeoObjectRemovedEvent

This event will be fired when an object is removed from this model.

Declaration
public event Model.GeoObjectRemoved GeoObjectRemovedEvent
Event Type
Type Description
Model.GeoObjectRemoved
| Improve this Doc View Source

GeoObjectsAddedEvent

This event will be fired after multiple GeoObjects have been added, AddingGeoObjectsEvent has been fired before.

Declaration
public event Model.GeoObjectsAdded GeoObjectsAddedEvent
Event Type
Type Description
Model.GeoObjectsAdded
| Improve this Doc View Source

GeoObjectsRemovedEvent

This event will be fired when removing multiple objects from this model is finished.

Declaration
public event Model.GeoObjectsRemoved GeoObjectsRemovedEvent
Event Type
Type Description
Model.GeoObjectsRemoved
| Improve this Doc View Source

GeoObjectWillChangeEvent

This event will be fired when an object contained in this model is about to change.

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

ImportingObjectsEvent

This event will be fired when objects imported from another file are added to the model. The event handler can modify the list of objects, e.g. add or remove objects or combine the objects to a Block.

Declaration
public event Model.ImportingObjectsDelegate ImportingObjectsEvent
Event Type
Type Description
Model.ImportingObjectsDelegate
| Improve this Doc View Source

NameChangedEvent

This event will be fired when the name of the model changed.

Declaration
public event Model.NameChangedDelegate NameChangedEvent
Event Type
Type Description
Model.NameChangedDelegate
| Improve this Doc View Source

RemovingGeoObjectEvent

This event will be fired before an object is removed from this model. The event handler can prevent the object beeing added to the model

Declaration
public event Model.RemovingGeoObject RemovingGeoObjectEvent
Event Type
Type Description
Model.RemovingGeoObject
| Improve this Doc View Source

RemovingGeoObjectsEvent

This event will be fired before multiple objects are beeing removed. There is no sense in modifying the provided array of objects. There will be an additional call to RemovingGeoObjectEvent and GeoObjectRemovedEvent for each objects (where you can prevent the object beeing added) and a final call to GeoObjectsRemovedEvent.

Declaration
public event Model.RemovingGeoObjects RemovingGeoObjectsEvent
Event Type
Type Description
Model.RemovingGeoObjects

Explicit Interface Implementations

| Improve this Doc View Source

ICategorizedDislayLists.Add(Layer, Boolean, Boolean, IGeoObject)

Declaration
void ICategorizedDislayLists.Add(Layer layer, bool addToFace, bool addToLinear, IGeoObject go)
Parameters
Type Name Description
Layer layer
System.Boolean addToFace
System.Boolean addToLinear
IGeoObject go
| 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
| Improve this Doc View Source

IJsonSerializeDone.SerializationDone()

Declaration
void IJsonSerializeDone.SerializationDone()
| Improve this Doc View Source

ICommandHandler.OnCommand(String)

Declaration
bool ICommandHandler.OnCommand(string MenuId)
Parameters
Type Name Description
System.String MenuId
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ICommandHandler.OnSelected(MenuWithHandler, Boolean)

Declaration
void ICommandHandler.OnSelected(MenuWithHandler selectedMenuItem, bool selected)
Parameters
Type Name Description
MenuWithHandler selectedMenuItem
System.Boolean selected
| Improve this Doc View Source

ICommandHandler.OnUpdateCommand(String, CommandState)

Declaration
bool ICommandHandler.OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
Type Name Description
System.String MenuId
CommandState CommandState
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator
| Improve this Doc View Source

IDeserializationCallback.OnDeserialization(Object)

Declaration
void IDeserializationCallback.OnDeserialization(object sender)
Parameters
Type Name Description
System.Object sender
| Improve this Doc View Source

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

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

Implements

IShowProperty
IPropertyEntry
System.Runtime.Serialization.ISerializable
IGeoObjectOwner
System.Collections.IEnumerable
ICommandHandler
ICategorizedDislayLists
System.Runtime.Serialization.IDeserializationCallback
IJsonSerialize
IJsonSerializeDone
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX