Class Tolerance
Represents a tolerance EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Tolerance : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceTolerance()
Initializes a new instance of the Tolerance class.
Declaration
public Tolerance()
Tolerance(ToleranceEntry)
Initializes a new instance of the Tolerance class.
Declaration
public Tolerance(ToleranceEntry tolerance)
Parameters
| Type | Name | Description |
|---|---|---|
| ToleranceEntry | tolerance |
Tolerance(ToleranceEntry, Vector2)
Initializes a new instance of the Tolerance class.
Declaration
public Tolerance(ToleranceEntry tolerance, Vector2 position)
Parameters
| Type | Name | Description |
|---|---|---|
| ToleranceEntry | tolerance | |
| Vector2 | position |
Tolerance(ToleranceEntry, Vector3)
Initializes a new instance of the Tolerance class.
Declaration
public Tolerance(ToleranceEntry tolerance, Vector3 position)
Parameters
| Type | Name | Description |
|---|---|---|
| ToleranceEntry | tolerance | |
| Vector3 | position |
Properties
| Improve this Doc View SourceDatumIdentifier
Gets or sets the datum identifying symbol.
Declaration
public string DatumIdentifier { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
A datum is a theoretically exact geometric reference from which you can establish the location and tolerance zones of other features. A point, line, plane, cylinder, or other geometry can serve as a datum.
Entry1
Gets or sets the first tolerance entry.
Declaration
public ToleranceEntry Entry1 { get; set; }
Property Value
| Type | Description |
|---|---|
| ToleranceEntry |
Entry2
Gets or sets the second tolerance entry.
Declaration
public ToleranceEntry Entry2 { get; set; }
Property Value
| Type | Description |
|---|---|
| ToleranceEntry |
Position
Gets or sets the leader Vector3 in world coordinates.
Declaration
public Vector3 Position { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
ProjectedToleranceZoneValue
Gets or sets the projected tolerance zone value.
Declaration
public string ProjectedToleranceZoneValue { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
A projected tolerance zone controls the variation in height of the extended portion of a fixed perpendicular part and refines the tolerance to that specified by positional tolerances.
Rotation
Gets or sets the leader rotation in degrees.
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
ShowProjectedToleranceZoneSymbol
Gets or sets if the projected tolerance zone symbol will be shown after the projected tolerance zone value.
Declaration
public bool ShowProjectedToleranceZoneSymbol { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Style
Gets or sets the DimensionStyle.
Declaration
public DimensionStyle Style { get; set; }
Property Value
| Type | Description |
|---|---|
| DimensionStyle |
TextHeight
Gets or sets the text height.
Declaration
public double TextHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
Valid values must be greater than zero. By default it initially uses the text height defined in the style, when saved in the DXF this value is stored as extended data information.
Methods
| Improve this Doc View SourceClone()
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object |
Overrides
| Improve this Doc View SourceOnDimensionStyleChangedEvent(DimensionStyle, DimensionStyle)
Declaration
protected virtual DimensionStyle OnDimensionStyleChangedEvent(DimensionStyle oldStyle, DimensionStyle newStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| DimensionStyle | oldStyle | |
| DimensionStyle | newStyle |
Returns
| Type | Description |
|---|---|
| DimensionStyle |
ParseStringRepresentation(String)
Converts the string representation of a tolerance to its tolerance entity equivalent.
Declaration
public static Tolerance ParseStringRepresentation(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | s | A string that represents a tolerance to convert. |
Returns
| Type | Description |
|---|---|
| Tolerance | The Tolerance entity equivalent to the tolerance contained in s. |
ToStringRepresentation()
Converts the actual tolerance to its string representation.
Declaration
public string ToStringRepresentation()
Returns
| Type | Description |
|---|---|
| System.String | The tolerance string representation. |
TransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Non-uniform scaling is not supported, also is not possible to make a symmetry of a Tolerance.
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.
TryParseStringRepresentation(String, out Tolerance)
Tries to convert the specified string representation of a tolerance to its tolerance entity equivalent. A return value indicates whether the conversion succeeded or failed.
Declaration
public static bool TryParseStringRepresentation(string s, out Tolerance result)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | s | A string that represents the tolerance to convert. |
| Tolerance | result | If the conversion has been successful, it contains the tolerance entity equivalent to the string representation; otherwise, null. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the string was converted successfully; otherwise, false. |
Events
| Improve this Doc View SourceToleranceStyleChanged
Declaration
public event Tolerance.ToleranceStyleChangedEventHandler ToleranceStyleChanged
Event Type
| Type | Description |
|---|---|
| Tolerance.ToleranceStyleChangedEventHandler |