MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030911Open CASCADE[OCCT] OCCT:Visualizationpublic2019-08-22 08:342019-09-04 16:22
Reporternds 
Assigned Tonds 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 6.7.0 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0030911: Visualization - Font_BRepFont using as a usual Standard_Transient
DescriptionIn a custom development we have some text manager, which decides what font should be used depending on the application option. It is either Font_FTFont or Font_BRepFont.

We have limitations in using Font_BRepFont:
- it has a protected inheritance of Font_FTFont(Standard_Transient), so is not possible to have it as a handle. So, we may not have one pointer to type and do cast to one or another type.
- there is no implementation FindAndCreate for it.

It's proposed to make it public inherited class of Font_FTFont and implement create method.
TagsNo tags attached.
Test case number
Attached Files

- Relationships
child of 0024181closedbugmaster Text to BRep functionality 

-  Notes
(0086394)
git (administrator)
2019-08-22 08:36

Branch CR30911 has been created by nds.

SHA-1: a84e833bb035b7ba7440b539d39fde73b359faa3


Detailed log of new commits:

Author: nds
Date: Thu Aug 22 08:33:14 2019 +0300

    0030911: Visualization - Font_BRepFont using as a usual Standard_Transient
(0086399)
kgv (developer)
2019-08-22 10:03

-class Font_BRepFont : protected Font_FTFont
+class Font_BRepFont : public Font_FTFont

The purpose of protected inheritance here is hiding visibility of Font_FTFont methods, which should not be used by Font_BRepFont users to avoid getting unexpected results.

If this leads to making a Handle of Font_BRepFont, then this should be either fixed by adding visibility to necessary methods (preserving "protected Font_FTFont") or by hiding visibility of most Font_FTFont methods (changing to "public Font_FTFont")/
(0086410)
git (administrator)
2019-08-22 12:27

Branch CR30911_1 has been created by nds.

SHA-1: 7c7433abcc8308db4179b0d9bc45ccf111dc7618


Detailed log of new commits:

Author: nds
Date: Thu Aug 22 12:24:26 2019 +0300

    0030911: Visualization - Font_BRepFont using as a usual Standard_Transient
(0086412)
nds (developer)
2019-08-22 12:34

Dear Kirill,

please have a look at proposed modifications. What is your opinion, might it be useful in OCCT?

The modifications has additionally API change of Font_BRepFont:
recommendation of using FindAndCreate instead of own FindAndInit.

This is not obligate modification, but seems to be more universal way of both kind of font creation and reusing. (FindAndInit was introduced recently within #30663)
(0086738)
kgv (developer)
2019-09-04 16:21
edited on: 2019-09-04 16:22

I don't have any objections allowing to use Handle(Font_BRepFont), but as discussed - protected inheritance should not be simply removed since it was done for hiding base class API intentionally.

There might be no reason forcing usage of Handle(Font_BRepFont) in existing code, although the change shouldn't affect performance, since Font_BRepFont is quite a heavy object.


- Issue History
Date Modified Username Field Change
2019-08-22 08:34 nds New Issue
2019-08-22 08:34 nds Assigned To => kgv
2019-08-22 08:36 git Note Added: 0086394
2019-08-22 10:03 kgv Note Added: 0086399
2019-08-22 12:27 git Note Added: 0086410
2019-08-22 12:34 nds Note Added: 0086412
2019-09-04 16:18 kgv Assigned To kgv => nds
2019-09-04 16:18 kgv Product Version => 7.3.0
2019-09-04 16:18 kgv Target Version 7.4.0 => 7.5.0*
2019-09-04 16:19 kgv Relationship added child of 0024181
2019-09-04 16:19 kgv Product Version 7.3.0 => 6.7.0
2019-09-04 16:21 kgv Note Added: 0086738
2019-09-04 16:22 kgv Note Edited: 0086738 View Revisions


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker