mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user