Show / Hide Table of Contents

Class Reduce2D

Helper class to reduce duplicated or 2d connected curves. To use this class create an empty instance, Add(ICurve2D)/> curves to it and access the Reduced/> property. Some flags add additional control on how the reduction is performed

Inheritance
System.Object
Reduce2D
Implements
System.Collections.Generic.IEqualityComparer<ICurve2D>
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.Curve2D
Assembly: CADability.dll
Syntax
public class Reduce2D : IEqualityComparer<ICurve2D>

Constructors

| Improve this Doc View Source

Reduce2D()

Empty constructor. Use Add(ICurve2D) to add curves.

Declaration
public Reduce2D()

Fields

| Improve this Doc View Source

BreakPolylines

Break up polylines added to this object. Depending on OutputMode the result may again be combined to polylines or paths.

Declaration
public bool BreakPolylines
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

FlattenPolylines

Precision to remove inner points of polylines. If set to 0, polylines remain unchanged

Declaration
public double FlattenPolylines
Field Value
Type Description
System.Double
| Improve this Doc View Source

OutputMode

Desired output mode.

Declaration
public Reduce2D.Mode OutputMode
Field Value
Type Description
Reduce2D.Mode
| Improve this Doc View Source

Precision

Precision: two curves are combined if the resulting curve differs less than this value from the orginal curves.

Declaration
public double Precision
Field Value
Type Description
System.Double
| Improve this Doc View Source

UsedOriginals

When adding GeoObjects with the method Add(GeoObjectList l, Plane pln), a list of used GeoObjects is maintained when the result "Reduced" is calculated. "UsedOriginals" provides a list of those objects, that are represented in the result. The objects might also be children of the provided objects.

Declaration
public GeoObjectList UsedOriginals
Field Value
Type Description
GeoObjectList

Properties

| Improve this Doc View Source

Reduced

Access this property for the result of the reduction.

Declaration
public ICurve2D[] Reduced { get; }
Property Value
Type Description
ICurve2D[]

Methods

| Improve this Doc View Source

Add(ICurve2D)

Adds a curve to the reduction.

Declaration
public void Add(ICurve2D curve)
Parameters
Type Name Description
ICurve2D curve
| Improve this Doc View Source

Add(ICurve2D[])

Adds an array of curves to the reduction

Declaration
public void Add(ICurve2D[] curves)
Parameters
Type Name Description
ICurve2D[] curves
| Improve this Doc View Source

Add(GeoObjectList, Plane)

Add all objects from l, which are or contain curves. The curves are projected onto the provided plane. If l contains composite objects (e.g. Block, Path) the objects are decomposed.

Declaration
public void Add(GeoObjectList l, Plane pln)
Parameters
Type Name Description
GeoObjectList l
Plane pln

Explicit Interface Implementations

| Improve this Doc View Source

IEqualityComparer<ICurve2D>.Equals(ICurve2D, ICurve2D)

Declaration
bool IEqualityComparer<ICurve2D>.Equals(ICurve2D x, ICurve2D y)
Parameters
Type Name Description
ICurve2D x
ICurve2D y
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IEqualityComparer<ICurve2D>.GetHashCode(ICurve2D)

Declaration
int IEqualityComparer<ICurve2D>.GetHashCode(ICurve2D obj)
Parameters
Type Name Description
ICurve2D obj
Returns
Type Description
System.Int32

Implements

System.Collections.Generic.IEqualityComparer<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX