DiscussionsIssue archiveOCCT:Visualization

Archived issue #0031729

Visualization, Prs3d_DatumAspect - provide per axis text aspects

CommunityOCCT:Visualizationclosed16 public notes

Search issues

Description

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.

Public activity

16 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Commenter 3.

[revision removed]


Detailed log of new commits:

Author: Commenter 3
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.
02Author
I like this patch to version 7.5.0.
03Commenter 3
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 ;).
04Commenter 2
Branch [archived branch] has been updated forcibly by Commenter 3.

[revision removed]
05Commenter 2
Branch [archived branch] has been updated forcibly by Commenter 3.

[revision removed]
06Commenter 2
Branch [archived branch] has been updated forcibly by Commenter 3.

[revision removed]
07Commenter 2
Branch [archived branch] has been updated forcibly by Commenter 3.

[revision removed]
08Commenter 2
Branch [archived branch] has been updated by Commenter 3.

[revision removed]


Detailed log of new commits:

Author: Commenter 3
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.

09Commenter 2
Branch [archived branch] has been created by Commenter 3.

[revision removed]


Detailed log of new commits:

Author: Commenter 3
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.
10Commenter 3
Patch is ready for review
- OCCT branch: [archived branch]

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31729_1-master-KGV/
11Commenter 2
Branch [archived branch] has been updated forcibly by Commenter 3.

[revision removed]
12Author
Dear KGV,

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

I got it. Thank you.:)
13Commenter 13
The patch was reviewed without remarks
14Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
15Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
16Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records