Basic helical plunge and linear-ramp plunging

This commit is contained in:
Daniel Taylor
2016-02-03 17:37:18 -06:00
parent 377595647d
commit e5f1f4df3d
2 changed files with 247 additions and 6 deletions

View File

@@ -288,12 +288,14 @@ void ViewProviderPath::updateData(const App::Property* prop)
if (angle == 0)
angle = M_PI * 2;
int segments = 3/(deviation/angle); //we use a rather simple rule here, provisorily
double dZ = (next.z - last.z)/segments; //How far each sigment will helix in Z
for (int j = 1; j < segments; j++) {
//std::cout << "vector " << j << std::endl;
Base::Vector3d inter;
Base::Rotation rot(norm,(angle/segments)*j);
//std::cout << "angle " << (angle/segments)*j << std::endl;
rot.multVec((last - center),inter);
inter.z = dZ * j; //Enable displaying helices
//std::cout << "result " << inter.x << " , " << inter.y << " , " << inter.z << std::endl;
points.push_back( center + inter);
colorindex.push_back(1);