PartDesign: change feature DressUp behavior when used for pattern
Repurpose DressUp.SupportTransform property to define the following behavior, * When disabled (default), only the dressing will be used for patterning. * When enabled, the additive/subtractive shape of the dressed base feature will be used for patterning. Any dressing that is not applied to the based feature will be ignored. * If the dressing is applied to non-additive/subtractive feature, then only the dressing will be used for patterning. New API FreatureAddSub::getAddSubShape() is added to account for the fact that a dressing (e.g. a fillet) can be either additive or subtractive, which means that a DressUP feature may contain both additive and subtractive shapes. FeatureTransformed is modified to perform both fusion and cut if required.
This commit is contained in:
@@ -195,16 +195,17 @@ void ViewProviderTransformed::recomputeFeature(bool recompute)
|
||||
for (PartDesign::Transformed::rejectedMap::const_iterator o = rejected_trsf.begin(); o != rejected_trsf.end(); o++) {
|
||||
if (o->second.empty()) continue;
|
||||
|
||||
TopoDS_Shape shape;
|
||||
Part::TopoShape fuseShape;
|
||||
Part::TopoShape cutShape;
|
||||
if ((o->first)->getTypeId().isDerivedFrom(PartDesign::FeatureAddSub::getClassTypeId())) {
|
||||
PartDesign::FeatureAddSub* feature = static_cast<PartDesign::FeatureAddSub*>(o->first);
|
||||
shape = feature->AddSubShape.getShape().getShape();
|
||||
feature->getAddSubShape(fuseShape, cutShape);
|
||||
}
|
||||
|
||||
if (shape.IsNull()) continue;
|
||||
if (fuseShape.isNull()) continue;
|
||||
|
||||
// Display the rejected transformations in red
|
||||
TopoDS_Shape cShape(shape);
|
||||
TopoDS_Shape cShape(fuseShape.getShape());
|
||||
|
||||
try {
|
||||
// calculating the deflection value
|
||||
|
||||
Reference in New Issue
Block a user