I wrote an AutoCAD script that is supposed to draw me two independent, spatially separated 3D polylines. After executing the script, however, I get connecions between the polylines. The funny thing is that two consecutive runs of the script may produce different connections.
AutoCAD scripts are very picky about blanks as they are sometimes interpreted as command termination indicators. There are no blanks at the end of the lines in the script below. There is, however a blank line at the end of the file.
3dpoly 396.958912852,30.8766759787,27.6970084442
392.314112161,78.0361288065,27.6970084442
383.307717991,107.726231443,27.6970084442
369.551813005,153.073372946,27.6970084442
354.926222488,180.435928247,27.6970084442
332.587844921,222.228093208,27.6970084442
312.905111301,246.211573517,27.6970084442
282.842712475,282.842712475,27.6970084442
258.859232165,302.525446095,27.6970084442
222.228093208,332.587844921,27.6970084442
194.865537907,347.213435437,27.6970084442
153.073372946,369.551813005,27.6970084442
123.383270309,378.558207175,27.6970084442
78.0361288065,392.314112161,27.6970084442
47.1594528278,395.355199309,27.6970084442
0.0,400.0,27.6970084442
-47.1594528278,395.355199309,27.6970084442
-78.0361288065,392.314112161,27.6970084442
-123.383270309,378.558207175,27.6970084442
-153.073372946,369.551813005,27.6970084442
-194.865537907,347.213435437,27.6970084442
-222.228093208,332.587844921,27.6970084442
-258.859232165,302.525446095,27.6970084442
-282.842712475,282.842712475,27.6970084442
-312.905111301,246.211573517,27.6970084442
-332.587844921,222.228093208,27.6970084442
-354.926222488,180.435928247,27.6970084442
-369.551813005,153.073372946,27.6970084442
-383.307717991,107.726231443,27.6970084442
-392.314112161,78.0361288065,27.6970084442
-396.958912852,30.8766759787,27.6970084442
-400.0,0.0,27.6970084442
-396.958912852,-30.8766759787,27.6970084442
-392.314112161,-78.0361288065,27.6970084442
-383.307717991,-107.726231443,27.6970084442
-369.551813005,-153.073372946,27.6970084442
-354.926222488,-180.435928247,27.6970084442
-332.587844921,-222.228093208,27.6970084442
-312.905111301,-246.211573517,27.6970084442
-282.842712475,-282.842712475,27.6970084442
-258.859232165,-302.525446095,27.6970084442
-222.228093208,-332.587844921,27.6970084442
-194.865537907,-347.213435437,27.6970084442
-153.073372946,-369.551813005,27.6970084442
-123.383270309,-378.558207175,27.6970084442
-78.0361288065,-392.314112161,27.6970084442
-47.1594528278,-395.355199309,27.6970084442
0.0,-400.0,27.6970084442
47.1594528278,-395.355199309,27.6970084442
78.0361288065,-392.314112161,27.6970084442
123.383270309,-378.558207175,27.6970084442
153.073372946,-369.551813005,27.6970084442
194.865537907,-347.213435437,27.6970084442
222.228093208,-332.587844921,27.6970084442
258.859232165,-302.525446095,27.6970084442
282.842712475,-282.842712475,27.6970084442
312.905111301,-246.211573517,27.6970084442
332.587844921,-222.228093208,27.6970084442
354.926222488,-180.435928247,27.6970084442
369.551813005,-153.073372946,27.6970084442
383.307717991,-107.726231443,27.6970084442
392.314112161,-78.0361288065,27.6970084442
396.958912852,-30.8766759787,27.6970084442
400.0,0.0,27.6970084442
396.958912852,30.8766759787,27.6970084442
3dpoly 392.314112161,78.0361288065,-27.6970084442
396.958912852,30.8766759787,-27.6970084442
400.0,0.0,-27.6970084442
396.958912852,-30.8766759787,-27.6970084442
392.314112161,-78.0361288065,-27.6970084442
383.307717991,-107.726231443,-27.6970084442
369.551813005,-153.073372946,-27.6970084442
354.926222488,-180.435928247,-27.6970084442
332.587844921,-222.228093208,-27.6970084442
312.905111301,-246.211573517,-27.6970084442
282.842712475,-282.842712475,-27.6970084442
258.859232165,-302.525446095,-27.6970084442
222.228093208,-332.587844921,-27.6970084442
194.865537907,-347.213435437,-27.6970084442
153.073372946,-369.551813005,-27.6970084442
123.383270309,-378.558207175,-27.6970084442
78.0361288065,-392.314112161,-27.6970084442
47.1594528278,-395.355199309,-27.6970084442
0.0,-400.0,-27.6970084442
-47.1594528278,-395.355199309,-27.6970084442
-78.0361288065,-392.314112161,-27.6970084442
-123.383270309,-378.558207175,-27.6970084442
-153.073372946,-369.551813005,-27.6970084442
-194.865537907,-347.213435437,-27.6970084442
-222.228093208,-332.587844921,-27.6970084442
-258.859232165,-302.525446095,-27.6970084442
-282.842712475,-282.842712475,-27.6970084442
-312.905111301,-246.211573517,-27.6970084442
-332.587844921,-222.228093208,-27.6970084442
-354.926222488,-180.435928247,-27.6970084442
-369.551813005,-153.073372946,-27.6970084442
-383.307717991,-107.726231443,-27.6970084442
-392.314112161,-78.0361288065,-27.6970084442
-396.958912852,-30.8766759787,-27.6970084442
-400.0,0.0,-27.6970084442
-396.958912852,30.8766759787,-27.6970084442
-392.314112161,78.0361288065,-27.6970084442
-383.307717991,107.726231443,-27.6970084442
-369.551813005,153.073372946,-27.6970084442
-354.926222488,180.435928247,-27.6970084442
-332.587844921,222.228093208,-27.6970084442
-312.905111301,246.211573517,-27.6970084442
-282.842712475,282.842712475,-27.6970084442
-258.859232165,302.525446095,-27.6970084442
-222.228093208,332.587844921,-27.6970084442
-194.865537907,347.213435437,-27.6970084442
-153.073372946,369.551813005,-27.6970084442
-123.383270309,378.558207175,-27.6970084442
-78.0361288065,392.314112161,-27.6970084442
-47.1594528278,395.355199309,-27.6970084442
0.0,400.0,-27.6970084442
47.1594528278,395.355199309,-27.6970084442
78.0361288065,392.314112161,-27.6970084442
123.383270309,378.558207175,-27.6970084442
153.073372946,369.551813005,-27.6970084442
194.865537907,347.213435437,-27.6970084442
222.228093208,332.587844921,-27.6970084442
258.859232165,302.525446095,-27.6970084442
282.842712475,282.842712475,-27.6970084442
312.905111301,246.211573517,-27.6970084442
332.587844921,222.228093208,-27.6970084442
354.926222488,180.435928247,-27.6970084442
369.551813005,153.073372946,-27.6970084442
383.307717991,107.726231443,-27.6970084442
392.314112161,78.0361288065,-27.6970084442