View Issue Details

IDProjectCategoryView StatusLast Update
0032992Open CASCADEOCCT:Visualizationpublic2023-03-19 20:13
Reporterkgv Assigned Tongavrilo 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.6.0 
Target Version7.7.0Fixed in Version7.7.0 
Summary0032992: Visualization - Font_TextFormatter should wrap words when possible
Description0030537 introduced text wrapping parameter Font_TextFormatter::Wrapping() but it is implemented as per-glyph wrapping.
In most cases wrapping is desired to be done on per-word basis.
Steps To Reproduce
pload VISUALIZATION MODELING
vinit View1
vdrawtext t "The coolest 3D Viewer ever seen in the world based on Open CASCADE Technology" -height 15 -font "Arial" -wrapping 200
TagsNo tags attached.
Test case numberopengl text text_wrapped

Attached Files

  • image.png (11,140 bytes)
  • image-2.png (24,691 bytes)
  • image-3.png (6,076 bytes)
  • image-4.png (16,397 bytes)

Relationships

child of 0030537 closednds Visualization - wrapping text in font text formatter 

Activities

kgv

2022-05-30 11:58

developer  

image.png (11,140 bytes)

kgv

2022-05-30 12:02

developer   ~0108743

image-2.png (24,691 bytes)

git

2022-07-14 10:07

administrator   ~0109800

Branch CR32992 has been created by ngavrilo.

SHA-1: 6b783e77505f2ba8b510d859cd8a631a528ee722


Detailed log of new commits:

Author: Nikolay Gavrilov
Date: Thu Jul 14 10:06:41 2022 +0300

    0032992: Visualization - Font_TextFormatter should wrap words when possible

git

2022-07-14 11:05

administrator   ~0109803

Branch CR32992 has been updated forcibly by ngavrilo.

SHA-1: c6c912479d0e1320922cb7b7f329b95b5554c40b

git

2022-07-14 15:16

administrator   ~0109807

Branch CR32992 has been updated forcibly by ngavrilo.

SHA-1: 33c8a72788661285860902f261062e39f32a2d46

git

2022-07-14 16:54

administrator   ~0109810

Branch CR32992 has been updated by ngavrilo.

SHA-1: 6b57a523d62108e3957c565f17326303c0b0bb5b


Detailed log of new commits:

Author: Nikolay Gavrilov
Date: Thu Jul 14 16:53:58 2022 +0300

    0032992: Visualization - Font_TextFormatter should wrap words when possible

ngavrilo

2022-07-15 11:07

developer   ~0109816

Patch is ready for reivew
- OCCT: CR32992

http://jenkins-test-occt.nnov.opencascade.com/job/CR32992-master-NGAVRILO4-Products-Debian80-64-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com/job/CR32992-master-NGAVRILO4-OCCT-Debian80-64-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com/job/CR32992-master-NGAVRILO4-Products-Windows-64-VC14-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com//view/CR32992-master-NGAVRILO4/view/COMPARE/job/CR32992-master-NGAVRILO4-OCCT-Windows-64-VC14-opt-test-compare/
image-3.png (6,076 bytes)

ngavrilo

2022-07-15 11:08

developer   ~0109817

Patch is ready for review
- OCCT: CR32992

http://jenkins-test-occt.nnov.opencascade.com/job/CR32992-master-NGAVRILO4-Products-Debian80-64-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com/job/CR32992-master-NGAVRILO4-OCCT-Debian80-64-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com/job/CR32992-master-NGAVRILO4-Products-Windows-64-VC14-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com//view/CR32992-master-NGAVRILO4/view/COMPARE/job/CR32992-master-NGAVRILO4-OCCT-Windows-64-VC14-opt-test-compare/

kgv

2022-07-15 13:09

developer   ~0109826

Last edited: 2022-07-15 13:10

@ngavrilo,

- Test case for new feature is missing.
- New behavior should be conditional - e.g. a new flag should be exposed, there are some scenarios where symbol wrapping would be better than word-wrapping. But I think word wrapping could be enabled by default.

+  static inline Standard_Boolean IsSeparatorSymbol (const Standard_Utf32Char& theSymbol)

`inline` is redundant here.

+    if (theSymbol == '\x0A'   // new line
+     || theSymbol == ' '     // space
+     || theSymbol == '\x09')   // tab
+      return Standard_True;
+
+    return Standard_False;

Please use a single `return`.

git

2022-07-15 16:03

administrator   ~0109830

Branch CR32992 has been updated forcibly by ngavrilo.

SHA-1: de252b7c8dfadf3e184f48e6ec8d0198c4269a3b

git

2022-07-15 17:45

administrator   ~0109835

Branch CR32992 has been updated forcibly by ngavrilo.

SHA-1: dcaa45071e62b2e03783a5e6a9024a694a06956e

git

2022-08-01 10:45

administrator   ~0110093

Branch CR32992 has been updated forcibly by ngavrilo.

SHA-1: 87bbd71e44d292b28370f735d6601c09b63afdbf

ngavrilo

2022-08-01 14:49

developer   ~0110095

Patch is ready for review
- OCCT: CR32992

http://jenkins-test-occt.nnov.opencascade.com/job/master-CR32992-NGAVRILO6-Products-Windows-64-VC14-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com/job/master-CR32992-NGAVRILO6-Products-Debian80-64-opt-test-compare/1/
http://jenkins-test-occt.nnov.opencascade.com//view/master-CR32992-NGAVRILO6/view/COMPARE/job/master-CR32992-NGAVRILO6-OCCT-Windows-64-VC14-opt-test-compare/
http://jenkins-test-occt.nnov.opencascade.com//view/master-CR32992-NGAVRILO6/view/COMPARE/job/master-CR32992-NGAVRILO6-OCCT-Debian80-64-opt-test-compare/

ngavrilo

2022-08-01 14:50

developer   ~0110096

image-4.png (16,397 bytes)

smoskvin

2022-08-06 11:17

administrator   ~0110142

Combination -
OCCT branch : IR-2022-08-05
master SHA - changes and them, and you can discard any commits you make in this
81d569625e986cb41bc1e6e1ce1424cfabf420ff
changes and them, and you can discard any commits you make in this
e0ceb716c70188b98130b1550914140d0502a6f9
Products branch : IR-2022-08-05 SHA - 8842633278b0e6adcbef68d7431f5a8e14c7911f
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: 18726.540000000627 / 18728.660000000684 [-0.01%]
Products
Total CPU difference: 11968.290000000105 / 11979.790000000121 [-0.10%]
Windows-64-VC14:
OCCT
Total CPU difference: 20741.4375 / 20790.828125 [-0.24%]
Products
Total CPU difference: 13528.765625 / 13514.9375 [+0.10%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2022-08-06 16:48

administrator   ~0110144

Branch CR32992 has been deleted by mnt.

SHA-1: 87bbd71e44d292b28370f735d6601c09b63afdbf

Related Changesets

occt: master 6072d309

2022-07-14 16:53:58

ngavrilo


Committer: smoskvin Details Diff
0032992: Visualization - Font_TextFormatter should wrap words when possible Affected Issues
0032992
mod - src/Font/Font_TextFormatter.cxx Diff File
mod - src/Font/Font_TextFormatter.hxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - tests/opengl/data/text/text_wrapped Diff File

Issue History

Date Modified Username Field Change
2022-05-30 11:58 kgv New Issue
2022-05-30 11:58 kgv Assigned To => kgv
2022-05-30 11:58 kgv File Added: image.png
2022-05-30 11:58 kgv Relationship added child of 0030537
2022-05-30 12:02 kgv Note Added: 0108743
2022-05-30 12:02 kgv File Added: image-2.png
2022-06-08 11:05 kgv Assigned To kgv => ngavrilo
2022-07-12 21:56 ngavrilo Time allocated 12.7.2022: 8 h. => set
2022-07-13 18:14 ngavrilo Time allocated 13.7.2022: 8 h. => set
2022-07-14 10:07 git Note Added: 0109800
2022-07-14 11:05 git Note Added: 0109803
2022-07-14 15:16 git Note Added: 0109807
2022-07-14 16:54 git Note Added: 0109810
2022-07-14 22:05 ngavrilo Time allocated 14.7.2022: 8 h. => set
2022-07-15 11:07 ngavrilo Note Added: 0109816
2022-07-15 11:07 ngavrilo File Added: image-3.png
2022-07-15 11:08 ngavrilo Assigned To ngavrilo => kgv
2022-07-15 11:08 ngavrilo Status new => resolved
2022-07-15 11:08 ngavrilo Note Added: 0109817
2022-07-15 13:09 kgv Note Added: 0109826
2022-07-15 13:09 kgv Assigned To kgv => ngavrilo
2022-07-15 13:09 kgv Status resolved => assigned
2022-07-15 13:10 kgv Note Edited: 0109826
2022-07-15 16:03 git Note Added: 0109830
2022-07-15 16:32 ngavrilo Time allocated 15.7.2022: 2 h. => set
2022-07-15 17:45 git Note Added: 0109835
2022-08-01 10:45 git Note Added: 0110093
2022-08-01 14:49 ngavrilo Assigned To ngavrilo => kgv
2022-08-01 14:49 ngavrilo Status assigned => resolved
2022-08-01 14:49 ngavrilo Note Added: 0110095
2022-08-01 14:50 ngavrilo Note Added: 0110096
2022-08-01 14:50 ngavrilo File Added: image-4.png
2022-08-01 15:05 kgv Assigned To kgv => bugmaster
2022-08-01 15:05 kgv Status resolved => reviewed
2022-08-01 15:05 kgv Test case number => opengl text text_wrapped
2022-08-06 11:17 smoskvin Status reviewed => tested
2022-08-06 11:17 smoskvin Note Added: 0110142
2022-08-06 16:01 smoskvin Changeset attached => occt master 6072d309
2022-08-06 16:01 ngavrilo Assigned To bugmaster => ngavrilo
2022-08-06 16:01 ngavrilo Status tested => verified
2022-08-06 16:01 ngavrilo Resolution open => fixed
2022-08-06 16:48 git Note Added: 0110144
2023-03-19 20:13 vglukhik Status verified => closed
2023-03-19 20:13 vglukhik Fixed in Version => 7.7.0