removed unused code (#12276)

* removed unused code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
mosfet80
2024-02-12 18:36:57 +01:00
committed by GitHub
parent c7b7071308
commit aca71dfb05

View File

@@ -98,7 +98,7 @@ void ViewProviderMeshTransformDemolding::attach(App::DocumentObject* pcFeat)
SoMaterialBinding* pcMatBinding = new SoMaterialBinding;
// pcMatBinding->value = SoMaterialBinding::PER_VERTEX_INDEXED;
pcMatBinding->value = SoMaterialBinding::PER_FACE_INDEXED;
pcColorMat = new SoMaterial;
pcColorMat->diffuseColor.set1Value(0, 1, 1, 0);
@@ -118,10 +118,6 @@ void ViewProviderMeshTransformDemolding::attach(App::DocumentObject* pcFeat)
calcMaterialIndex(SbRotation());
// getting center point
center = static_cast<Feature*>(pcObject)->Mesh.getValue().getKernel().GetBoundBox().GetCenter();
// SoGetBoundingBoxAction boxAction;
// pcHighlight->getBoundingBox(&boxAction);
// SbVector3f Center = boxAction->getCenter();
}
void ViewProviderMeshTransformDemolding::calcNormalVector()
@@ -145,18 +141,6 @@ void ViewProviderMeshTransformDemolding::calcMaterialIndex(const SbRotation& rot
for (std::vector<SbVec3f>::const_iterator it = normalVector.begin(); it != normalVector.end();
++it, i++) {
rot.multVec(*it, result);
float Angle = acos((result.dot(Up)) / (result.length() * Up.length())) * (180 / M_PI);
if (Angle < 87.0) {
// pcMeshFaces->materialIndex .set1Value(i, 2);
}
else if (Angle > 90.0) {
// pcMeshFaces->materialIndex .set1Value(i, 1 );
}
else {
// pcMeshFaces->materialIndex .set1Value(i, 0 );
}
}
}
@@ -180,14 +164,9 @@ void ViewProviderMeshTransformDemolding::DragEndCallback()
void ViewProviderMeshTransformDemolding::valueChangedCallback()
{
// Base::Console().Log("Value change Callback\n");
// setTransformation(pcTrackballDragger->getMotionMatrix());
// pcTransform->rotation = pcTrackballDragger->rotation;
SbMatrix temp;
SbRotation rot = pcTrackballDragger->rotation.getValue();
// calcMaterialIndex(rot);
temp.setTransform(SbVec3f(0, 0, 0), // no transformation
rot, // rotation from the dragger
SbVec3f(1, 1, 1), // no scaling