remove unnecessary std::numbers::pi;
using std::numbers::pi is not necessary. fix compile warning removed commented code
This commit is contained in:
@@ -55,13 +55,10 @@ ViewProviderRobotObject::ViewProviderRobotObject()
|
||||
|
||||
pcRobotRoot = new Gui::SoFCSelection();
|
||||
pcRobotRoot->preselectionMode = Gui::SoFCSelection::OFF;
|
||||
// pcRobotRoot->selectionMode = Gui::SoFCSelection::SEL_OFF;
|
||||
// pcRobotRoot->style = Gui::SoFCSelection::BOX;
|
||||
pcRobotRoot->ref();
|
||||
|
||||
pcSimpleRoot = new Gui::SoFCSelection();
|
||||
pcSimpleRoot->preselectionMode = Gui::SoFCSelection::OFF;
|
||||
// pcSimpleRoot->selectionMode = Gui::SoFCSelection::SEL_OFF;
|
||||
pcSimpleRoot->ref();
|
||||
|
||||
pcOffRoot = new SoGroup();
|
||||
@@ -369,16 +366,11 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
|
||||
toolShape->setTransformation(
|
||||
(robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix());
|
||||
}
|
||||
// pcTcpTransform->translation =
|
||||
// SbVec3f(loc.getPosition().x,loc.getPosition().y,loc.getPosition().z);
|
||||
// pcTcpTransform->rotation =
|
||||
// SbRotation(loc.getRotation()[0],loc.getRotation()[1],loc.getRotation()[2],loc.getRotation()[3]);
|
||||
}
|
||||
else if (prop == &robObj->ToolShape) {
|
||||
App::DocumentObject* o = robObj->ToolShape.getValue<App::DocumentObject*>();
|
||||
|
||||
if (o && (o->isDerivedFrom<Part::Feature>() || o->isDerivedFrom<App::VRMLObject>())) {
|
||||
// Part::Feature *p = dynamic_cast<Part::Feature *>(o);
|
||||
toolShape = Gui::Application::Instance->getViewProvider(o);
|
||||
toolShape->setTransformation(
|
||||
(robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix());
|
||||
@@ -396,8 +388,6 @@ void ViewProviderRobotObject::setAxisTo(float A1,
|
||||
float A6,
|
||||
const Base::Placement& Tcp)
|
||||
{
|
||||
using std::numbers::pi;
|
||||
|
||||
Robot::RobotObject* robObj = static_cast<Robot::RobotObject*>(pcObject);
|
||||
|
||||
if (Axis1Node) {
|
||||
@@ -445,7 +435,7 @@ void ViewProviderRobotObject::DraggerMotionCallback(SoDragger* dragger)
|
||||
SbVec3f center(Tcp.getPosition().x, Tcp.getPosition().y, Tcp.getPosition().z);
|
||||
M.getTransform(translation, rotation, scaleFactor, scaleOrientation);
|
||||
rotation.getValue(q0, q1, q2, q3);
|
||||
// Base::Console().message("M %f %f %f\n", M[3][0], M[3][1], M[3][2]);
|
||||
|
||||
Base::Rotation rot(q0, q1, q2, q3);
|
||||
Base::Vector3d pos(translation[0], translation[1], translation[2]);
|
||||
robObj->Tcp.setValue(Base::Placement(pos, rot));
|
||||
|
||||
Reference in New Issue
Block a user