//=======================================================================
Standard_Boolean AIS_LengthDimension::CheckPlane (const gp_Pln& thePlane) const
{
- if (!thePlane.Contains (myFirstPoint, Precision::Confusion()) &&
- !thePlane.Contains (mySecondPoint, Precision::Confusion()))
+ Standard_Boolean anIsFaultyNormal =
+ thePlane.Axis().Direction().IsParallel(gce_MakeDir (myFirstPoint, mySecondPoint), Precision::Angular());
+
+ if ((!thePlane.Contains (myFirstPoint, Precision::Confusion()) && !thePlane.Contains (mySecondPoint, Precision::Confusion()))
+ || anIsFaultyNormal)
{
return Standard_False;
}
--- /dev/null
+puts "============"
+puts "CR26317"
+puts "============"
+puts ""
+
+##########################################################################################
+puts "Visualization, AIS_LengthDimension::CheckPlane is incorrect"
+##########################################################################################
+
+pload VISUALIZATION MODELING
+
+box b 100 200 300
+vinit View1
+vclear
+vaxo
+explode b F
+vdisplay b_1 b_2
+vdimension len -length -shapes b_1 b_2 -plane zox
+vfit
+
+vdump ${imagedir}/${casename}.png