For rotation tool, I'm trying to convert a parabola creation by python command (which was working) as follow :
Code: Select all
const Part::GeomArcOfParabola* arcOfParabola = static_cast<const Part::GeomArcOfParabola*>(geo);
Base::Vector3d rotatedFocusPoint = getRotatedPoint(arcOfParabola->getFocus(), centerPoint, individualAngle * i);
Base::Vector3d rotatedCenterPoint = ;
double arcStartAngle, arcEndAngle;
arcOfParabola->getRange(arcStartAngle, arcEndAngle, /*emulateCCWXY=*/true);
stream << "append(Part.ArcOfParabola(Part.Parabola(App.Vector(" << rotatedFocusPoint.x << "," << rotatedFocusPoint.y << ",0),App.Vector(" << rotatedCenterPoint.x << "," << rotatedCenterPoint.y
<< ",0),App.Vector(0,0,1)),"
<< arcStartAngle << "," << arcEndAngle << "))\n";
And I want to create it like this now :
Code: Select all
Part::GeomArcOfParabola* arcOfParabola = static_cast<Part::GeomArcOfParabola*>(geo);
arcOfParabola->setCenter(getRotatedPoint(arcOfParabola->getCenter(), centerPoint, individualAngle* i));
//...???
geometriesToAdd.push_back(arcOfParabola);
However I cannot rotate the focus point as I have done before by rotating the focus point because there is no setFocus fonction. There is a setfocal but it takes a double.
Just changing the range will not rotate the parabola.
Anyone know?
Digging a little deeper it seems that there should be a 'setXAxis()' function in geometry.cpp/h Or setFocalPoint which is probably the same. With current situation it is not possible to reorient the parabola. (See ArcOfParabolaPyImp.cpp)
Besides, why the focal line is made of construction geometry and not internal geometry?