Method JoinEntities
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
JoinEntities(IReadOnlyList<DxfEntity>)
Joins other curves into the entity, as AutoCAD's JoinEntities does, by the rules JoinEntity(DxfEntity) says:
those that join, in one writing of the entity, and the others left out, each left as it is for the caller to erase.
Pieces joined end to end are chained on from the entity's end, then back from its start, each time the one of lowest
index of those that meet the end reached, so that the lines of a square given in any order close a polyline of one of
them; 10 000 lines in any order are chained in time along their count. Lines join whatever their order. Arcs and
elliptical arcs are taken in the order of their starts counter-clockwise from the entity's end, the lower index first
at one angle, each run on from the entity as it stands then, so that their order does not change what they make: the
quarter from 0 to pi / 2 given the arcs from 3 pi / 2 to 7 pi / 4 and from 7 pi / 4 round to pi / 8, in either order,
runs to 7 pi / 4 and leaves out the second, which would make it whole.
public IReadOnlyList<int> JoinEntities(IReadOnlyList<DxfEntity> otherEntities)
Parameters
otherEntitiesIReadOnlyList<DxfEntity>The curves to join; one given twice is joined once.
Returns
- IReadOnlyList<int>
The indices of the curves joined, in increasing order; none where none joins, and nothing is written then.
Exceptions
- ArgumentNullException
Thrown when the list is null.
- ArgumentException
Thrown when a curve is null, erased or this entity.
- InvalidOperationException
Thrown when the entity is erased, or has no ends to join at, as JoinEntity(DxfEntity) says.
- NotSupportedException
Thrown for a class AutoCAD's JOIN joins nothing into, as a CIRCLE or a TEXT.