0024448: Possible copy-paste bug in IGESGeom_SplineCurve.cxx
[occt.git] / src / AIS / AIS_LengthDimension.cxx
CommitLineData
b311480e 1// Created on: 1996-12-05
2// Created by: Arnaud BOUZY/Odile Olivier
3// Copyright (c) 1996-1999 Matra Datavision
a6eb515f 4// Copyright (c) 1999-2013 OPEN CASCADE SAS
b311480e 5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
a6eb515f 21#include <AIS_LengthDimension.hxx>
7fd59977 22
23#include <AIS.hxx>
a6eb515f 24#include <BRep_Tool.hxx>
7fd59977 25#include <BRepAdaptor_Curve.hxx>
a6eb515f 26#include <BRepGProp_Face.hxx>
27#include <BRepLib_MakeVertex.hxx>
28#include <BRepTopAdaptor_FClass2d.hxx>
7fd59977 29#include <ElCLib.hxx>
30#include <ElSLib.hxx>
7fd59977 31#include <Geom_Line.hxx>
a6eb515f 32#include <gce_MakeDir.hxx>
a6eb515f 33#include <Graphic3d_Group.hxx>
34#include <Graphic3d_ArrayOfSegments.hxx>
d7bffd44 35#include <PrsMgr_PresentationManager.hxx>
36#include <Prs3d_Root.hxx>
7fd59977 37#include <TopExp.hxx>
38#include <TopExp_Explorer.hxx>
7fd59977 39
a6eb515f 40IMPLEMENT_STANDARD_HANDLE(AIS_LengthDimension, AIS_Dimension)
41IMPLEMENT_STANDARD_RTTIEXT(AIS_LengthDimension, AIS_Dimension)
7fd59977 42
43//=======================================================================
44//function : Constructor
a6eb515f 45//purpose : Dimension between two points
7fd59977 46//=======================================================================
47
a6eb515f 48AIS_LengthDimension::AIS_LengthDimension (const gp_Pnt& theFirstPoint,
49 const gp_Pnt& theSecondPoint,
50 const gp_Pln& theDimensionPlane)
d7bffd44 51: AIS_Dimension()
7fd59977 52{
a6eb515f 53 myIsInitialized = Standard_True;
54 myFirstPoint = theFirstPoint;
55 mySecondPoint = theSecondPoint;
56 myFirstShape = BRepLib_MakeVertex (myFirstPoint);
57 mySecondShape = BRepLib_MakeVertex (mySecondPoint);
58 myShapesNumber = 2;
59 SetKindOfDimension (AIS_KOD_LENGTH);
60 SetWorkingPlane (theDimensionPlane);
d7bffd44 61 SetFlyout (15.0);
7fd59977 62}
63
7fd59977 64//=======================================================================
65//function : Constructor
a6eb515f 66//purpose : Dimension between two shape
7fd59977 67//=======================================================================
68
a6eb515f 69AIS_LengthDimension::AIS_LengthDimension (const TopoDS_Shape& theFirstShape,
70 const TopoDS_Shape& theSecondShape,
71 const gp_Pln& theWorkingPlane)
d7bffd44 72: AIS_Dimension()
7fd59977 73{
a6eb515f 74 myIsInitialized = Standard_False;
75 myFirstShape = theFirstShape;
76 mySecondShape = theSecondShape;
77 myShapesNumber = 2;
78 SetKindOfDimension (AIS_KOD_LENGTH);
79 SetWorkingPlane (theWorkingPlane);
d7bffd44 80 SetFlyout (15.0);
7fd59977 81}
82
83//=======================================================================
84//function : Constructor
a6eb515f 85//purpose : Dimension of one edge
7fd59977 86//=======================================================================
87
a6eb515f 88AIS_LengthDimension::AIS_LengthDimension (const TopoDS_Edge& theEdge,
89 const gp_Pln& theWorkingPlane)
d7bffd44 90: AIS_Dimension()
7fd59977 91{
a6eb515f 92 myIsInitialized = Standard_False;
93 myFirstShape = theEdge;
94 myShapesNumber = 1;
95 SetKindOfDimension (AIS_KOD_LENGTH);
96 SetWorkingPlane (theWorkingPlane);
d7bffd44 97 SetFlyout (15.0);
7fd59977 98}
99
7fd59977 100//=======================================================================
a6eb515f 101//function : Constructor
102//purpose : Dimension between two faces
7fd59977 103//=======================================================================
104
a6eb515f 105AIS_LengthDimension::AIS_LengthDimension (const TopoDS_Face& theFirstFace,
106 const TopoDS_Face& theSecondFace)
d7bffd44 107: AIS_Dimension()
7fd59977 108{
a6eb515f 109 myIsInitialized = Standard_False;
110 myFirstShape = theFirstFace;
111 mySecondShape = theSecondFace;
112 myShapesNumber = 2;
d7bffd44 113 SetKindOfDimension (AIS_KOD_LENGTH);
62b6361a 114 SetFlyout (15.0);
7fd59977 115}
116
117//=======================================================================
a6eb515f 118//function : Constructor
119//purpose : Dimension between two shape
7fd59977 120//=======================================================================
121
a6eb515f 122AIS_LengthDimension::AIS_LengthDimension (const TopoDS_Face& theFace,
123 const TopoDS_Edge& theEdge)
d7bffd44 124: AIS_Dimension()
7fd59977 125{
a6eb515f 126 myIsInitialized = Standard_False;
127 myFirstShape = theFace;
128 mySecondShape = theEdge;
129 myShapesNumber = 2;
d7bffd44 130 SetKindOfDimension (AIS_KOD_LENGTH);
62b6361a 131 SetFlyout (15.0);
7fd59977 132}
133
134//=======================================================================
a6eb515f 135//function : initTwoEdgesLength
136//purpose : Initialization of dimanesion between two linear edges
7fd59977 137//=======================================================================
138
a6eb515f 139Standard_Boolean AIS_LengthDimension::initTwoEdgesLength (const TopoDS_Edge & theFirstEdge,
d7bffd44 140 const TopoDS_Edge& theSecondEdge,
141 gp_Dir& theDirAttach)
7fd59977 142{
a6eb515f 143 Standard_Integer anExtShapeIndex = 0;
144 BRepAdaptor_Curve aFirstCurveAdapt (theFirstEdge);
145 if (aFirstCurveAdapt.GetType() != GeomAbs_Line)
146 return Standard_False;
147 BRepAdaptor_Curve aSecondCurveAdapt (theSecondEdge);
148 if (aSecondCurveAdapt.GetType() != GeomAbs_Line)
149 return Standard_False;
150 Handle(Geom_Curve) aFirstCurve, aSecondCurve;
151 gp_Pnt aPoint11,aPoint12,aPoint21,aPoint22;
152 Standard_Boolean isFirstInfinite (Standard_False),
153 isSecondInfinite (Standard_False);
154 Handle(Geom_Curve) anExtCurve;
155
156 if (!AIS::ComputeGeometry (theFirstEdge, theSecondEdge,anExtShapeIndex,
157 aFirstCurve, aSecondCurve, aPoint11, aPoint12,
158 aPoint21, aPoint22, anExtCurve, isFirstInfinite,
159 isSecondInfinite, new Geom_Plane(GetWorkingPlane())))
160 return Standard_False;
161
162 const Handle(Geom_Line)& aGeomLine1 = (Handle(Geom_Line)&) aFirstCurve;
163 const Handle(Geom_Line)& aGeomLine2 = (Handle(Geom_Line)&) aSecondCurve;
164 const gp_Lin& aLin1 = aGeomLine1->Lin();
165 const gp_Lin& aLin2 = aGeomLine2->Lin();
166
167 myValue = aLin1.Distance (aLin2);
168 theDirAttach = aLin1.Direction();
169
170 gp_Pnt aCurPos;
171 if (!isFirstInfinite)
172 {
173 gp_Pnt aPoint2 = ElCLib::Value(ElCLib::Parameter (aLin2, aPoint11), aLin2);
174 aCurPos.SetXYZ((aPoint11.XYZ() + aPoint2.XYZ()) / 2.);
175 }
176 else if (!isSecondInfinite)
177 {
178 gp_Pnt aPoint2 = ElCLib::Value (ElCLib::Parameter (aLin1, aPoint21), aLin1);
179 aCurPos.SetXYZ ((aPoint21.XYZ() + aPoint2.XYZ()) / 2.);
7fd59977 180 }
a6eb515f 181 else
182 aCurPos.SetXYZ((aLin1.Location().XYZ() + aLin2.Location().XYZ()) / 2.);
183
184 // Offset to avoid confusion Edge and Dimension
185 gp_Vec anOffset(theDirAttach);
fe83e1ea 186 anOffset = anOffset * myDrawer->DimensionAspect()->ArrowAspect()->Length()*(-10.);
187 aCurPos.Translate (anOffset);
188
a6eb515f 189 // Find attachment points
190 if (!isFirstInfinite)
191 {
fe83e1ea 192 if (aCurPos.Distance (aPoint11) > aCurPos.Distance (aPoint12))
a6eb515f 193 myFirstPoint = aPoint12;
194 else
195 myFirstPoint = aPoint11;
7fd59977 196 }
a6eb515f 197 else
fe83e1ea 198 myFirstPoint = ElCLib::Value (ElCLib::Parameter (aLin1, aCurPos), aLin1);
7fd59977 199
a6eb515f 200 if (!isSecondInfinite)
201 {
fe83e1ea 202 if (aCurPos.Distance (aPoint21) > aCurPos.Distance (aPoint22))
a6eb515f 203 mySecondPoint = aPoint22;
204 else
205 mySecondPoint = aPoint21;
206 }
7fd59977 207 else
fe83e1ea 208 mySecondPoint = ElCLib::Value (ElCLib::Parameter (aLin2, aCurPos), aLin2);
7fd59977 209
a6eb515f 210 return Standard_True;
7fd59977 211}
212
7fd59977 213//=======================================================================
a6eb515f 214//function : initEdgeVertexLength
215//purpose : for first edge and second vertex shapes
7fd59977 216//=======================================================================
217
a6eb515f 218Standard_Boolean AIS_LengthDimension::initEdgeVertexLength (const TopoDS_Edge & theEdge,
d7bffd44 219 const TopoDS_Vertex & theVertex,
220 gp_Dir & theDirAttach,
221 Standard_Boolean isInfinite)
7fd59977 222{
a6eb515f 223 gp_Pnt anEdgePoint1,anEdgePoint2;
224 Handle(Geom_Curve) aCurve;
225 Handle(Geom_Curve) anExtCurve;
226 Standard_Boolean isEdgeOnPlane, isVertexOnPlane;
227 if (!AIS::ComputeGeometry(theEdge,aCurve,anEdgePoint1,anEdgePoint2,
228 anExtCurve,isInfinite,isEdgeOnPlane, new Geom_Plane (GetWorkingPlane())))
229 return Standard_False;
230 AIS::ComputeGeometry (theVertex, myFirstPoint, new Geom_Plane(GetWorkingPlane()), isVertexOnPlane);
231
232 const Handle(Geom_Line)& aGeomLine = (Handle(Geom_Line)&) aCurve;
233 const gp_Lin& aLin = aGeomLine->Lin();
234
235 myValue = aLin.Distance( myFirstPoint);
236 theDirAttach = aLin.Direction();
237
238 gp_Pnt aPoint = ElCLib::Value(ElCLib::Parameter(aLin,myFirstPoint),aLin);
239 gp_Pnt aCurPos((myFirstPoint.XYZ() + aPoint.XYZ())/2.);
240
241 if (!isInfinite)
242 {
fe83e1ea 243 if (aCurPos.Distance (anEdgePoint1) > aCurPos.Distance (anEdgePoint2))
a6eb515f 244 mySecondPoint = anEdgePoint2;
245 else
246 mySecondPoint = anEdgePoint1;
7fd59977 247 }
a6eb515f 248 else
fe83e1ea 249 mySecondPoint = ElCLib::Value (ElCLib::Parameter (aLin, aCurPos), aLin);
a6eb515f 250 return Standard_True;
7fd59977 251}
252
7fd59977 253//=======================================================================
a6eb515f 254//function : initEdgeVertexLength
7fd59977 255//purpose :
256//=======================================================================
257
a6eb515f 258Standard_Boolean AIS_LengthDimension::initEdgeFaceLength (const TopoDS_Edge& theEdge,
259 const TopoDS_Face& theFace,
260 gp_Dir& theDirAttach)
7fd59977 261{
a6eb515f 262 // The first attachment point is <aPoint1> from the reference <anEdge>.
263 // Find the second attachment point which belongs to the reference face
264 // Iterate over the edges of the face and find the point <aFacePoint1>.
265 // It is the closest point according to <aPoint1>.
266 TopoDS_Vertex aVertex1, aVertex2;
267 TopExp::Vertices (theEdge, aVertex1, aVertex2);
268 myFirstPoint = BRep_Tool::Pnt (aVertex1);
269 gp_Pnt aPoint = BRep_Tool::Pnt (aVertex2);
270 gp_Pnt2d aFacePoint1uv, aFacePoint2uv;
271 Standard_Real aDist1 = RealLast ();
272 Standard_Real aDist2 = RealLast ();
273
274 TopExp_Explorer anIt (theFace, TopAbs_EDGE);
275 for (; anIt.More (); anIt.Next ())
276 {
277 const TopoDS_Edge aFaceEdge = TopoDS::Edge(anIt.Current ());
278 if (aFaceEdge == theEdge)
279 return Standard_False;
280 TopExp::Vertices (aFaceEdge, aVertex1, aVertex2);
281 gp_Pnt aFacePoint1c = BRep_Tool::Pnt (aVertex1);
282 gp_Pnt aFacePoint2c = BRep_Tool::Pnt (aVertex2);
283 Standard_Real aDistc1 = myFirstPoint.SquareDistance (aFacePoint1c);
284 Standard_Real aDistc2 = myFirstPoint.SquareDistance (aFacePoint2c);
285 if (aDistc1 <= aDistc2)
7fd59977 286 {
a6eb515f 287 if (aDistc1 <= aDist1)
288 {
289 aDistc2 = aPoint.SquareDistance (aFacePoint2c);
290 if (aDistc2 <= aDist2)
291 {
292 mySecondPoint = aFacePoint1c;
293 aDist1 = aDistc1;
294 aDist2 = aDistc2;
295 BRep_Tool::UVPoints (aFaceEdge, theFace, aFacePoint1uv, aFacePoint2uv);
296 }
7fd59977 297 }
7fd59977 298 }
a6eb515f 299 else
300 {
301 if (aDistc2 <= aDist1)
302 {
303 aDistc1 = aPoint.SquareDistance (aFacePoint1c);
304 if (aDistc1 <= aDist2)
305 {
306 mySecondPoint = aFacePoint2c;
307 aDist1 = aDistc2;
308 aDist2 = aDistc1;
309 BRep_Tool::UVPoints (aFaceEdge, theFace, aFacePoint2uv, aFacePoint1uv);
310 }
7fd59977 311 }
7fd59977 312 }
313 }
7fd59977 314
a6eb515f 315 gp_Vec anOffsetDirection (0.0, 0.0, 0.0);
7fd59977 316
a6eb515f 317 //The offset direction is the normal to the face at the point FP1
318 BRepGProp_Face aGFace;
319 aGFace.Load (theFace);
320 aGFace.Normal (aFacePoint1uv.X(), aFacePoint1uv.Y(), aPoint, anOffsetDirection);
7fd59977 321
a6eb515f 322 if (anOffsetDirection.Magnitude () > Precision::Confusion ())
323 {
324 theDirAttach = gp_Dir (anOffsetDirection);
7fd59977 325 }
a6eb515f 326 else theDirAttach = gp::DZ ();
7fd59977 327
a6eb515f 328 gp_Vec aVector (theDirAttach);
fe83e1ea 329 aVector.Multiply (1.5 * myValue);
330
a6eb515f 331 return Standard_True;
7fd59977 332}
333
334//=======================================================================
a6eb515f 335//function : initTwoShapesPoints
336//purpose : Initialization of two points where dimension layouts
337// will be attached
7fd59977 338//=======================================================================
339
a6eb515f 340Standard_Boolean AIS_LengthDimension::initTwoShapesPoints (const TopoDS_Shape& theFirstShape,
341 const TopoDS_Shape& theSecondShape)
7fd59977 342{
a6eb515f 343 gp_Dir aDirAttach;
344 Standard_Boolean isInfinite = Standard_False;
345 Standard_Boolean isSuccess = Standard_False;
346 switch (theFirstShape.ShapeType())
347 {
348 case TopAbs_FACE:
7fd59977 349 {
a6eb515f 350 // Initialization for face
351 gp_Pln aFirstPlane;
352 Handle(Geom_Surface) aFirstSurface;
353 AIS_KindOfSurface aFirstSurfKind;
354 Standard_Real aFirstOffset;
355 TopoDS_Face aFirstFace = TopoDS::Face (theFirstShape);
356 AIS::InitFaceLength (TopoDS::Face (theFirstShape), aFirstPlane,
357 aFirstSurface,aFirstSurfKind, aFirstOffset);
358
359 if (theSecondShape.ShapeType () == TopAbs_FACE)
360 {
361 // Initialization for face
362 gp_Pln aSecondPlane;
363 Handle(Geom_Surface) aSecondSurface;
364 AIS_KindOfSurface aSecondSurfKind;
365 Standard_Real aSecondOffset;
366 TopoDS_Face aSecondFace = TopoDS::Face (theSecondShape);
367 AIS::InitFaceLength (aSecondFace, aSecondPlane,
368 aSecondSurface, aSecondSurfKind, aSecondOffset);
369 if (aFirstSurfKind == AIS_KOS_Plane)
7fd59977 370 {
a6eb515f 371 TopExp_Explorer anExplorer (theFirstShape, TopAbs_VERTEX);
372 // In case of infinite planes
373 if (!anExplorer.More())
374 myFirstPoint = aFirstPlane.Location();
375 else myFirstPoint = BRep_Tool::Pnt (TopoDS::Vertex (anExplorer.Current()));
376 mySecondPoint = AIS::ProjectPointOnPlane (myFirstPoint, aSecondPlane);
377
378 gp_Dir aLengthDir = aFirstPlane.Axis().Direction();
379 gp_Dir aDirAttach = aFirstPlane.Position().XDirection();
380 Quantity_Parameter anU, aV;
381 ElSLib::Parameters (aSecondPlane, mySecondPoint, anU, aV);
382 BRepTopAdaptor_FClass2d aClassifier (aSecondFace, Precision::Confusion());
383 TopAbs_State aState = aClassifier.Perform (gp_Pnt2d (anU, aV), Standard_False);
384 if (aState == TopAbs_OUT || aState == TopAbs_UNKNOWN)
385 {
386 mySecondPoint = AIS::Nearest(aSecondFace, myFirstPoint);
387 if (myFirstPoint.Distance(mySecondPoint) > Precision::Confusion())
388 {
389 gp_Vec aVec = gp_Vec(myFirstPoint, mySecondPoint) ^ aLengthDir;
390 if (aVec.SquareMagnitude() > Precision::SquareConfusion())
391 aDirAttach = aVec ^ aLengthDir;
392 }
393 }
394 isSuccess = Standard_True;
7fd59977 395 }
a6eb515f 396 else // curvilinear faces
7fd59977 397 {
fe83e1ea 398 AIS::ComputeLengthBetweenCurvilinearFaces (aFirstFace, aSecondFace, aFirstSurface,
399 aSecondSurface, Standard_True, myValue,
400 mySelectionGeom.TextPos, myFirstPoint,
401 mySecondPoint, aDirAttach);
a6eb515f 402 isSuccess = Standard_True;
7fd59977 403 }
a6eb515f 404 }
405 else if (theFirstShape.ShapeType() == TopAbs_EDGE)
406 {
407 isSuccess = initEdgeFaceLength (TopoDS::Edge (theFirstShape),
408 TopoDS::Face (theSecondShape),
409 aDirAttach);
410 }
411 if (!myIsWorkingPlaneCustom)
412 resetWorkingPlane(gp_Pln(myFirstPoint, aDirAttach));
7fd59977 413 }
a6eb515f 414 break;
415 case TopAbs_EDGE:
7fd59977 416 {
a6eb515f 417 if (theSecondShape.ShapeType() == TopAbs_VERTEX)
418 {
419 return initEdgeVertexLength (TopoDS::Edge(theFirstShape),
420 TopoDS::Vertex(theSecondShape),
421 aDirAttach, isInfinite);
422 }
423 else if (theSecondShape.ShapeType() == TopAbs_EDGE)
424 {
425 return initTwoEdgesLength (TopoDS::Edge(theFirstShape),
426 TopoDS::Edge(theSecondShape),
427 aDirAttach);
428 }
7fd59977 429 }
a6eb515f 430 break;
431 case TopAbs_VERTEX:
7fd59977 432 {
a6eb515f 433 if (theSecondShape.ShapeType() == TopAbs_VERTEX)
434 {
435 myFirstPoint = BRep_Tool::Pnt (TopoDS::Vertex (theFirstShape));
436 mySecondPoint = BRep_Tool::Pnt (TopoDS::Vertex (theSecondShape));
437 isSuccess = Standard_True;
438 }
439 else if (theSecondShape.ShapeType() == TopAbs_EDGE)
440 {
441 return initEdgeVertexLength (TopoDS::Edge(theSecondShape),
442 TopoDS::Vertex(theFirstShape),
443 aDirAttach, isInfinite);
444 }
7fd59977 445 }
a6eb515f 446 break;
447 case TopAbs_COMPOUND:
448 case TopAbs_COMPSOLID:
449 case TopAbs_SOLID:
450 case TopAbs_SHELL:
451 case TopAbs_WIRE:
452 case TopAbs_SHAPE:
453 // nothing to do for these kinds
454 break;
455 }
456 return isSuccess;
7fd59977 457}
458
459//=======================================================================
a6eb515f 460//function : initOneShapePoints
461//purpose : Initialization of two points where dimension layouts
462// will be attached
463// Attention: 1) <theShape> can be only the edge in currect implementation
464// 2) No length for infinite edge
7fd59977 465//=======================================================================
466
a6eb515f 467Standard_Boolean AIS_LengthDimension::initOneShapePoints (const TopoDS_Shape& theShape)
7fd59977 468{
a6eb515f 469 if (theShape.ShapeType() == TopAbs_EDGE)
470 {
471 TopoDS_Edge anEdge = TopoDS::Edge (theShape);
472 BRepAdaptor_Curve aBrepCurve(anEdge);
473 Standard_Real aFirst = aBrepCurve.FirstParameter(),
474 aLast = aBrepCurve.LastParameter();
475 Standard_Boolean isInfinite = (Precision::IsInfinite (aFirst)
476 || Precision::IsInfinite (aLast));
477 if (isInfinite)
478 return Standard_False;
479
480 myFirstPoint = aBrepCurve.Value (aBrepCurve.FirstParameter());
481 mySecondPoint = aBrepCurve.Value (aBrepCurve.LastParameter());
482 }
483 else // Some other kinds of shapes
484 return Standard_False;
485 return Standard_True;
486}
7fd59977 487
a6eb515f 488//=======================================================================
489//function : Compute
490//purpose :
491//=======================================================================
7fd59977 492
a6eb515f 493void AIS_LengthDimension::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePM*/,
494 const Handle(Prs3d_Presentation)& thePresentation,
495 const Standard_Integer theMode)
496{
fe83e1ea 497 thePresentation->Clear();
498 mySelectionGeom.Clear (theMode);
499
a6eb515f 500 // Initialization of points, if they are not set
501 if (!myIsInitialized)
502 {
503 if (myShapesNumber == 1)
d7bffd44 504 {
505 myIsInitialized = initOneShapePoints (myFirstShape);
506 }
a6eb515f 507 else if (myShapesNumber == 2)
d7bffd44 508 {
509 myIsInitialized = initTwoShapesPoints (myFirstShape, mySecondShape);
510 }
a6eb515f 511 else
d7bffd44 512 {
a6eb515f 513 return;
d7bffd44 514 }
7fd59977 515 }
d7bffd44 516
a6eb515f 517 // If initialization failed
518 if (!myIsInitialized)
d7bffd44 519 {
a6eb515f 520 return;
d7bffd44 521 }
7fd59977 522
fe83e1ea 523 drawLinearDimension (thePresentation, theMode);
7fd59977 524}
525
7fd59977 526//=======================================================================
a6eb515f 527//function : ComputeValue
7fd59977 528//purpose :
529//=======================================================================
7fd59977 530
d7bffd44 531void AIS_LengthDimension::computeValue()
7fd59977 532{
a6eb515f 533 myValue = myFirstPoint.Distance (mySecondPoint);
534 AIS_Dimension::computeValue ();
7fd59977 535}