void AngleMeasure::calculateEndsOneLine(const Vec3d start, const Vec3d end, Vec3d &perp1Start, Vec3d &perp1End, Vec3d &perp2Start, Vec3d &perp2End, double &angle) { Vec3d v0 = end - start; Vec3d v1 = Vec3d(0,0,0) - start; Vec3d p = v0 ^ v1; p *= 0.08; // end width perp1Start.set(start[0]-p[0],start[1]-p[1],start[2]-p[2]); perp1End.set(start[0]+p[0],start[1]+p[1],start[2]+p[2]); v1 = Vec3d(0,0,0) - end; p = v0 ^ v1; p *= 0.08; // end width perp2Start.set(end[0]-p[0],end[1]-p[1],end[2]-p[2]); perp2End.set(end[0]+p[0],end[1]+p[1],end[2]+p[2]); angle = start.angle(end); }