Show / Hide Table of Contents

Class UCS

Represents a User Coordinate System.

Inheritance
System.Object
DxfObject
TableObject
UCS
Implements
IHasXData
System.ICloneable
System.IComparable
System.IComparable<TableObject>
System.IEquatable<TableObject>
Inherited Members
TableObject.NameChanged
TableObject.OnNameChangedEvent(String, String)
TableObject.XDataAddAppReg
TableObject.OnXDataAddAppRegEvent(ApplicationRegistry)
TableObject.XDataRemoveAppReg
TableObject.OnXDataRemoveAppRegEvent(ApplicationRegistry)
TableObject.Name
TableObject.IsReserved
TableObject.InvalidCharacters
TableObject.XData
TableObject.IsValidName(String)
TableObject.ToString()
TableObject.CompareTo(Object)
TableObject.CompareTo(TableObject)
TableObject.GetHashCode()
TableObject.Equals(Object)
TableObject.Equals(TableObject)
DxfObject.CodeName
DxfObject.Handle
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class UCS : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>

Constructors

| Improve this Doc View Source

UCS(String)

Initializes a new instance of the UCS class.

Declaration
public UCS(string name)
Parameters
Type Name Description
System.String name

User coordinate system name.

| Improve this Doc View Source

UCS(String, Vector3, Vector3, Vector3)

Initializes a new instance of the UCS class.

Declaration
public UCS(string name, Vector3 origin, Vector3 xDirection, Vector3 yDirection)
Parameters
Type Name Description
System.String name

User coordinate system name.

Vector3 origin

Origin in WCS.

Vector3 xDirection

X-axis direction in WCS.

Vector3 yDirection

Y-axis direction in WCS.

Remarks

The x-axis direction and y-axis direction must be perpendicular.

Properties

| Improve this Doc View Source

Elevation

Gets or sets the user coordinate system elevation.

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

Origin

Gets or sets the user coordinate system origin in WCS.

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

Owner

Gets the owner of the actual user coordinate system.

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

XAxis

Gets the user coordinate system x-axis direction in WCS.

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

YAxis

Gets the user coordinate system y-axis direction in WCS.

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

ZAxis

Gets the user coordinate system z-axis direction in WCS.

Declaration
public Vector3 ZAxis { get; }
Property Value
Type Description
Vector3

Methods

| Improve this Doc View Source

Clone()

Creates a new UCS that is a copy of the current instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new UCS that is a copy of this instance.

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

Clone(String)

Creates a new UCS that is a copy of the current instance.

Declaration
public override TableObject Clone(string newName)
Parameters
Type Name Description
System.String newName

UCS name of the copy.

Returns
Type Description
TableObject

A new UCS that is a copy of this instance.

Overrides
TableObject.Clone(String)
| Improve this Doc View Source

FromNormal(String, Vector3, Vector3, Double)

Creates a new user coordinate system from the XY plane normal (z-axis).

Declaration
public static UCS FromNormal(string name, Vector3 origin, Vector3 normal, double rotation)
Parameters
Type Name Description
System.String name

User coordinate system name.

Vector3 origin

Origin in WCS.

Vector3 normal

XY plane normal (z-axis).

System.Double rotation

The counter-clockwise angle in radians along the normal (z-axis).

Returns
Type Description
UCS

A new user coordinate system.

Remarks

This method uses the ArbitraryAxis algorithm to obtain the user coordinate system x-axis and y-axis.

| Improve this Doc View Source

FromXAxisAndPointOnXYplane(String, Vector3, Vector3, Vector3)

Creates a new user coordinate system from the x-axis and a point on XY plane.

Declaration
public static UCS FromXAxisAndPointOnXYplane(string name, Vector3 origin, Vector3 xDirection, Vector3 pointOnPlaneXY)
Parameters
Type Name Description
System.String name

User coordinate system name.

Vector3 origin

Origin in WCS.

Vector3 xDirection

X-axis direction in WCS.

Vector3 pointOnPlaneXY

Point on the XYplane.

Returns
Type Description
UCS

A new user coordinate system.

| Improve this Doc View Source

SetAxis(Vector3, Vector3)

Sets the user coordinate system x-axis and y-axis direction.

Declaration
public void SetAxis(Vector3 xDirection, Vector3 yDirection)
Parameters
Type Name Description
Vector3 xDirection

X-axis direction in WCS.

Vector3 yDirection

Y-axis direction in WCS.

Implements

IHasXData
System.ICloneable
System.IComparable
System.IComparable<T>
System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX