From: vsv Date: Thu, 12 Sep 2019 11:47:57 +0000 (+0300) Subject: Issue #3001: Fit all only to non-axillary object X-Git-Tag: V9_4_0a2~4^2~106 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=efc01f73d21e44920950a7b420fa4cc9f8945809;p=modules%2Fshaper.git Issue #3001: Fit all only to non-axillary object --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 6370d6c4b..9807b344c 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -2121,11 +2121,22 @@ void PartSet_Fitter::fitAll(Handle(V3d_View) theView) for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) { aRes = (*aIt); if (aRes->isDisplayed()) { - GeomShapePtr aShape = aRes->shape(); - aShape->computeSize(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); - Bnd_Box aBox; - aBox.Update(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); - aBndBox.Add(aBox); + FeaturePtr aFeature = ModelAPI_Feature::feature(aRes); + if (aFeature.get()) { + std::shared_ptr aSPFeature = + std::dynamic_pointer_cast(aFeature); + if (aSPFeature.get()) { + bool isAxiliary = + aSPFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value(); + if (!(aSPFeature->isExternal() || isAxiliary)) { + GeomShapePtr aShape = aRes->shape(); + aShape->computeSize(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); + Bnd_Box aBox; + aBox.Update(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); + aBndBox.Add(aBox); + } + } + } } } }