#817 #815 Improved commands for xyz - slices intersection boxes.

This commit is contained in:
Jacob Støren
2016-09-28 12:39:43 +02:00
parent c84b7ab6d9
commit fa6a6b4f08
10 changed files with 89 additions and 147 deletions

View File

@@ -59,26 +59,11 @@ void RicIntersectionBoxYSliceFeature::onActionTriggered(bool isChecked)
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString("Y-slice (Intersection box)");
RimCase* rimCase = NULL;
coll->firstAnchestorOrThisOfType(rimCase);
if (rimCase)
{
intersectionBox->setModelBoundingBox(rimCase->activeCellsBoundingBox());
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
if (!domainCoord.isUndefined())
{
intersectionBox->setYSlice(domainCoord.y());
}
else
{
intersectionBox->setYSlice(rimCase->activeCellsBoundingBox().center().y());
}
}
coll->appendIntersectionBox(intersectionBox);
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice(RimIntersectionBox::PLANE_STATE_Y, domainCoord);
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);