View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025852 | Open CASCADE | OCCT:Visualization | public | 2015-02-23 16:16 | 2020-03-04 10:23 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.7.0 | ||||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0025852: Visualization - Font_BRepFont produces bad faces for circled symbols | ||||
Description | Text to BRep algorithm produces bad shape (single-face) for symbols that must be represented by two or more faces, located inside one, like circled symbols (e.g. circled copyright sign, '(c)') | ||||
Steps To Reproduce | pload MODELING VISUALIZATION text2brep t "\u00ae" Courier 10 whatis t vinit View1 vclear vtop vsetdispmode 1 vdisplay t vfit vmoveto 250 250 checkshape t | ||||
Tags | No tags attached. | ||||
Test case number | bugs vis bug25852 | ||||
related to | 0024181 | closed | bugmaster | Open CASCADE | Text to BRep functionality |
related to | 0024218 | closed | bugmaster | Open CASCADE | ShapeFix_Face requires double execution to produce valid shape when FixSplitFaceMode is in effect |
child of | 0031401 | new | dpasukhi | Open CASCADE | Visualization - revise Toolkits dependency graph |
|
sign_KO.png (5,197 bytes) |
|
Font_BRepFont does not perform classification of input polygons - instead it replies on the tool ShapeFix_Face to split Face into parties when needed:myFixer.FixWireMode() = 1; myFixer.FixOrientationMode() = 1; myFixer.FixSplitFaceMode() = 1; // some glyphs might be composed from several faces There was also a bug related to this functionality - 0024218 with symbol %, though after fixing it, code of Font_BRepFont has not been updated. |
|
Theoretically it is better not using ShapeFix_Face in Font_BRepFont at all, however it is not possible right now without duplicating some functionality: https://lists.gnu.org/archive/html/freetype/2000-07/msg00004.html ...the clockwise / anti-clockwise direction trick doesn't work with all fonts. TrueType and Type 1 fonts use reverse conventions for the inside/outside rotation. There exist fonts that do not respect the convention of their respective format. You may also end up with individual glyphs that are reversed compared to the rest of the same face (usually they are "mirrored" version of another glyph, through compositing). In theory, a badly designed fonts could even have a glyph with two contours used with opposite conventions !! If you want to be correct all the time, you first need to determine the convention used in a specific glyph. See the experimental code (#if 0) in "src/base/ftglyph.c" named "Get_Direction" or something like that. It computes the convention by looking at the points on the edges of the bounding box.. |
|
Problem described in issue is reproduced on current state of OCCT. |
|
Branch CR25852 has been created by skl. SHA-1: e311d4e5a0c89dd1f41bac70e0f164d31e934419 Detailed log of new commits: Author: skl Date: Thu Jul 12 09:47:02 2018 +0300 0025852: Text to BRep algorithm produces bad faces for circled symbols |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: 914282c7e8df69f6c4f024dc5790850ade448e25 |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: c6d268fdc8d773d8fc3ad6fbbeb9f455f18fd57e |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: c8157bf9209069b9c7f1d96d15ad5ecfcabc82d0 |
|
+ TopTools_MapOfShape usedShapes; + Standard_Integer nbFaces = 0; + while (aMapOutInts.Extent() > 0) { Patch does not follow OCCT Coding rules in several aspects: - Variable names (a/the). - Brackets placement. + NCollection_DataMap <TopoDS_Shape, TopTools_MapOfShape>::Iterator itMOI(aMapOutInts); + TopoDS_Shape aW; + Standard_Integer maxNbOuts = -1; + for (; itMOI.More(); itMOI.Next()) { ... + TopTools_MapIteratorOfMapOfShape itIn(anIns); + for (; itIn.More(); itIn.Next()) { Please declare iterator unused outside the loop within for(;;) statement. + NCollection_DataMap <TopoDS_Shape, TopTools_MapOfShape> aMapOutInts; + NCollection_DataMap <TopoDS_Shape, Standard_Integer> aMapOutLevel; Please specify hasher explicitly for maps. |
|
Branches CR25852 and CR25852_prod are ready to be reviewed. Result of tests: http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-OCCT-Windows-64-VC10-opt-test-compare/2/ http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-OCCT-Debian70-64-opt-test-compare/2/ http://jenkins-test-11.nnov.opencascade.com:8080//view/CR25852-master-SKL/view/COMPARE/job/CR25852-master-SKL-Products-Debian70-64-opt-test-compare/ |
|
> Result of tests: Please fix regressions first - check image difference, I see 'j'/'i' are missing now on screenshots, and other artifacts. |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: 6a3ff22f55f11ae0690c245201fcd37afd528df5 |
|
Branches CR25852 and CR25852_prod are ready to be reviewed. Result of tests: http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-OCCT-Windows-64-VC10-opt-test-compare/3/ http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-OCCT-Debian70-64-opt-test-compare/3/ http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-Products-Windows-64-VC10-opt-test-compare/2/ |
|
Please to take into account remark about braces and to remove redundant cycle in the lines 564-568 |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: 0d7b88932b73e1d8e1828204afbb41940a595d97 |
|
1. Please make separate method to build faces. (lines 518- 621). 2. Map "TopTools_MapOfShape anIntWs" should be replaced on the sequence or vector of shapes because this map is used only as container for internal wires. Please note that iteration by map can give different result from time to time. 3. Please retest this branch after corrections. |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: 4311cd37130946f02ef0bf70a2fea742d524c084 |
|
Branches CR25852 and CR25852_prod are ready to be reviewed. Result of tests: http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-OCCT-Windows-64-VC10-opt-test-compare/4/ http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-OCCT-Debian70-64-opt-test-compare/4/ http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-Products-Windows-64-VC10-opt-test-compare/3/ http://jenkins-test-11.nnov.opencascade.com:8080/job/CR25852-master-SKL-Products-Debian70-64-opt-test-compare/3/ |
|
Once again, please follow Recommended OCCT Coding Style for name conversions, braces placement, etc: https://dev.opencascade.org/doc/overview/html/occt_dev_guides__coding_rules.html +// ======================================================================= +// function : classifyWW +// purpose : auxilary for buildFaces +// ======================================================================= +TopAbs_State classifyWW(TopoDS_Wire& W1, const TopoDS_Wire& W2, const TopoDS_Face F) +{ Why F is not passed by reference here? Local function should be marked with "static" and documented in usual way for declarations (//!). |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: 17e83166276644efef73af0e57dde532d675ad42 |
|
Branch CR25852 has been updated forcibly by skl. SHA-1: 92407608d123842d07f5b96d0e8762c815d0af4d |
|
Branches CR25852 and CR25852_prod are ready to be reviewed. |
|
> Branches CR25852 and CR25852_prod are ready to be reviewed. CR25852_prod should be rebased on current master. |
|
Branches CR25852 and CR25852_prod were reviewed. |
|
CR25852_prod still contains changes unrelated to bug. |
|
Use branch CR25852prod instead of CR25852_prod. |
|
Branch CR25852_1 has been created by kgv. SHA-1: df559a70d838febe8ff7882d8c5329b185420627 Detailed log of new commits: Author: skl Date: Thu Jul 12 09:47:02 2018 +0300 0025852: Visualization - Font_BRepFont produces bad faces for circled symbols Font_BRepFont has been modified to use dedicated algorithm for ordering of wires based on wire classification, analysis of internal zones and creation few result faces (if it is needed) instead of relying on ShapeFix. TKService dependency from TKShHealing has been dropped. |
|
Please take the patch (CR25852_1 + CR25852prod). http://jenkins-test-11.nnov.opencascade.com/view/CR25852_1-CR25852prod-KGV/ |
|
Combination - OCCT branch : CR25852_1 SHA - df559a70d838febe8ff7882d8c5329b185420627 Products branch : CR25852prod SHA - c8849f8302d55380ec8fb56caa8c26a3bfe171ae 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: Debian70-64: OCCT Total CPU difference: 17434.30999999984 / 17080.800000000007 [+2.07%] Products Total CPU difference: 7459.800000000037 / 7461.820000000036 [-0.03%] Windows-64-VC10: OCCT --- Products Total CPU difference: 2921.3059261999965 / 2901.743400799998 [+0.67%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Retested on IR-WEEK39 |
|
Branch CR25852_1 has been deleted by inv. SHA-1: df559a70d838febe8ff7882d8c5329b185420627 |
|
Branch CR25852 has been deleted by inv. SHA-1: 92407608d123842d07f5b96d0e8762c815d0af4d |
occt: master 3388cf17 2018-07-12 06:47:02
Committer: bugmaster Details Diff |
0025852: Visualization - Font_BRepFont produces bad faces for circled symbols Font_BRepFont now uses a dedicated algorithm for text-to-BRep transformation instead of relying on ShapeFix. It orders wires based on wire classification, analyzes internal zones and creates a few faces (if needed). TKService dependency from TKShHealing has been dropped. |
Affected Issues 0025852 |
|
mod - src/Font/Font_BRepFont.cxx | Diff File | ||
mod - src/Font/Font_BRepFont.hxx | Diff File | ||
mod - src/TKService/EXTERNLIB | Diff File | ||
mod - tests/bugs/vis/bug25852 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-02-23 16:16 |
|
New Issue | |
2015-02-23 16:16 |
|
Assigned To | => kgv |
2015-02-23 16:16 |
|
Relationship added | related to 0024181 |
2015-02-23 19:33 | kgv | Steps to Reproduce Updated | |
2015-02-23 19:34 | kgv | File Added: sign_KO.png | |
2015-02-23 19:48 | kgv | Note Added: 0037788 | |
2015-02-24 08:57 | kgv | Assigned To | kgv => gka |
2015-04-14 11:54 |
|
Target Version | 6.9.0 => 7.0.0 |
2015-04-14 12:17 |
|
Target Version | 7.0.0 => 7.1.0 |
2016-08-06 13:10 | kgv | Note Added: 0056523 | |
2016-08-06 13:11 | kgv | Note Edited: 0056523 | |
2016-08-06 13:11 | kgv | Note Edited: 0056523 | |
2016-08-06 13:12 | kgv | Relationship added | related to 0024218 |
2016-10-25 09:33 | kgv | Target Version | 7.1.0 => 7.2.0 |
2017-07-27 09:24 |
|
Target Version | 7.2.0 => 7.4.0 |
2017-08-08 18:05 |
|
Test case number | => bugs vis bug25852 |
2017-08-08 18:05 |
|
Note Added: 0069222 | |
2018-07-11 11:40 | kgv | Assigned To | gka => skl |
2018-07-11 11:40 | kgv | Status | new => assigned |
2018-07-12 09:48 | git | Note Added: 0077488 | |
2018-07-12 16:26 | kgv | Summary | Text to BRep algorithm produces bad faces for circled symbols => Visualization - Font_BRepFont produces bad faces for circled symbols |
2018-07-16 10:01 | git | Note Added: 0077645 | |
2018-07-16 13:34 | git | Note Added: 0077658 | |
2018-07-16 13:45 | git | Note Added: 0077659 | |
2018-07-16 13:46 | kgv | Note Added: 0077660 | |
2018-07-16 13:49 |
|
Note Added: 0077662 | |
2018-07-16 13:50 |
|
Assigned To | skl => kgv |
2018-07-16 13:50 |
|
Status | assigned => resolved |
2018-07-16 13:50 |
|
Assigned To | kgv => gka |
2018-07-16 13:52 | kgv | Note Added: 0077663 | |
2018-07-16 13:52 | kgv | Assigned To | gka => skl |
2018-07-16 13:52 | kgv | Status | resolved => assigned |
2018-07-16 13:52 | kgv | Note Edited: 0077663 | |
2018-07-16 13:52 | kgv | Note Edited: 0077663 | |
2018-07-16 13:53 | kgv | Note Edited: 0077663 | |
2018-07-16 15:50 | git | Note Added: 0077676 | |
2018-07-16 18:03 |
|
Note Added: 0077684 | |
2018-07-16 18:04 |
|
Assigned To | skl => kgv |
2018-07-16 18:04 |
|
Status | assigned => resolved |
2018-07-16 18:04 |
|
Assigned To | kgv => gka |
2018-07-16 19:15 |
|
Note Added: 0077686 | |
2018-07-16 19:15 |
|
Assigned To | gka => skl |
2018-07-16 19:15 |
|
Status | resolved => assigned |
2018-07-16 19:17 |
|
Note Edited: 0077686 | |
2018-07-16 19:26 | git | Note Added: 0077688 | |
2018-07-16 20:20 |
|
Note Added: 0077689 | |
2018-07-17 07:40 | git | Note Added: 0077690 | |
2018-07-17 10:38 |
|
Note Added: 0077701 | |
2018-07-17 10:38 |
|
Assigned To | skl => kgv |
2018-07-17 10:38 |
|
Status | assigned => resolved |
2018-07-17 10:38 |
|
Assigned To | kgv => gka |
2018-07-17 10:47 | kgv | Note Added: 0077702 | |
2018-07-17 10:47 | kgv | Assigned To | gka => skl |
2018-07-17 10:47 | kgv | Status | resolved => assigned |
2018-07-17 10:51 | git | Note Added: 0077703 | |
2018-07-17 11:35 | git | Note Added: 0077705 | |
2018-07-17 11:37 |
|
Note Added: 0077706 | |
2018-07-17 11:37 |
|
Assigned To | skl => gka |
2018-07-17 11:40 | kgv | Note Added: 0077707 | |
2018-07-17 11:44 |
|
Assigned To | gka => kgv |
2018-07-17 11:44 |
|
Status | assigned => resolved |
2018-07-17 11:45 |
|
Note Added: 0077708 | |
2018-07-17 11:45 |
|
Assigned To | kgv => bugmaster |
2018-07-17 11:45 |
|
Status | resolved => reviewed |
2018-07-17 12:41 | kgv | Note Added: 0077720 | |
2018-07-17 12:41 | kgv | Assigned To | bugmaster => skl |
2018-07-17 12:41 | kgv | Status | reviewed => assigned |
2018-07-17 13:47 |
|
Note Added: 0077728 | |
2018-07-17 14:24 | git | Note Added: 0077731 | |
2018-07-17 16:46 | kgv | Note Added: 0077745 | |
2018-07-17 16:46 | kgv | Assigned To | skl => bugmaster |
2018-07-17 16:46 | kgv | Status | assigned => resolved |
2018-07-17 16:46 | kgv | Status | resolved => reviewed |
2018-07-17 18:41 | bugmaster | Note Added: 0077754 | |
2018-07-18 18:53 | bugmaster | Note Added: 0077792 | |
2018-07-18 18:53 | bugmaster | Status | reviewed => tested |
2018-07-21 18:39 | bugmaster | Changeset attached | => occt master 3388cf17 |
2018-07-21 18:39 | bugmaster | Status | tested => verified |
2018-07-21 18:39 | bugmaster | Resolution | open => fixed |
2018-07-21 20:02 | git | Note Added: 0077882 | |
2018-07-21 20:02 | git | Note Added: 0077884 | |
2020-03-04 10:23 | kgv | Relationship added | related to 0031401 |
2020-03-04 10:23 | kgv | Relationship replaced | child of 0031401 |