Working proof of concept for DPG rots & dirs

This commit is contained in:
WandererFan
2016-12-16 22:39:22 -05:00
committed by wmayer
parent d14cfa415f
commit 09f701786f
15 changed files with 1093 additions and 207 deletions

View File

@@ -153,26 +153,14 @@ gp_Ax2 DrawProjGroupItem::getViewAxis(const Base::Vector3d& pt,
// Base::Console().Message("TRACE - DPGI::getViewAxis - parallel flip: %d\n",flip);
viewAxis = TechDrawGeometry::getViewAxis(pt,axis,flip); //use default orientation
} else {
// Base::Console().Message("TRACE - DPGI::getViewAxis - skew flip: %d\n",flip);
viewAxis = TechDrawGeometry::getViewAxis(pt,axis,x,flip);
//Base::Console().Message("TRACE - DPGI::getViewAxis - skew flip: %d\n",flip);
// if (Type.isValue("Right") || Type.isValue("Left")) { //no difference with incorrect initial axis
// viewAxis = TechDrawGeometry::getViewAxis(pt,axis,x,!flip); //no difference with correct initial axis!!
// } else {
viewAxis = TechDrawGeometry::getViewAxis(pt,axis,x,flip);
// }
}
// if (Type.isValue("Front")) {
// viewAxis = TechDrawGeometry::getViewAxis(pt,axis,flip); //show front in upright stance
// } else {
// const char *viewProjType = Type.getValueAsString();
// DrawProjGroup* grp = getGroup();
// if (grp == nullptr) {
// Base::Console().Message("TRACE - DPGI::getViewAxis - NO GROUP!!!\n");
// return TechDrawGeometry::getViewAxis(pt,axis,flip); //too early
// } else {
// getGroup()->dumpViewDir("viewDir map"); //<<<<
// getGroup()->dumpXAxisDir("xAxisDir map");
// Base::Vector3d x = getGroup()->getXAxisDir(viewProjType);
// Base::Vector3d x = OrientBasis.getValue();
// viewAxis = TechDrawGeometry::getViewAxis(pt,axis,x,flip);
// }
// }
//Base::Console().Message("TRACE - DPGI::getViewAxis exits\n");
return viewAxis;
}
@@ -192,12 +180,12 @@ Base::Vector3d DrawProjGroupItem::rotated(const double angle)
DrawUtil::formatVector(line).c_str(),
DrawUtil::formatVector(oldBasis).c_str(),
DrawUtil::formatVector(newBasis).c_str());
if (getGroup() != nullptr) {
if (getGroup()->getException(Type.getValueAsString())) {
newBasis = newBasis * -1.0;
Base::Console().Message("TRACE - DPGI::rotated - EXCEPTION\n");
}
}
// if (getGroup() != nullptr) {
// if (getGroup()->getException(Type.getValueAsString())) {
// newBasis = newBasis * -1.0;
// Base::Console().Message("TRACE - DPGI::rotated - EXCEPTION\n");
// }
// }
return newBasis;
}