#2703 An initial implementation of filled drawing style with problems remaining.

* New vertices are successfully created in the intersections between the
  curve and draw surface triangles
* New vertices are also inserted along the bottom edge of the filled curve.
* However, new vertices will still need to be inserted in the lines connecting the
  top of the curve and the bottom where they intersect with the triangles.
* The option for filled curves remain hidden in the GUI. See #2860.

# Please enter the commit message for your changes. Lines starting
This commit is contained in:
Gaute Lindkvist committed 2018-05-07 11:14:25 +02:00
1 parent fba437f595
commit 78326bb19c
6 files changed
+298 -113

No files matched your search

@@ -50,7 +50,15 @@ namespace caf
addItem(Rim3dWellLogCurve::HORIZONTAL_CENTER, "HORIZONTAL_CENTER", "Centered - Horizontal");
addItem(Rim3dWellLogCurve::HORIZONTAL_RIGHT, "HORIZONTAL_RIGHT", "Right");
setDefault(Rim3dWellLogCurve::VERTICAL_ABOVE);
}
}
template<>
void AppEnum< Rim3dWellLogCurve::DrawStyle >::setUp()
{
addItem(Rim3dWellLogCurve::LINE, "LINE", "Line");
addItem(Rim3dWellLogCurve::FILLED, "FILLED", "Filled");
setDefault(Rim3dWellLogCurve::LINE);
}
}
//--------------------------------------------------------------------------------------------------
@@ -70,6 +78,7 @@ Rim3dWellLogCurve::Rim3dWellLogCurve()
m_maxCurveValue.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
CAF_PDM_InitField(&m_drawPlane, "DrawPlane", DrawPlaneEnum(VERTICAL_ABOVE), "Draw Plane", "", "", "");
CAF_PDM_InitField(&m_drawStyle, "DrawStyle", DrawStyleEnum(LINE), "Draw Style", "", "", "");
CAF_PDM_InitField(&m_color, "CurveColor", cvf::Color3f(0.0f, 0.0f, 0.0f), "Curve Color", "", "", "");
}
@@ -98,6 +107,14 @@ Rim3dWellLogCurve::DrawPlane Rim3dWellLogCurve::drawPlane() const
return m_drawPlane();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Rim3dWellLogCurve::DrawStyle Rim3dWellLogCurve::drawStyle() const
{
return m_drawStyle();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -192,6 +209,8 @@ void Rim3dWellLogCurve::configurationUiOrdering(caf::PdmUiOrdering& uiOrdering)
{
caf::PdmUiGroup* configurationGroup = uiOrdering.addNewGroup("Curve Configuration");
configurationGroup->add(&m_drawPlane);
// Disable filled draw style in the GUI because of triangle stitching issue #2860.
// configurationGroup->add(&m_drawStyle);
configurationGroup->add(&m_color);
configurationGroup->add(&m_minCurveValue);
configurationGroup->add(&m_maxCurveValue);
@@ -50,6 +50,14 @@ public:
HORIZONTAL_RIGHT
};
typedef caf::AppEnum<DrawPlane> DrawPlaneEnum;
enum DrawStyle
{
LINE,
FILLED
};
typedef caf::AppEnum<DrawStyle> DrawStyleEnum;
public:
Rim3dWellLogCurve();
virtual ~Rim3dWellLogCurve();
@@ -60,7 +68,8 @@ public:
virtual QString resultPropertyString() const = 0;
DrawPlane drawPlane() const;
double drawPlaneAngle() const;
DrawStyle drawStyle() const;
double drawPlaneAngle() const;
cvf::Color3f color() const;
bool isShowingCurve() const;
@@ -73,7 +82,7 @@ public:
double maxCurveValue() const;
void resetMinMaxValuesAndUpdateUI();
bool findClosestPointOnCurve(const cvf::Vec3d& globalIntersection,
cvf::Vec3d* closestPoint,
cvf::Vec3d* closestPoint,
double* measuredDepthAtPoint,
double* valueAtPoint) const;
@@ -89,7 +98,8 @@ protected:
private:
void resetMinMaxValues();
protected:
caf::PdmField<caf::AppEnum<DrawPlane>> m_drawPlane;
caf::PdmField<DrawPlaneEnum> m_drawPlane;
caf::PdmField<DrawStyleEnum> m_drawStyle;
caf::PdmField<cvf::Color3f> m_color;
caf::PdmField<double> m_minCurveValue;
caf::PdmField<double> m_maxCurveValue;