-// displayLength(Last_Pnt, Current_Pnt, aNormal, store);
- displayLength(gp_Pnt(Last.x,Current.y,Last.z), gp_Pnt(Current.x,Current.y,Last.z), gp::DZ().Reversed(), store);
- displayLength(gp_Pnt(Current.x,Last.y,Last.z), gp_Pnt(Current.x,Current.y,Last.z), gp::DZ(), store);
- displayLength(gp_Pnt(Current.x,Current.y,Last.z), Current_Pnt, gp::DY(), store);
+ if((( Abs(Last.x-Current.x) <= Precision::Confusion() &&
+ Abs(Last.y-Current.y) <= Precision::Confusion() ) ||
+ ( Abs(Last.x-Current.x) <= Precision::Confusion() &&
+ Abs(Last.z-Current.z) <= Precision::Confusion() ) ||
+ ( Abs(Last.y-Current.y) <= Precision::Confusion() &&
+ Abs(Last.z-Current.z) <= Precision::Confusion() ))&&
+ myMode == 1)
+ {
+ // For better colocation of dimensions if only one coordinate changes (aNormal is a better choice)
+ displayLength(P0, Current_Pnt, aNormal, store);
+ }
+ else
+ {
+ displayLength(gp_Pnt(P0.X(),Current.y,P0.Z()), gp_Pnt(Current.x,Current.y,P0.Z()), gp::DZ().Reversed(), store);
+ displayLength(gp_Pnt(Current.x,P0.Y(),P0.Z()), gp_Pnt(Current.x,Current.y,P0.Z()), gp::DZ(), store);
+ displayLength(gp_Pnt(Current.x,Current.y,P0.Z()), Current_Pnt, gp::DX(), store);
+ }