Gui: Add ability to disable single-solid rule by default
This commit is contained in:
committed by
Adrián Insaurralde Avalos
parent
e4ed0d883f
commit
302706be38
@@ -180,6 +180,12 @@ bool Feature::isSingleSolidRuleSatisfied(const TopoDS_Shape& shape, TopAbs_Shape
|
||||
Feature::SingleSolidRuleMode Feature::singleSolidRuleMode()
|
||||
{
|
||||
auto body = getFeatureBody();
|
||||
|
||||
// When the feature is not part of an body (which should not happen) let's stay with the default
|
||||
if (!body) {
|
||||
return SingleSolidRuleMode::Enforced;
|
||||
}
|
||||
|
||||
auto areCompoundSolidsAllowed = body->AllowCompound.getValue();
|
||||
|
||||
return areCompoundSolidsAllowed ? SingleSolidRuleMode::Disabled : SingleSolidRuleMode::Enforced;
|
||||
|
||||
Reference in New Issue
Block a user