mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#923 Intersections: Input points by clicking in 3D view
This commit is contained in:
@@ -89,14 +89,22 @@ bool RicNewPolylineIntersectionFeature::handleEvent(cvf::Object* eventObject)
|
||||
if (polylineUiEvent)
|
||||
{
|
||||
RimIntersection* crossSection = selection[0];
|
||||
if (crossSection->inputFromViewerEnabled())
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
crossSection->firstAncestorOrThisOfType(rimCase);
|
||||
CVF_ASSERT(rimCase);
|
||||
|
||||
RimCase* rimCase = NULL;
|
||||
crossSection->firstAncestorOrThisOfType(rimCase);
|
||||
CVF_ASSERT(rimCase);
|
||||
|
||||
if (crossSection->inputPolyLineFromViewerEnabled())
|
||||
{
|
||||
crossSection->appendPointToPolyLine(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint);
|
||||
|
||||
// Further Ui processing is stopped when true is returned
|
||||
return true;
|
||||
}
|
||||
else if (crossSection->inputExtrusionPointsFromViewerEnabled())
|
||||
{
|
||||
crossSection->appendPointToCustomExtrusion(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint);
|
||||
|
||||
// Further Ui processing is stopped when true is returned
|
||||
return true;
|
||||
}
|
||||
@@ -140,7 +148,7 @@ void RicNewPolylineIntersectionFeatureCmd::redo()
|
||||
RimIntersection* crossSection = new RimIntersection();
|
||||
crossSection->name = "Polyline";
|
||||
crossSection->type = RimIntersection::CS_POLYLINE;
|
||||
crossSection->inputFromViewerEnabled = true;
|
||||
crossSection->inputPolyLineFromViewerEnabled = true;
|
||||
|
||||
m_crossSectionCollection->appendCrossSection(crossSection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user