allow non-sketch based additive and subtractive features

This commit is contained in:
Stefan Tröger
2015-05-10 09:35:29 +02:00
parent fab4ec990c
commit 9a2f5eea65
26 changed files with 115 additions and 203 deletions

View File

@@ -30,8 +30,7 @@
#include "FeatureMultiTransform.h"
#include "FeatureScaled.h"
#include "FeatureAdditive.h"
#include "FeatureSubtractive.h"
#include "FeatureAddSub.h"
#include <Mod/Part/App/TopoShape.h>
#include <Base/Console.h>
@@ -79,12 +78,12 @@ const std::list<gp_Trsf> MultiTransform::getTransformations(const std::vector<Ap
Part::Feature* originalFeature = static_cast<Part::Feature*>(originals.front());
TopoDS_Shape original;
if (originalFeature->getTypeId().isDerivedFrom(PartDesign::Additive::getClassTypeId())) {
PartDesign::Additive* addFeature = static_cast<PartDesign::Additive*>(originalFeature);
original = addFeature->AddShape.getShape()._Shape;
} else if (originalFeature->getTypeId().isDerivedFrom(PartDesign::Subtractive::getClassTypeId())) {
PartDesign::Subtractive* subFeature = static_cast<PartDesign::Subtractive*>(originalFeature);
original = subFeature->SubShape.getShape()._Shape;
if (originalFeature->getTypeId().isDerivedFrom(PartDesign::FeatureAddSub::getClassTypeId())) {
PartDesign::FeatureAddSub* addFeature = static_cast<PartDesign::FeatureAddSub*>(originalFeature);
if(addFeature->getAddSubType() == FeatureAddSub::Additive)
original = addFeature->AddSubShape.getShape()._Shape;
else
original = addFeature->AddSubShape.getShape()._Shape;
}
GProp_GProps props;