MantisBT - Open CASCADE
View Issue Details
0025235Open CASCADE[OCCT] OCCT:Visualizationpublic2014-09-11 16:432014-11-11 13:02
aba 
bugmaster 
normalminor 
closedfixed 
[OCCT] 6.7.1 
[OCCT] 6.8.0[OCCT] 6.8.0 
demo samples(003) dimensions
0025235: Draw Harness - improve commands vdimension and vdimparam
Available options of vdimension and vdimparam commands need to be extended:
1) to set 3D text size and 3D text display mode
2) to change arrow parameters
No tags attached.
related to 0024387closed ski Tests - use system-independent fonts in test cases 
png dims_flat.png (114,321) 2014-09-11 19:20
https://tracker.dev.opencascade.org/
png dims_axo.png (118,432) 2014-09-11 19:21
https://tracker.dev.opencascade.org/
png hatch.png (5,697) 2014-09-30 18:02
https://tracker.dev.opencascade.org/
Issue History
2014-09-11 16:43abaNew Issue
2014-09-11 16:43abaAssigned To => aba
2014-09-11 16:44abaStatusnew => assigned
2014-09-11 16:55abaSummaryDRAW Test Harness: vdimension and vdimparams need to be updated => DRAW Test Harness: vdimension and vdimparam need to be updated
2014-09-11 16:55abaDescription Updatedbug_revision_view_page.php?rev_id=8025#r8025
2014-09-11 17:07abvTarget Version => 6.8.0
2014-09-11 17:57gitNote Added: 0031622
2014-09-11 17:58abaNote Added: 0031623
2014-09-11 17:58abaAssigned Toaba => kgv
2014-09-11 17:58abaStatusassigned => resolved
2014-09-11 18:59gitNote Added: 0031628
2014-09-11 19:20gitNote Added: 0031629
2014-09-11 19:20kgvFile Added: dims_flat.png
2014-09-11 19:21kgvFile Added: dims_axo.png
2014-09-12 10:19kgvNote Added: 0031642
2014-09-12 10:19kgvAssigned Tokgv => aba
2014-09-12 10:19kgvStatusresolved => assigned
2014-09-12 10:19kgvSummaryDRAW Test Harness: vdimension and vdimparam need to be updated => Draw Harness - redesign and extend vdimension and vdimparam commands
2014-09-12 10:27gitNote Added: 0031644
2014-09-23 18:54gitNote Added: 0032038
2014-09-23 18:55abaNote Added: 0032039
2014-09-23 18:55abaAssigned Toaba => san
2014-09-23 18:55abaStatusassigned => resolved
2014-09-24 12:12kgvNote Added: 0032074
2014-09-24 12:14kgvNote Edited: 0032074bug_revision_view_page.php?bugnote_id=32074#r8104
2014-09-24 12:14kgvAssigned Tosan => aba
2014-09-24 12:14kgvStatusresolved => assigned
2014-09-24 14:59kgvRelationship addedrelated to 0024387
2014-09-24 15:00kgvNote Added: 0032093
2014-09-25 16:46gitNote Added: 0032160
2014-09-25 17:11abaNote Added: 0032162
2014-09-25 17:11abaAssigned Toaba => kgv
2014-09-25 17:11abaStatusassigned => resolved
2014-09-30 09:05gitNote Added: 0032372
2014-09-30 09:12gitNote Added: 0032373
2014-09-30 09:12gitNote Added: 0032374
2014-09-30 09:13kgvNote Added: 0032375
2014-09-30 09:13kgvAssigned Tokgv => bugmaster
2014-09-30 09:13kgvStatusresolved => reviewed
2014-09-30 09:16kgvSummaryDraw Harness - redesign and extend vdimension and vdimparam commands => Draw Harness - improve commands vdimension and vdimparam
2014-09-30 11:49mkvAssigned Tobugmaster => mkv
2014-09-30 18:02kgvFile Added: hatch.png
2014-09-30 19:06mkvNote Added: 0032477
2014-09-30 19:06mkvAssigned Tomkv => bugmaster
2014-09-30 19:06mkvStatusreviewed => tested
2014-09-30 19:06mkvTest case number => demo samples(003) dimensions
2014-09-30 19:07gitNote Added: 0032478
2014-10-03 14:07bugmasterChangeset attached => occt master 0499eb06
2014-10-03 14:07bugmasterStatustested => verified
2014-10-03 14:07bugmasterResolutionopen => fixed
2014-10-21 16:44gitNote Added: 0033457
2014-10-21 16:44gitNote Added: 0033470
2014-11-11 12:43aivFixed in Version => 6.8.0
2014-11-11 13:02aivStatusverified => closed

Notes
(0031622)
git   
2014-09-11 17:57   
Branch CR25235 has been created by aba.

SHA-1: 4773baed4da6fb5429927e3baeb512cb7600b943


Detailed log of new commits:

Author: aba
Date: Thu Sep 11 17:54:21 2014 +0400

    0025235: DRAW Test Harness: vdimension and vdimparam need to be updated:
    
    1) corrected angle dimension initialization to allow ellipse input geometry with equal radii.
    2) changed default value of arrow angle for dimensions.
    3) added arlength, arangle, textmode, textsize to vdimension and vdimparam Draw commands.
(0031623)
aba   
2014-09-11 17:58   
Dear kgv,

please review the branch CR25235.
(0031628)
git   
2014-09-11 18:59   
Branch CR25235 has been updated by aba.

SHA-1: 168207064361d98bef9b7e60293bc70adfce8e35


Detailed log of new commits:

Author: aba
Date: Thu Sep 11 18:58:54 2014 +0400

    Added color parameter to vdimension and vdimparam.

(0031629)
git   
2014-09-11 19:20   
Branch CR25235 has been updated by kgv.

SHA-1: 8648ad5c966eec7c8600d93adac4838c4a4fa6c7


Detailed log of new commits:

Author: aba
Date: Thu Sep 11 19:20:17 2014 +0400

    Add dimensions demo script samples/tcl/dimensions.tcl

(0031642)
kgv   
2014-09-12 10:19   
Dear Anastasia,

please consider redesigning command to provide common style described in Code Rules (e.g. "-text 2d" instead of "text=2d" and so on).
(0031644)
git   
2014-09-12 10:27   
Branch CR25235 has been updated by kgv.

SHA-1: 5ee52b469935e5b771e943464e73efbda22223fb


Detailed log of new commits:

Author: kgv
Date: Fri Sep 12 10:27:51 2014 +0400

    Add new demo script to automated tests

(0032038)
git   
2014-09-23 18:54   
Branch CR25235 has been updated by aba.

SHA-1: c7fe083c133eb026a858009e26eb7043bb8dd00a


Detailed log of new commits:

Author: aba
Date: Tue Sep 23 18:54:29 2014 +0400

    remarks; changed command format of vdimension and vdimparam; updated tests.

(0032039)
aba   
2014-09-23 18:55   
Dear san,

please review the branch CR25235.
(0032074)
kgv   
2014-09-24 12:12   
(edited on: 2014-09-24 12:14)
Dear Anastasia,

+{
+    BRepAdaptor_Curve anAdaptedCurve (theEdge);
+    switch (anAdaptedCurve.GetType())
+    {

please correct indentation.

+    theLastPoint  = anAdaptedCurve.Value (anAdaptedCurve.LastParameter());
+}
+//=======================================================================

please add empty line; the function should return value.

+        Handle(Geom_Curve) aCurve;
+        aCurve = aBasisSurf->VIso(aMidV);

single line?

+  static  Standard_Boolean CircleFromPlanarFace (const TopoDS_Face& theFace,

redundant space after "static".

+  Standard_Boolean& theIsCustomPlane,gp_Pln& thePlane,

please add space after ",".

+        if (aValue.IsEqual ("2d") || aValue.IsEqual ("3d"))
         {
+          theAspect->MakeText3d (aValue.IsEqual ("3d"));
         }

the following would be more clear (the same for shading/wireframe):
if (aValue == "3d")
{
  theAspect->MakeText3d (Standard_True);
}
else if (aValue.IsEqual ("2d"))
{
  theAspect->MakeText3d (Standard_False);
}

+    else if (aParam.IsEqual ("-color"))
+    {
+      theAspect->SetCommonColor (Quantity_Color (ViewerTest::GetColorFromName (theArgVec[++anIt])));

+    }
+    else if (aParam.IsEqual ("-extension"))
+    {
+      TCollection_AsciiString aParam (theArgVec[++anIt]);

out of range check (++anIt < theArgNum)?

   GetMapOfAIS().Bind (aDim,aName);
 
+  std::cout << theArgs[0] << ": dimension " << aName.ToCString()
+    << " was built. To display it call 'vdisplay " << aName.ToCString() << 
"'\n";

do we really want to create hidden dimensions by default?
To suppress viewer updates in batch script - parse argument "-noupdate/-update" instead (see vsetlocation as example).
If hidden dimension is really needed in some scenario - please consider adding option "-hide/-hidden".

It seems that within ParseDimensionParams/VDimBuilder unknown arguments will be just ignored. It is inconsistent and not very friendly - for instance user will not see any feedback why command does not produce expected result in case of misprint in some parameter starting with "-".

(0032093)
kgv   
2014-09-24 15:00   
Please consider adding option to setup font for dimension - see 0024387 issue.
(0032160)
git   
2014-09-25 16:46   
Branch CR25235 has been updated by aba.

SHA-1: 023d4b23f6a605f75c5c0186627c4d58feea3567


Detailed log of new commits:

Author: aba
Date: Thu Sep 25 16:46:04 2014 +0400

    Added vdimension command validation checks; made dimensions automatically displayed; updated test cases.

(0032162)
aba   
2014-09-25 17:11   
Remarks were corrected except font loading 0024387 (as agreed with san, it will be done after OCC 6.8.0 release).

Dear kgv,

please review.
(0032372)
git   
2014-09-30 09:05   
Branch CR25235_1 has been created by kgv.

SHA-1: ed962c2ac4d4199cd849b3427ef6d67b109df946


Detailed log of new commits:

Author: aba
Date: Tue Sep 30 09:05:06 2014 +0400

(0032373)
git   
2014-09-30 09:12   
Branch CR25235_1 has been updated forcibly by kgv.

SHA-1: 7a67594b877859aaa071101c900dcf237920d80b
(0032374)
git   
2014-09-30 09:12   
Branch CR25235_1 has been updated forcibly by kgv.

SHA-1: 8081de1f3d0fc02447f4f32f6103c223fc97a89f
(0032375)
kgv   
2014-09-30 09:13   
Please test patch in branch CR25235_1.
(0032477)
mkv   
2014-09-30 19:06   
Dear BugMaster,
Branch CR25235_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 8081de1f3d0fc02447f4f32f6103c223fc97a89f

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 196 (196 on master)

products component :
Linux: 11 (11 on master)
Windows: 3 (3 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR25235-1-master-occt/Debian60-64/demo/samples/dimensions.html [^]
http://occt-tests/CR25235-1-master-occt/Windows-32-VC10/demo/samples/dimensions.html [^]
demo samples(003) dimensions: OK

Testing on Linux:
occt component :
Total MEMORY difference: 398069100 / 397669948
Total CPU difference: 44786.71000000018 / 46596.14000000006
products component :
Total MEMORY difference: 124787840 / 124645448
Total CPU difference: 16075.319999999982 / 14771.669999999953

Testing on Windows:
occt component :
Total MEMORY difference: 254739356 / 279236240
Total CPU difference: 33850.375 / 39387.8125
products component :
Total MEMORY difference: 67286612 / 67249232
Total CPU difference: 10757.46875 / 11300.046875

There are no differences in images found by testdiff.
(0032478)
git   
2014-09-30 19:07   
Branch CR25235_1 has been updated by mkv.

SHA-1: a56e34a6a61e4b947c5ff211927b5abd7e65961a


Detailed log of new commits:

Author: mkv
Date: Tue Sep 30 19:05:33 2014 +0400

    Add file for test case for issue CR25235

(0033457)
git   
2014-10-21 16:44   
Branch CR25235_1 has been deleted by inv.

SHA-1: a56e34a6a61e4b947c5ff211927b5abd7e65961a
(0033470)
git   
2014-10-21 16:44   
Branch CR25235 has been deleted by inv.

SHA-1: 023d4b23f6a605f75c5c0186627c4d58feea3567