Class Reduce2D
- Namespace
- CADability.Curve2D
- Assembly
- CADability.dll
Helper class to reduce duplicated or 2d connected curves. To use this class create an empty instance, Add curves to it and access the Reduced property. Some flags add additional control on how the reduction is performed
public class Reduce2D : IEqualityComparer<ICurve2D>
- Inheritance
-
Reduce2D
- Implements
- Inherited Members
Constructors
Reduce2D()
Empty constructor. Use Add(ICurve2D) to add curves.
public Reduce2D()
Fields
BreakPolylines
Break up polylines added to this object. Depending on OutputMode the result may again be combined to polylines or paths.
public bool BreakPolylines
Field Value
FlattenPolylines
Precision to remove inner points of polylines. If set to 0, polylines remain unchanged
public double FlattenPolylines
Field Value
OutputMode
Desired output mode.
public Reduce2D.Mode OutputMode
Field Value
Precision
Precision: two curves are combined if the resulting curve differs less than this value from the orginal curves.
public double Precision
Field Value
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.
public GeoObjectList UsedOriginals
Field Value
Properties
Reduced
Access this property for the result of the reduction.
public ICurve2D[] Reduced { get; }
Property Value
- ICurve2D[]
Methods
Add(ICurve2D)
Adds a curve to the reduction.
public void Add(ICurve2D curve)
Parameters
curveICurve2D
Add(ICurve2D[])
Adds an array of curves to the reduction
public void Add(ICurve2D[] curves)
Parameters
curvesICurve2D[]
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.
public void Add(GeoObjectList l, Plane pln)
Parameters
lGeoObjectListplnPlane