- static vector<Point> profile;
- if(profile.empty())
- {
- profile.push_back(Point(0, -0.02, 0));
- profile.push_back(Point(0, -0.014, 0.008));
- profile.push_back(Point(0, -0.014, 0.008));
- profile.push_back(Point(0, 0.014, 0.008));
- profile.push_back(Point(0, 0.014, 0.008));
- profile.push_back(Point(0, 0.02, 0));
- for(unsigned i=0; i<2; ++i)
- {
- profile.push_back(Point(0, -0.009+i*0.017, 0.008));
- profile.push_back(Point(0, -0.009+i*0.017, 0.0103));
- profile.push_back(Point(0, -0.009+i*0.017, 0.0103));
- profile.push_back(Point(0, -0.008+i*0.017, 0.0103));
- profile.push_back(Point(0, -0.008+i*0.017, 0.0103));
- profile.push_back(Point(0, -0.008+i*0.017, 0.008));
- }
- profile.push_back(Point(0, -0.002, 0.012));
- profile.push_back(Point(0, 0.002, 0.012));
- }
- static unsigned psize = profile.size();
-
- unsigned nsegs = (part.radius ? static_cast<unsigned>(part.length*(1<<quality))+1 : 1);
- float plen = part.length;
- if(part.radius)
- plen *= abs(part.radius);
-
- for(unsigned i=0; i<=nsegs; ++i)