View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023762 | Open CASCADE | OCCT:Foundation Classes | public | 2013-02-14 10:59 | 2021-10-21 20:01 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | tweak | ||
Status | closed | Resolution | no change required | ||
Platform | A | OS | L | ||
Product Version | 6.5.4 | ||||
Target Version | 7.6.0 | ||||
Summary | 0023762: Way of getting normals from Poly_Triangulation is inconvenient | ||||
Description | The current implementation of Poly_Triangulation::Normals() looks heavy and inconvenient:const TShort_Array1OfShortReal& Poly_Triangulation::Normals() const { if(myNormals.IsNull() || myNormals->Length() != 3*myNbNodes) { Standard_NullObject::Raise("Poly_Triangulation::Normals : " "wrong length or null array"); } return myNormals->Array1(); } 1. Why return a const reference to the internal array instead of returning myNormals directly? 2. Throwing an exception in case if normals data is not available requires special tricks or code duplication in order to write the conditional code that works both when normals are present and when they are not. 3. What is the purpose of Poly_Triangulation::ChangeNormals()? Why provide access to internal array of myNormals instead of simply returning myNormals itself and letting the applications decide what to do with it? It is proposed to return myNormals in Poly_Trinagulation::Normals() and remove consistency checks leaving them to the applications that can e.g. use Poly_Triangulation::HasNormals() for this purpose. Poly_Trinagulation::ChangeNormals() is most likely to be removed, too. Normals() and SetNormals() methods seem sufficient. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
#0026007 introduced Poly_Triangulation::Normal()/Poly_Triangulation::SetNormal() methods for accessing per-vertex normal values, and 0032133 deprecated access to internal array of normals (as well as to other internal arrays). Therefore, I propose closing this issues. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-14 10:59 |
|
New Issue | |
2013-02-14 10:59 |
|
Assigned To | => abv |
2014-09-12 14:43 |
|
Target Version | => 7.1.0 |
2016-11-01 06:41 |
|
Target Version | 7.1.0 => 7.2.0 |
2016-11-01 10:14 | kgv | Relationship added | related to 0025936 |
2017-07-27 11:17 |
|
Target Version | 7.2.0 => 7.4.0 |
2019-07-10 22:29 |
|
Target Version | 7.4.0 => 7.5.0 |
2020-09-11 16:13 |
|
Target Version | 7.5.0 => 7.6.0 |
2020-12-14 12:51 | kgv | Description Updated | |
2021-09-20 10:28 | kgv | Relationship added | related to 0032133 |
2021-09-20 10:35 | kgv | Note Added: 0104225 | |
2021-09-20 10:35 | kgv | Assigned To | abv => bugmaster |
2021-09-20 10:35 | kgv | Status | new => feedback |
2021-09-20 10:35 | kgv | Resolution | open => no change required |
2021-10-21 20:01 | bugmaster | Status | feedback => closed |