MantisBT - Community
View Issue Details
0031729Community[OCCT] OCCT:Visualizationpublic2020-08-21 16:022020-11-21 13:28
Vico Liang 
bugmaster 
normalfeature 
verifiedfixed 
 
[OCCT] 7.6.0* 
bugs/vis/bug27958
0031729: Visualization, Prs3d_DatumAspect - provide per axis text aspects
There is a common requirement to draw trihedron three axis and label with different colors (e.g. Red, green, blue). In current implementation, all label text are drawn with one color.
The request is to provide a method in Prs3d_DatumAspect as below:
Handle(Prs3d_TextAspect) Prs3d_DatumAspect::TextAspect(Prs3d_DatumParts thePart)

In this way, each axis has a textAspect.

No tags attached.
related to 0029950verified bugmaster Visualization - AIS_Trihedron.SetDatumPartColor doesn't work for arrows 
Issue History
2020-08-21 16:02Vico LiangNew Issue
2020-08-21 16:02Vico LiangAssigned To => kgv
2020-08-21 16:07kgvRelationship addedrelated to 0029950
2020-09-21 17:42kgvTarget Version7.5.0 => 7.6.0*
2020-11-05 17:30kgvSeverityminor => feature
2020-11-05 17:30kgvSummaryIs it possible to support differenct TextAspect in Prs3d_DatumAspect => Visualization, Prs3d_DatumAspect - provide per axis text aspects
2020-11-05 17:46gitNote Added: 0096568
2020-11-06 04:08Vico LiangNote Added: 0096571
2020-11-06 10:24kgvNote Added: 0096573
2020-11-06 10:51gitNote Added: 0096576
2020-11-06 11:49gitNote Added: 0096580
2020-11-06 11:52gitNote Added: 0096582
2020-11-06 12:02gitNote Added: 0096584
2020-11-06 14:13gitNote Added: 0096589
2020-11-06 14:18gitNote Added: 0096590
2020-11-06 16:06kgvNote Added: 0096598
2020-11-06 16:06kgvAssigned Tokgv => osa
2020-11-06 16:06kgvStatusnew => resolved
2020-11-06 18:49gitNote Added: 0096600
2020-11-07 04:50Vico LiangNote Added: 0096602
2020-11-09 09:31osaNote Added: 0096610
2020-11-09 09:31osaAssigned Toosa => bugmaster
2020-11-09 09:31osaStatusresolved => reviewed
2020-11-21 12:39bugmasterChangeset attached => occt master 0aeb8984
2020-11-21 12:39bugmasterStatusreviewed => verified
2020-11-21 12:39bugmasterResolutionopen => fixed
2020-11-21 12:43bugmasterNote Added: 0096937
2020-11-21 12:49bugmasterTest case number => bugs/vis/bug27958
2020-11-21 13:28gitNote Added: 0096959
2020-11-21 13:28gitNote Added: 0096960

Notes
(0096568)
git   
2020-11-05 17:46   
Branch CR31729 has been created by kgv.

SHA-1: eb4f66e4b469d76b8c55e3b561c97fe7626d0891


Detailed log of new commits:

Author: kgv
Date: Thu Nov 5 17:34:08 2020 +0300

    0031729: Visualization, Prs3d_DatumAspect - provide per axis text aspects
    
    Prs3d_DatumAspect::TextAspect() now takes Prs3d_DatumParts argument
    and defined separately for Prs3d_DatumParts_XAxis/Prs3d_DatumParts_YAxis/Prs3d_DatumParts_ZAxis.
    The method without arguments has been marked as deprecated.
    
    AIS_Trihedron::setOwnDatumAspect() implementation has been moved to Prs3d_DatumAspect::CopyAspectsFrom()
    and now used by Prs3d_Drawer::SetOwnDatumAspects().
    OpenGl_Text::render() - added NULL-check.
    
    Command vtrihedron has been extended by "-textColor Color XAxis|YAxis|ZAxis" syntax.
    Command vviewcube has been extended by "-xAxisTextColor|-yAxisTextColor|-zAxisTextColor" arguments.
(0096571)
Vico Liang   
2020-11-06 04:08   
I like this patch to version 7.5.0.
(0096573)
kgv   
2020-11-06 10:24   
Vico,

> I like this patch to version 7.5.0.
OCCT 7.5.0 has been just released, so unfortunately it's too late for this improvement ;).
(0096576)
git   
2020-11-06 10:51   
Branch CR31729 has been updated forcibly by kgv.

SHA-1: f299b4a74c6fd7784fd518603a5abc89c648ec69
(0096580)
git   
2020-11-06 11:49   
Branch CR31729 has been updated forcibly by kgv.

SHA-1: 8be321e24c824a0370e9e7c8d97ccc7e5dcbb9fc
(0096582)
git   
2020-11-06 11:52   
Branch CR31729 has been updated forcibly by kgv.

SHA-1: 59a9e056d480b141547b1e7c19821535b06d1f1f
(0096584)
git   
2020-11-06 12:02   
Branch CR31729 has been updated forcibly by kgv.

SHA-1: adc58edb321648524a0fef98b12562f23661e97d
(0096589)
git   
2020-11-06 14:13   
Branch CR31729 has been updated by kgv.

SHA-1: 43dad96d3f9127038810390074700115c6cb3bb3


Detailed log of new commits:

Author: kgv
Date: Fri Nov 6 14:13:46 2020 +0300

    0029950: Visualization - AIS_Trihedron.SetDatumPartColor doesn't work for arrows
    
    AIS_Trihedron::computePresentation() now uses Prs3d_DatumNArrow shading/line aspects.

(0096590)
git   
2020-11-06 14:18   
Branch CR31729_1 has been created by kgv.

SHA-1: 935dd7d9c36eefae10ffde41f9319b0d52b717c9


Detailed log of new commits:

Author: kgv
Date: Thu Nov 5 17:34:08 2020 +0300

    0031729: Visualization, Prs3d_DatumAspect - provide per axis text aspects
    
    Prs3d_DatumAspect::TextAspect() now takes Prs3d_DatumParts argument
    and defined separately for Prs3d_DatumParts_XAxis/Prs3d_DatumParts_YAxis/Prs3d_DatumParts_ZAxis.
    The method without arguments has been marked as deprecated.
    
    V3d_Trihedron now stores per-label text attributes.
    Added method V3d_View::Trihedron() returning V3d_Trihedron object for more straightforward definition.
    V3d_Trihedron::SetWireframe() - added missing invalidation.
    
    AIS_Trihedron::setOwnDatumAspect() implementation has been moved to Prs3d_DatumAspect::CopyAspectsFrom()
    and now used by Prs3d_Drawer::SetOwnDatumAspects().
    OpenGl_Text::render() - added NULL-check.
    
    AIS_Trihedron::computePresentation() now takes into account Prs3d_Datum*Arrow shading/line aspects.
    
    Command vtrihedron has been extended by "-textColor XAxis|YAxis|ZAxis Color" syntax.
    Command vviewcube has been extended by "-xAxisTextColor|-yAxisTextColor|-zAxisTextColor" arguments.
(0096598)
kgv   
2020-11-06 16:06   
Patch is ready for review
- OCCT branch: CR31729_1.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31729_1-master-KGV/ [^]
(0096600)
git   
2020-11-06 18:49   
Branch CR31729_1 has been updated forcibly by kgv.

SHA-1: 87645e7b12d6a540532df51f5c67c0eff30cefde
(0096602)
Vico Liang   
2020-11-07 04:50   
Dear KGV,

>OCCT 7.5.0 has been just released, so unfortunately it's too late for this improvement ;).

I got it. Thank you.:)
(0096610)
osa   
2020-11-09 09:31   
The patch was reviewed without remarks
(0096937)
bugmaster   
2020-11-21 12:43   
Combination -
OCCT branch : IR-2020-11-20
master SHA - c5892d852bb462075f9db03f31085e35d7b59f35
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-11-20 SHA - a5d1f89f5fa83c955e6a604f57a5b590eb433b43
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18024.090000000127 / 17964.340000000077 [+0.33%]
Products
Total CPU difference: 12166.12000000011 / 12169.520000000111 [-0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19696.90625 / 19723.125 [-0.13%]
Products
Total CPU difference: 13644.875 / 13567.078125 [+0.57%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0096959)
git   
2020-11-21 13:28   
Branch CR31729_1 has been deleted by inv.

SHA-1: 87645e7b12d6a540532df51f5c67c0eff30cefde
(0096960)
git   
2020-11-21 13:28   
Branch CR31729 has been deleted by inv.

SHA-1: 43dad96d3f9127038810390074700115c6cb3bb3