Constructors

GeometryBase

#
Protected constructor for internal use.
protected GeometryBase(
info,
Serialization data.
context
Serialization stream.
)

Properties

Disposed

Indicates if this object has been disposed or the document it originally belonged to has been disposed.
public bool Disposed { get; }
inherited fromCommonObject

HasBrepForm

#Since v5.6
Returns true if the Brep.TryConvertBrep function will be successful for this object
public bool HasBrepForm { get; }

HasUserData

Gets true if this class has any custom information attached to it through UserData.
public bool HasUserData { get; }
inherited fromCommonObject

IsDeformable

#Since v5.0
true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
public bool IsDeformable { get; }

IsDocumentControlled

#Since v5.0
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
public sealed override bool IsDocumentControlled { get; }

IsShallowDuplicate

#Since v8.27
Is this instance a 'shallow copy'. Shallow copies are no different than regular instances with the exception that they will convert to complete independent 'deep' copies if a non const operation is perform on the instance (something that mutates the internal data)
public bool IsShallowDuplicate { get; }

IsValid

Tests an object to see if it is valid.
public virtual bool IsValid { get; }
inherited fromCommonObject

ObjectType

#Since v5.0
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
[CLSCompliant(false)] public ObjectType ObjectType { get; }

UserData

List of custom information that is attached to this class.
public UserDataList UserData { get; }
inherited fromCommonObject

UserDictionary

Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.
public ArchivableDictionary UserDictionary { get; }
inherited fromCommonObject

UserStringCount

#Since v5.0
Gets the amount of user strings.
public int UserStringCount { get; }

Methods

ComponentIndex

#Since v5.0
If this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index.
[ConstOperation] public ComponentIndex ComponentIndex()
This object's component index. If this object is not a sub-piece of a larger geometric entity, then the returned index has m_type = ComponentIndex.InvalidType and m_index = -1.

ConstructConstObject

Assigns a parent object and a sub-object index to this.
protected void ConstructConstObject(
parentObject,
The parent object.
subobjectIndex
The sub-object index.
)
inherited fromCommonObject

DataCRC

#Since v7.20
Returns a CRC calculated from the information that defines the object. This CRC can be used as a quick way to see if two objects are not identical.
[CLSCompliant(false)] public uint DataCRC(
currentRemainder
The current remainder value.
)
CRC of the information the defines the object.

DeleteAllUserStrings

#Since v8.9
public void DeleteAllUserStrings()

DeleteUserString

#Since v8.9
public bool DeleteUserString(
key
)

Dispose

Actively reclaims unmanaged resources that this instance uses.
public void Dispose()
inherited fromCommonObject

Dispose

#
Overridden in order to destroy local display cache information
protected override void Dispose(
disposing
)

Duplicate

#Since v5.0
Constructs a deep (full) copy of this object.
public virtual GeometryBase Duplicate()
An object of the same type as this, with the same properties and behavior.

DuplicateShallow

#Since v5.0
Constructs a light copy of this object. By "light", it is meant that the same underlying data is used until something is done to attempt to change it. For example, you could have a shallow copy of a very heavy mesh object and the same underlying data will be used when doing things like inspecting the number of faces on the mesh. If you modify the location of one of the mesh vertices, the shallow copy will create a full duplicate of the underlying mesh data and the shallow copy will become a deep copy.
public GeometryBase DuplicateShallow()
An object of the same type as this object.

This behavior is overridden by implementing classes.

EnsurePrivateCopy

If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
public void EnsurePrivateCopy()
inherited fromCommonObject

GeometryEquals

#Since v6.0
Determines if two geometries equal one another, in pure geometrical shape. This version only compares the geometry itself and does not include any user data comparisons. This is a comparison by value: for two identical items it will be true, no matter where in memory they may be stored.
public static bool GeometryEquals(
first,
The first geometry
second
The second geometry
)
The indication of equality

GeometryReferenceEquals

#Since v7.2
Determines if two objects are respectively shallow copies, new managed instantiations of the same geometry, or similar internal references to the exact same geometry, both in managed and in unmanaged code.
public static bool GeometryReferenceEquals(
one,
The first object
other
The other object
)
True if indeed the objects are really the same. False otherwise.

GetBoundingBox

#ExampleSince v5.0
Bounding box solver. Gets the world axis aligned bounding box for the geometry.
[ConstOperation] public BoundingBox GetBoundingBox(
accurate
If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.
)
The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetBoundingBox

#Since v5.0
Aligned Bounding box solver. Gets the plane aligned bounding box.
[ConstOperation] public BoundingBox GetBoundingBox(
plane,
Orientation plane for BoundingBox.
out Box
worldBox
Aligned box in World coordinates.
)
A BoundingBox in plane coordinates.

GetBoundingBox

#ExampleSince v5.0
Aligned Bounding box solver. Gets the plane aligned bounding box.
[ConstOperation] public BoundingBox GetBoundingBox(
plane
Orientation plane for BoundingBox.
)
A BoundingBox in plane coordinates.

GetBoundingBox

#Since v5.0
Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
[ConstOperation] public virtual BoundingBox GetBoundingBox(
xform
Transformation to apply to object prior to the BoundingBox computation. The geometry itself is not modified.
)
The accurate bounding box of the transformed geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetObjectData

Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public virtual void GetObjectData(
info,
The System.Runtime.Serialization.SerializationInfo to populate with data.
context
The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.
)
inherited fromCommonObject

GetOverlaps

#Since v9.0
Detects overlapping regions among a set of input objects after they are orthogonally projected onto the supplied plane, and reports what should happen to each input object so that the overlaps can be removed.
public static int[] GetOverlaps(
objects,
The geometry to test for overlaps. Supported types are Curve (curves), Point (single points), and PointCloud (sets of points). Objects of any other type, as well as null or invalid objects, are silently ignored.
plane,
The plane the geometry is orthogonally projected onto before testing. Use Plane.WorldXY to test in the world XY plane (dropping Z).
tolerance,
The overlap distance tolerance, measured in the projected plane.
wholeCurves,
When true, an overlapping curve is treated as a single unit; when false, curves may be split at segment boundaries so that only the overlapping portions are affected.
locked,
Geometry that participates in the overlap test but is never itself modified. May be null or empty.
lockedExclusive,
When true, overlaps are only reported where an input object overlaps a locked object; overlaps purely among the input objects are ignored.
out bool[]
entire,
For each returned object index, true if the entire object is an overlap and should be removed. This out parameter is assigned during this call.
deadSegments,
For each returned object index, the component indices of the segments that overlap and should be removed. This out parameter is assigned during this call.
out Curve[]
replacements
For each returned object index, an optional replacement curve to use in place of the original, or null when no replacement is produced. This out parameter is assigned during this call.
)
The indices, into objects, of the objects that are affected by an overlap. The entire, deadSegments, and replacements arrays are parallel to the returned array.
ArgumentNullExceptionIf objects is null.

GetUserString

#Since v5.0
Gets user string from this geometry.
public string GetUserString(
key
id used to retrieve the string.
)
string associated with the key if successful. null if no key was found.

GetUserStrings

#Since v5.0
Gets a copy of all (user key string, user value string) pairs attached to this geometry.
public NameValueCollection GetUserStrings()
A new collection.

IsValidWithLog

Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
public bool IsValidWithLog(
out string
log
A textual log. This out parameter is assigned during this call.
)
inherited fromCommonObject
true if this object is valid; false otherwise.

MakeDeformable

#Since v5.0
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
public bool MakeDeformable()
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

MemoryEstimate

#Since v5.0
Computes an estimate of the number of bytes that this object is using in memory.
[CLSCompliant(false)] [ConstOperation] public uint MemoryEstimate()
An estimated memory footprint.

NonConstOperation

#
Destroy cache handle
protected override void NonConstOperation()

OnSwitchToNonConst

#
Is called when a non-constant operation occurs.
protected override void OnSwitchToNonConst()

Rotate

#Since v5.0
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
public bool Rotate(
angleRadians,
Angle of rotation in radians.
rotationAxis,
Direction of the axis of rotation.
rotationCenter
Point on the axis of rotation.
)
true if geometry successfully rotated.

Scale

#Since v5.0
Scales the object by the specified factor. The scale is centered at the origin.
public bool Scale(
scaleFactor
The uniform scaling factor.
)
true if geometry successfully scaled.

SetUserString

#Since v5.0
Attach a user string (key,value combination) to this geometry.
public bool SetUserString(
key,
id used to retrieve this string.
value
string associated with key.
)
true on success.

ToJSON

Create a JSON string representation of this object
public string ToJSON()
inherited fromCommonObject

Transform

#Since v5.0
Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
public bool Transform(
Transform
xform
Transformation to apply to geometry.
)
true if geometry successfully transformed.

Translate

#Since v5.0
Translates the object along the specified vector.
public bool Translate(
x,
The X component.
y,
The Y component.
z
The Z component.
)
true if geometry successfully translated.

Translate

#Since v5.0
Translates the object along the specified vector.
public bool Translate(
translationVector
A moving vector.
)
true if geometry successfully translated.