1 // Copyright (C) 2018-20xx CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include "FeaturesPlugin_Measurement.h"
23 #include <ModelAPI_AttributeDoubleArray.h>
24 #include <ModelAPI_AttributeSelection.h>
25 #include <ModelAPI_AttributeString.h>
26 #include <ModelAPI_Data.h>
27 #include <ModelAPI_Session.h>
29 #include <GeomAPI_Angle.h>
30 #include <GeomAPI_Circ.h>
31 #include <GeomAPI_Edge.h>
32 #include <GeomAPI_Face.h>
33 #include <GeomAPI_Pnt.h>
34 #include <GeomAPI_Shape.h>
35 #include <GeomAPI_ShapeIterator.h>
36 #include <GeomAPI_Vertex.h>
38 #include <GeomAlgoAPI_ShapeTools.h>
40 #include <Config_PropManager.h>
43 #include <TopoDS_Edge.hxx>
44 #include <TopoDS_Shape.hxx>
45 #include <AIS_LengthDimension.hxx>
46 #include <AIS_RadiusDimension.hxx>
47 #include <AIS_AngleDimension.hxx>
48 #include <BRepExtrema_DistShapeShape.hxx>
53 FeaturesPlugin_Measurement::FeaturesPlugin_Measurement() : mySceenScale(1)
57 void FeaturesPlugin_Measurement::initAttributes()
59 data()->addAttribute(FeaturesPlugin_Measurement::MEASURE_KIND(),
60 ModelAPI_AttributeString::typeId());
62 // attribute for length
63 data()->addAttribute(EDGE_FOR_LENGTH_ID(), ModelAPI_AttributeSelection::typeId());
64 // attributes for distance
65 data()->addAttribute(DISTANCE_FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
66 data()->addAttribute(DISTANCE_TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
67 // attribute for radius
68 data()->addAttribute(CIRCULAR_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
69 // attributes for angle
70 data()->addAttribute(ANGLE_FROM_EDGE_ID(), ModelAPI_AttributeSelection::typeId());
71 data()->addAttribute(ANGLE_TO_EDGE_ID(), ModelAPI_AttributeSelection::typeId());
72 // attributes for angle by 3 points
73 data()->addAttribute(ANGLE_POINT1_ID(), ModelAPI_AttributeSelection::typeId());
74 data()->addAttribute(ANGLE_POINT2_ID(), ModelAPI_AttributeSelection::typeId());
75 data()->addAttribute(ANGLE_POINT3_ID(), ModelAPI_AttributeSelection::typeId());
76 // attributes for result message and values
77 data()->addAttribute(RESULT_ID(), ModelAPI_AttributeString::typeId());
78 data()->addAttribute(RESULT_VALUES_ID(), ModelAPI_AttributeDoubleArray::typeId());
81 void FeaturesPlugin_Measurement::execute()
85 void FeaturesPlugin_Measurement::attributeChanged(const std::string& theID)
87 if (theID == MEASURE_KIND()) {
89 string(RESULT_ID())->setValue("");
90 std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(
91 attribute(RESULT_VALUES_ID()))->setSize(0);
93 if (theID != RESULT_ID()) {
94 std::string aKind = string(MEASURE_KIND())->value();
95 if (aKind == MEASURE_LENGTH())
97 else if (aKind == MEASURE_DISTANCE())
99 else if (aKind == MEASURE_RADIUS())
101 else if (aKind == MEASURE_ANGLE())
103 else if (aKind == MEASURE_ANGLE_POINTS())
104 computeAngleByPoints();
108 void FeaturesPlugin_Measurement::computeLength()
110 AttributeSelectionPtr aSelectedFeature = selection(EDGE_FOR_LENGTH_ID());
114 if (aSelectedFeature && aSelectedFeature->isInitialized()) {
115 aShape = aSelectedFeature->value();
116 if (!aShape && aSelectedFeature->context())
117 aShape = aSelectedFeature->context()->shape();
119 if (aShape && aShape->isEdge())
120 anEdge = GeomEdgePtr(new GeomAPI_Edge(aShape));
122 string(RESULT_ID())->setValue("");
126 std::ostringstream anOutput;
127 anOutput << "Length = " << std::setprecision(10) << anEdge->length();
128 string(RESULT_ID())->setValue(anOutput.str());
130 AttributeDoubleArrayPtr aValues =
131 std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
133 aValues->setValue(0, anEdge->length());
136 void FeaturesPlugin_Measurement::computeDistance()
138 AttributeSelectionPtr aFirstFeature = selection(DISTANCE_FROM_OBJECT_ID());
139 GeomShapePtr aShape1;
140 if (aFirstFeature && aFirstFeature->isInitialized()) {
141 aShape1 = aFirstFeature->value();
142 if (!aShape1 && aFirstFeature->context())
143 aShape1 = aFirstFeature->context()->shape();
146 AttributeSelectionPtr aSecondFeature = selection(DISTANCE_TO_OBJECT_ID());
147 GeomShapePtr aShape2;
148 if (aSecondFeature && aSecondFeature->isInitialized()) {
149 aShape2 = aSecondFeature->value();
150 if (!aShape2 && aSecondFeature->context())
151 aShape2 = aSecondFeature->context()->shape();
154 if (!aShape1 || !aShape2) {
155 string(RESULT_ID())->setValue("");
159 double aDistance = GeomAlgoAPI_ShapeTools::minimalDistance(aShape1, aShape2);
161 std::ostringstream anOutput;
162 anOutput << "Distance = " << std::setprecision(10) << aDistance;
163 string(RESULT_ID())->setValue(anOutput.str());
165 AttributeDoubleArrayPtr aValues =
166 std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
168 aValues->setValue(0, aDistance);
171 void FeaturesPlugin_Measurement::computeRadius()
173 AttributeSelectionPtr aSelectedFeature = selection(CIRCULAR_OBJECT_ID());
176 if (aSelectedFeature && aSelectedFeature->isInitialized()) {
177 aShape = aSelectedFeature->value();
178 if (!aShape && aSelectedFeature->context())
179 aShape = aSelectedFeature->context()->shape();
182 double aRadius = -1.0;
184 if (aShape->isEdge()) {
185 GeomEdgePtr anEdge(new GeomAPI_Edge(aShape));
186 if (anEdge->isCircle() || anEdge->isArc()) {
187 aRadius = anEdge->circle()->radius();
189 } else if (aShape->isFace()) {
190 GeomFacePtr aFace(new GeomAPI_Face(aShape));
191 aRadius = GeomAlgoAPI_ShapeTools::radius(aFace);
196 string(RESULT_ID())->setValue("");
200 std::ostringstream anOutput;
201 anOutput << "Radius = " << std::setprecision(10) << aRadius;
202 string(RESULT_ID())->setValue(anOutput.str());
204 AttributeDoubleArrayPtr aValues =
205 std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
207 aValues->setValue(0, aRadius);
210 void FeaturesPlugin_Measurement::computeAngle()
212 AttributeSelectionPtr aFirstFeature = selection(ANGLE_FROM_EDGE_ID());
213 GeomShapePtr aShape1;
215 if (aFirstFeature && aFirstFeature->isInitialized()) {
216 aShape1 = aFirstFeature->value();
217 if (!aShape1 && aFirstFeature->context())
218 aShape1 = aFirstFeature->context()->shape();
220 if (aShape1 && aShape1->isEdge())
221 anEdge1 = GeomEdgePtr(new GeomAPI_Edge(aShape1));
223 AttributeSelectionPtr aSecondFeature = selection(ANGLE_TO_EDGE_ID());
224 GeomShapePtr aShape2;
226 if (aSecondFeature && aSecondFeature->isInitialized()) {
227 aShape2 = aSecondFeature->value();
228 if (!aShape2 && aSecondFeature->context())
229 aShape2 = aSecondFeature->context()->shape();
231 if (aShape2 && aShape2->isEdge())
232 anEdge2 = GeomEdgePtr(new GeomAPI_Edge(aShape2));
234 if (!anEdge1 || !anEdge2) {
235 string(RESULT_ID())->setValue("");
239 GeomShapePtr anInter = anEdge1->intersect(anEdge2);
241 std::ostringstream anOutput;
242 anOutput << std::setprecision(10);
243 std::list<double> aValuesList;
245 if (anInter->isVertex()) {
246 std::shared_ptr<GeomAPI_Vertex> aVertex(new GeomAPI_Vertex(anInter));
247 std::shared_ptr<GeomAPI_Angle> anAngle(
248 new GeomAPI_Angle(anEdge1, anEdge2, aVertex->point()));
249 double anAngleValue = anAngle->angleDegree();
250 anOutput << "Angle = " << std::setprecision(10) << anAngleValue << std::endl;
251 aValuesList.push_back(anAngleValue);
254 GeomAPI_ShapeIterator anIt(anInter);
255 for (int anIndex = 1; anIt.more(); anIt.next(), ++anIndex) {
256 GeomShapePtr aCurrent = anIt.current();
257 if (!aCurrent->isVertex())
259 std::shared_ptr<GeomAPI_Vertex> aVertex(new GeomAPI_Vertex(aCurrent));
260 std::shared_ptr<GeomAPI_Angle> anAngle(
261 new GeomAPI_Angle(anEdge1, anEdge2, aVertex->point()));
262 double anAngleValue = anAngle->angleDegree();
263 anOutput << "Angle" << anIndex << " = "
264 << std::setprecision(10) << anAngleValue << std::endl;
265 aValuesList.push_back(anAngleValue);
270 string(RESULT_ID())->setValue(anOutput.str());
272 AttributeDoubleArrayPtr aValues =
273 std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
274 aValues->setSize((int)aValuesList.size());
276 for (std::list<double>::iterator anIt = aValuesList.begin(); anIt != aValuesList.end(); ++anIt)
277 aValues->setValue(anIndex++, *anIt);
280 static GeomVertexPtr selectionToVertex(const AttributeSelectionPtr& aSelection)
283 GeomVertexPtr aVertex;
284 if (aSelection && aSelection->isInitialized()) {
285 aShape = aSelection->value();
286 if (!aShape && aSelection->context())
287 aShape = aSelection->context()->shape();
289 if (aShape && aShape->isVertex())
290 aVertex = GeomVertexPtr(new GeomAPI_Vertex(aShape));
294 void FeaturesPlugin_Measurement::computeAngleByPoints()
296 GeomVertexPtr aVertex1 = selectionToVertex(selection(ANGLE_POINT1_ID()));
297 GeomVertexPtr aVertex2 = selectionToVertex(selection(ANGLE_POINT2_ID()));
298 GeomVertexPtr aVertex3 = selectionToVertex(selection(ANGLE_POINT3_ID()));
300 if (!aVertex1 || !aVertex2 || ! aVertex3) {
301 string(RESULT_ID())->setValue("");
305 std::shared_ptr<GeomAPI_Angle> anAngle(
306 new GeomAPI_Angle(aVertex1->point(), aVertex2->point(), aVertex3->point()));
307 double anAngleValue = anAngle->angleDegree();
309 std::ostringstream anOutput;
310 anOutput << "Angle = " << std::setprecision(10) << anAngleValue;
311 string(RESULT_ID())->setValue(anOutput.str());
313 AttributeDoubleArrayPtr aValues =
314 std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
316 aValues->setValue(0, anAngleValue);
319 AISObjectPtr FeaturesPlugin_Measurement::getAISObject(AISObjectPtr thePrevious)
322 std::string aKind = string(MEASURE_KIND())->value();
323 if (aKind == MEASURE_LENGTH())
324 anAIS = lengthDimension(thePrevious);
325 else if (aKind == MEASURE_DISTANCE())
326 anAIS = distanceDimension(thePrevious);
327 else if (aKind == MEASURE_RADIUS())
328 anAIS = radiusDimension(thePrevious);
329 else if (aKind == MEASURE_ANGLE())
330 anAIS = angleDimension(thePrevious);
331 else if (aKind == MEASURE_ANGLE_POINTS())
332 anAIS = angleByPointsDimension(thePrevious);
333 setupDimension(anAIS);
337 AISObjectPtr FeaturesPlugin_Measurement::lengthDimension(AISObjectPtr thePrevious)
339 AISObjectPtr aAISObj;
340 if (!myScreenPlane.get())
343 AttributeSelectionPtr aSelectedFeature = selection(EDGE_FOR_LENGTH_ID());
347 if (aSelectedFeature && aSelectedFeature->isInitialized()) {
348 aShape = aSelectedFeature->value();
349 if (!aShape && aSelectedFeature->context())
350 aShape = aSelectedFeature->context()->shape();
352 if (aShape && aShape->isEdge())
353 anEdge = GeomEdgePtr(new GeomAPI_Edge(aShape));
355 TopoDS_Edge aTEdge = TopoDS::Edge(anEdge->impl<TopoDS_Shape>());
356 GeomPointPtr aPoint1 = anEdge->firstPoint();
357 GeomPointPtr aPoint2 = anEdge->lastPoint();
359 gp_Pnt aPnt1(aPoint1->impl<gp_Pnt>());
360 gp_Pnt aPnt2(aPoint2->impl<gp_Pnt>());
362 double aLength = aPnt1.Distance(aPnt2);
363 gp_Pln aPlane = myScreenPlane->impl<gp_Pln>(); // gce_MP.Value();
364 aPlane.SetLocation(aPnt1);
366 Handle(AIS_LengthDimension) aDim;
367 if (thePrevious.get()) {
368 aAISObj = thePrevious;
369 Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
370 aDim = Handle(AIS_LengthDimension)::DownCast(aAIS);
372 aDim = new AIS_LengthDimension(aTEdge, aPlane);
373 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
375 aDim->SetMeasuredGeometry(aTEdge, aPlane);
378 aDim = new AIS_LengthDimension(aTEdge, aPlane);
379 aAISObj = AISObjectPtr(new GeomAPI_AISObject());
380 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
382 aDim->SetFlyout(aLength / 3.);
387 AISObjectPtr FeaturesPlugin_Measurement::distanceDimension(AISObjectPtr thePrevious)
389 AISObjectPtr aAISObj;
390 if (!myScreenPlane.get())
393 AttributeSelectionPtr aFirstFeature = selection(DISTANCE_FROM_OBJECT_ID());
394 AttributeSelectionPtr aSecondFeature = selection(DISTANCE_TO_OBJECT_ID());
395 if (aFirstFeature.get() && aSecondFeature.get()) {
396 GeomShapePtr aShape1;
397 GeomShapePtr aShape2;
398 if (aFirstFeature->isInitialized() && aSecondFeature->isInitialized()) {
399 aShape1 = aFirstFeature->value();
400 if (!aShape1 && aFirstFeature->context())
401 aShape1 = aFirstFeature->context()->shape();
402 aShape2 = aSecondFeature->value();
403 if (!aShape2 && aSecondFeature->context())
404 aShape2 = aSecondFeature->context()->shape();
407 if (aShape1 && aShape2) {
408 const TopoDS_Shape& aShp1 = aShape1->impl<TopoDS_Shape>();
409 const TopoDS_Shape& aShp2 = aShape2->impl<TopoDS_Shape>();
410 BRepExtrema_DistShapeShape aDist(aShp1, aShp2);
412 if (aDist.IsDone()) {
413 gp_Pnt aPnt1 = aDist.PointOnShape1(1);
414 gp_Pnt aPnt2 = aDist.PointOnShape2(1);
415 double aDistance = aDist.Value();
416 gp_Pln aPlane = myScreenPlane->impl<gp_Pln>();
417 aPlane.SetLocation(aPnt1);
419 Handle(AIS_LengthDimension) aDim;
420 if (thePrevious.get()) {
421 aAISObj = thePrevious;
422 Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
423 aDim = Handle(AIS_LengthDimension)::DownCast(aAIS);
425 aDim = new AIS_LengthDimension(aPnt1, aPnt2, aPlane);
426 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
428 aDim->SetMeasuredGeometry(aPnt1, aPnt2, aPlane);
429 aDim->SetFlyout(aDistance / 3.);
432 aAISObj = AISObjectPtr(new GeomAPI_AISObject());
433 aDim = new AIS_LengthDimension(aPnt1, aPnt2, aPlane);
434 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
436 aDim->SetFlyout(aDistance / 3.);
443 AISObjectPtr FeaturesPlugin_Measurement::radiusDimension(AISObjectPtr thePrevious)
445 AISObjectPtr aAISObj;
446 AttributeSelectionPtr aSelectedFeature = selection(CIRCULAR_OBJECT_ID());
449 if (aSelectedFeature && aSelectedFeature->isInitialized()) {
450 aShape = aSelectedFeature->value();
451 if (!aShape && aSelectedFeature->context())
452 aShape = aSelectedFeature->context()->shape();
455 TopoDS_Shape aShp = aShape->impl<TopoDS_Shape>();
456 Handle(AIS_RadiusDimension) aDim;
457 if (thePrevious.get()) {
458 aAISObj = thePrevious;
459 Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
460 Handle(AIS_RadiusDimension) aDim = Handle(AIS_RadiusDimension)::DownCast(aAIS);
462 aDim = new AIS_RadiusDimension(aShp);
463 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
465 aDim->SetMeasuredGeometry(aShp);
467 aAISObj = AISObjectPtr(new GeomAPI_AISObject());
468 Handle(AIS_RadiusDimension) aDim = new AIS_RadiusDimension(aShp);
469 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
475 AISObjectPtr FeaturesPlugin_Measurement::angleDimension(AISObjectPtr thePrevious)
477 AISObjectPtr aAISObj;
478 AttributeSelectionPtr aFirstFeature = selection(ANGLE_FROM_EDGE_ID());
479 GeomShapePtr aShape1;
481 if (aFirstFeature && aFirstFeature->isInitialized()) {
482 aShape1 = aFirstFeature->value();
483 if (!aShape1 && aFirstFeature->context())
484 aShape1 = aFirstFeature->context()->shape();
486 if (aShape1 && aShape1->isEdge())
487 anEdge1 = GeomEdgePtr(new GeomAPI_Edge(aShape1));
489 AttributeSelectionPtr aSecondFeature = selection(ANGLE_TO_EDGE_ID());
490 GeomShapePtr aShape2;
492 if (aSecondFeature && aSecondFeature->isInitialized()) {
493 aShape2 = aSecondFeature->value();
494 if (!aShape2 && aSecondFeature->context())
495 aShape2 = aSecondFeature->context()->shape();
497 if (aShape2 && aShape2->isEdge())
498 anEdge2 = GeomEdgePtr(new GeomAPI_Edge(aShape2));
500 if (anEdge1.get() && anEdge2.get()) {
501 TopoDS_Edge aTEdge1 = TopoDS::Edge(anEdge1->impl<TopoDS_Shape>());
502 TopoDS_Edge aTEdge2 = TopoDS::Edge(anEdge2->impl<TopoDS_Shape>());
503 Handle(AIS_AngleDimension) aDim;
504 if (thePrevious.get()) {
505 aAISObj = thePrevious;
506 Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
507 aDim = Handle(AIS_AngleDimension)::DownCast(aAIS);
509 aDim = new AIS_AngleDimension(aTEdge1, aTEdge2);
510 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
512 aDim->SetMeasuredGeometry(aTEdge1, aTEdge2);
514 aAISObj = AISObjectPtr(new GeomAPI_AISObject());
515 aDim = new AIS_AngleDimension(aTEdge1, aTEdge2);
516 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
522 AISObjectPtr FeaturesPlugin_Measurement::angleByPointsDimension(AISObjectPtr thePrevious)
524 AISObjectPtr aAISObj;
525 GeomVertexPtr aVertex1 = selectionToVertex(selection(ANGLE_POINT1_ID()));
526 GeomVertexPtr aVertex2 = selectionToVertex(selection(ANGLE_POINT2_ID()));
527 GeomVertexPtr aVertex3 = selectionToVertex(selection(ANGLE_POINT3_ID()));
529 if (aVertex1.get() && aVertex2.get() && aVertex3.get()) {
530 GeomPointPtr aPoint1 = aVertex1->point();
531 GeomPointPtr aPoint2 = aVertex2->point();
532 GeomPointPtr aPoint3 = aVertex3->point();
533 gp_Pnt aPnt1(aPoint1->impl<gp_Pnt>());
534 gp_Pnt aPnt2(aPoint2->impl<gp_Pnt>());
535 gp_Pnt aPnt3(aPoint3->impl<gp_Pnt>());
537 if (thePrevious.get()) {
538 aAISObj = thePrevious;
539 Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
540 Handle(AIS_AngleDimension) aDim = Handle(AIS_AngleDimension)::DownCast(aAIS);
542 aDim = new AIS_AngleDimension(aPnt1, aPnt2, aPnt3);
543 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
545 aDim->SetMeasuredGeometry(aPnt1, aPnt2, aPnt3);
547 Handle(AIS_AngleDimension) aDim = new AIS_AngleDimension(aPnt1, aPnt2, aPnt3);
548 aAISObj = AISObjectPtr(new GeomAPI_AISObject());
549 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
556 void FeaturesPlugin_Measurement::setupDimension(AISObjectPtr theDim)
559 Handle(AIS_InteractiveObject) aAIS = theDim->impl<Handle(AIS_InteractiveObject)>();
560 Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAIS);
561 int aSize = Config_PropManager::integer("Visualization", "dimension_arrow_size");
562 int aTextSize = Config_PropManager::integer("Visualization", "dimension_value_size");
564 Handle(Prs3d_DimensionAspect) anAspect = aDim->DimensionAspect();
565 anAspect->MakeArrows3d(false);
566 anAspect->MakeText3d(false);
567 anAspect->MakeTextShaded(false);
568 anAspect->MakeUnitsDisplayed(false);
569 anAspect->MakeUnitsDisplayed(false);
570 anAspect->TextAspect()->SetFont(Config_PropManager::string("Visualization",
571 "dimension_font").c_str());
572 anAspect->TextAspect()->SetHeight(aTextSize / mySceenScale);
573 anAspect->ArrowAspect()->SetLength(aSize / mySceenScale);
574 anAspect->SetExtensionSize((aTextSize / mySceenScale + aSize) / 2.0);
575 aDim->SetDimensionAspect(anAspect);
578 std::vector<int> aColor = Config_PropManager::color("Visualization", "sketch_dimension_color");
579 theDim->setColor(aColor[0], aColor[1], aColor[2]);