@@ -50,6 +50,8 @@ public partial class LusasV18Adapter
5050 public partial class LusasV19Adapter
5151#elif Debug191 || Release191
5252 public partial class LusasV191Adapter
53+ #elif Debug200 || Release200
54+ public partial class LusasV200Adapter
5355#else
5456 public partial class LusasV17Adapter
5557#endif
@@ -340,8 +342,6 @@ private bool CreateCollection(IEnumerable<Edge> edges)
340342 {
341343 if ( edges != null )
342344 {
343- List < Point > allPoints = new List < Point > ( ) ;
344-
345345 //Check List<Curve> is not null and Curve is not invalid (i.e. not a Line)
346346 List < Edge > validEdges = edges . Where ( x => CheckPropertyError ( x , y => y . Curve ) )
347347 . Where ( x => ! Engine . Adapters . Lusas . Query . InvalidEdge ( x ) ) . ToList ( ) ;
@@ -355,19 +355,10 @@ private bool CreateCollection(IEnumerable<Edge> edges)
355355 distinctEdges . Add ( edge ) ;
356356 }
357357
358- distinctEdges = Engine . Adapters . Lusas . Query . GetDistinctEdges ( distinctEdges ) ;
359-
360- foreach ( Edge edge in distinctEdges )
361- {
362- allPoints . Add ( edge . Curve . IStartPoint ( ) ) ;
363- allPoints . Add ( edge . Curve . IEndPoint ( ) ) ;
364- }
365-
366- List < Point > distinctPoints = Engine . Adapters . Lusas . Query . GetDistinctPoints ( allPoints ) ;
358+ List < Point > distinctPoints = distinctEdges . Select ( x => x . Curve . IStartPoint ( ) ) . Union ( edges . Select ( x => x . Curve . IEndPoint ( ) ) ) . ToList ( ) ;
367359
368360 List < Point > existingPoints = ReadPoints ( ) ;
369- List < Point > pointsToPush = distinctPoints . Except (
370- existingPoints , new PointDistanceComparer ( ) ) . ToList ( ) ;
361+ List < Point > pointsToPush = distinctPoints . Except ( existingPoints , new PointDistanceComparer ( ) ) . ToList ( ) ;
371362
372363 ReduceRuntime ( true ) ;
373364
@@ -378,13 +369,9 @@ private bool CreateCollection(IEnumerable<Edge> edges)
378369
379370 ReduceRuntime ( false ) ;
380371
381- List < IFPoint > lusasPoints = ReadLusasPoints ( ) ;
382- List < Point > points = new List < Point > ( ) ;
372+ List < Point > points = ReadPoints ( ) ;
383373
384- foreach ( IFPoint point in lusasPoints )
385- {
386- points . Add ( Adapters . Lusas . Convert . ToPoint ( point ) ) ;
387- }
374+ List < IFPoint > lusasPoints = ReadLusasPoints ( ) ;
388375
389376 CreateTags ( distinctEdges ) ;
390377
0 commit comments