First of all: I'm very sorry for the late respond. I've been to vocational college the last weeks and I have no access to the company files form my private laptop.
I should admit I'm looking at my code right now after quite a long time and I'm a bit confused myself right now.
Also I see that I accedently posted a false verison of my code. I must have made this post between two tasks. :/ Sorry about that!
The lintes 143 til 148 shouldne't be
(N_ExplodeCommandOther object)
(correctPosition object)
)
)
but actually
(correctPosition object)
)
)
I really must have been in a rush when I posted that.
To your second question: I understand what you mean and it confuses me as well.
From the pure logical part you should be absolutly correct: there shoulden't be any displace at all. That's what I thought as well.
formating of a block:
BLOCK,"name of the block"
any entities the block might contain
End of "name of the block"
formating of a block reference: INSERT,layer,"name of the block it refairs to",Xinsertion point,Yinsertion point,Zinsertion point,Xscaling factor,Yscaling factor,Zscaling factor,rotation angle,Xextrusion direction,Yextrusion direction,Zextrusion direction(linefeed)
formating of a line: LINE,layer,Xstart point,Ystart point,Zstart point,Xend point,Yend point,Zend point,length
The export should look about like this(assuming everything is placed on layer 0):
0 //theres a list of all layers in the first line of every exported file
BLOCK,A
LINE,0,0.0000,1.0000,0.0000,0.0000,2.0000,0.0000,1.0000
End of A
INSERT,0,A,2.0000,5.0000,3.0000,1.0000,1.0000,1.0000,rotation angle,Xextrusion direction, Yextrusion direction,Zextrusion direction
INSERT,0,A,11.0000,13.0000,39.0000,3.0000,-3.0000,3.0000,rotation angle,Xextrusion direction, Yextrusion direction,Zextrusion direction
Would it be of any use if I post a kind of program flow chart how the functions of the script are supposed to work? Maybe that way I could clarify my train of thoughts and you could see errors in my algorhythm I don't see because I constantly stare at them.
You propably know how errors love to hide in the plain sight of beginners.