#3741 Make it possible to enable/disable all well path components in plots and 3d view.

* Add check box to casing design and update of plot
* Add isEnabled() method to component interface which controls plotting.
This commit is contained in:
Gaute Lindkvist
2018-11-22 12:57:11 +01:00
parent 132408ab6f
commit ae8cb9d210
17 changed files with 166 additions and 67 deletions

View File

@@ -177,59 +177,62 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel(cvf::ModelBasicList*
for (RimWellPathAttribute* attribute : attributes)
{
if (attribute->componentType() == RiaDefines::CASING)
if (attribute->isEnabled())
{
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
double endMD = attribute->endMD();
double shoeLength = wellPathRadius;
double shoeStartMD = endMD - shoeLength;
std::vector<cvf::Vec3d> displayCoords;
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(shoeStartMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
std::vector<double> radii;
radii.push_back(wellPathRadius);
radii.push_back(wellPathRadius * 2.5);
radii.push_back(wellPathRadius * 1.1);
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
cvf::Collection<cvf::Part> parts;
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
for (auto part : parts)
if (attribute->componentType() == RiaDefines::CASING)
{
part->setSourceInfo(objectSourceInfo.p());
model->addPart(part.p());
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
double endMD = attribute->endMD();
double shoeLength = wellPathRadius;
double shoeStartMD = endMD - shoeLength;
std::vector<cvf::Vec3d> displayCoords;
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(shoeStartMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
std::vector<double> radii;
radii.push_back(wellPathRadius);
radii.push_back(wellPathRadius * 2.5);
radii.push_back(wellPathRadius * 1.1);
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
cvf::Collection<cvf::Part> parts;
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
for (auto part : parts)
{
part->setSourceInfo(objectSourceInfo.p());
model->addPart(part.p());
}
}
}
else if (attribute->componentType() == RiaDefines::PACKER)
{
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
double startMD = attribute->startMD();
double endMD = attribute->endMD();
std::vector<cvf::Vec3d> displayCoords;
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
std::vector<double> radii;
radii.push_back(wellPathRadius);
radii.push_back(wellPathRadius * 2.5);
radii.push_back(wellPathRadius * 2.5);
radii.push_back(wellPathRadius);
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
cvf::Collection<cvf::Part> parts;
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
for (auto part : parts)
else if (attribute->componentType() == RiaDefines::PACKER)
{
part->setSourceInfo(objectSourceInfo.p());
model->addPart(part.p());
double wellPathRadius = this->wellPathRadius(characteristicCellSize, this->wellPathCollection());
double startMD = attribute->startMD();
double endMD = attribute->endMD();
std::vector<cvf::Vec3d> displayCoords;
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(startMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(m_rimWellPath->wellPathGeometry()->interpolatedPointAlongWellPath(endMD)));
std::vector<double> radii;
radii.push_back(wellPathRadius);
radii.push_back(wellPathRadius * 2.5);
radii.push_back(wellPathRadius * 2.5);
radii.push_back(wellPathRadius);
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(attribute);
cvf::Collection<cvf::Part> parts;
geoGenerator.tubeWithCenterLinePartsAndVariableWidth(&parts, displayCoords, radii, attribute->defaultComponentColor());
for (auto part : parts)
{
part->setSourceInfo(objectSourceInfo.p());
model->addPart(part.p());
}
}
}
}