thanks for the further info, I will try it without the if-s, because I need only to check a vertical line vs. non-vertical surface plane, and speed is essential. I just have to redesign my database now

the best would be for me to use 2 points vs. 3 points check as they in theory can define a line and a plane exactly. maybe it's not impossible to do as fast...