View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026746 | Open CASCADE | OCCT:Modeling Algorithms | public | 2015-10-02 15:57 | 2016-04-20 15:49 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0026746: Method gp_Torus::Coefficients(...) returns incorrect value. | ||||
Description | Indeed, if set of points (X, Y, Z) constitute torus then values X, Y and Z rest on equation degree four. Theoretically, these equation must have 35 terms. However, existing method Coefficients(...) returns 31 only. | ||||
Steps To Reproduce | Test case for this issue has already been created and pushed to the CR26746 branch. | ||||
Additional information and documentation updates | General representation of the equation is: Coef(1) * X^4 + Coef(2) * Y^4 + Coef(3) * Z^4 + Coef(4) * X^3 * Y + Coef(5) * X^3 * Z + Coef(6) * Y^3 * X + Coef(7) * Y^3 * Z + Coef(8) * Z^3 * X + Coef(9) * Z^3 * Y + Coef(10) * X^2 * Y^2 + Coef(11) * X^2 * Z^2 + Coef(12) * Y^2 * Z^2 + Coef(13) * X^2 * Y * Z + Coef(14) * X * Y^2 * Z + Coef(15) * X * Y * Z^2 + Coef(16) * X^3 + Coef(17) * Y^3 + Coef(18) * Z^3 + Coef(19) * X^2 * Y + Coef(20) * X^2 * Z + Coef(21) * Y^2 * X + Coef(22) * Y^2 * Z + Coef(23) * Z^2 * X + Coef(24) * Z^2 * Y + Coef(25) * X * Y * Z + Coef(26) * X^2 + Coef(27) * Y^2 + Coef(28) * Z^2 + Coef(29) * X * Y + Coef(30) * X * Z + Coef(31) * Y * Z + Coef(32) * X + Coef(33) * Y + Coef(34) * Z + Coef(35) = 0.0 | ||||
Tags | No tags attached. | ||||
Test case number | bugs modalg_6 bug26746 | ||||
related to | 0025605 | closed | Optimize methods of gp_* classes to avoid sqrt() function calling |
|
Branch CR26746 has been created by nbv. SHA-1: 6ef43bc930900b860104f62751846c1b1b619790 Detailed log of new commits: Author: nbv Date: Fri Oct 2 16:15:50 2015 +0300 0026746: Method gp_Torus::Coefficients(...) returns incorrect value. Bug has been fixed. |
|
Branch CR26746 has been updated forcibly by nbv. SHA-1: e1136f08d9c39a470f01165560c1583d3b9d7576 |
|
Dear Mikhail, Please review the current state of CR26746 branch. Ask to pay attention to the fact that the value of aTcol1sq, aTcol2sq etc. (see gp_Torus::Coefficients(...) method in the branch) are always equal to 1 for true orthogonal transformation matrix. Analogical, value aTcol1Tcol2, aTcol1Tcol3 etc. are always equal to 0. Nevertheless, every matrix is always orthogonal really with some precision. Additional, if coefficient value is equal to 0 it is not the reason to ignore it (it is better to return 0). |
|
Branch CR26746 has been updated forcibly by nbv. SHA-1: 65e21235255bd3635698f4230648bf4dc82f77f5 |
|
Dear Igor, could you please review this patch? |
|
The base equation used for coefficients deriving seems to be wrong: 4*R*R*(r*r - Z*Z) = (X*X + Y*Y + Z*Z - R*R - r*r)^2 The correct equation is: 4*R*R*(r*r - Z*Z) = (X*X + Y*Y + Z*Z + R*R - r*r)^2 |
|
Dear Igor, Let check equation with constant parameters: Major radius is equal to 100; Minor radius is equal to 70. Then for angles \theta = \frac{\pi }{3}, \varphi = \frac{\pi }{6} we will obtain: x(\theta , \varphi ) = \frac{5\cdot {{3}^{\frac{7}{2}}}}{2}\\ y(\theta , \varphi ) = \frac{135}{2}\\ z(\theta , \varphi ) = 35\cdot \sqrt{3}. In this case, equation 4*R*R*(r*r - Z*Z) - (X*X + Y*Y + Z*Z - R*R - r*r)^2 == 0.0, equation 4*R*R*(r*r - Z*Z) - (X*X + Y*Y + Z*Z + R*R - r*r)^2 == -680000000. Therefore, my formula is correct. P.S. 1. Every formula in this message can be decoded with http://www.codecogs.com/latex/eqneditor.php 2. I have attached the file (torus.wxm) with computations in MAXIMA environment (http://andrejv.github.io/wxmaxima/). |
2015-10-09 13:16 developer |
torus.wxm (911 bytes) |
|
Sorry for mistake, Wiki is correct, its formulae is: 4*R*R*(X*X + Y*Y) = (X*X + Y*Y + Z*Z + R*R - r*r)^2 Your formulae 4*R*R*(r*r - Z*Z) = (X*X + Y*Y + Z*Z - R*R - r*r)^2 seems to be equivalent to Wiki one. |
|
Dear nbv, Please rebase branch CR26746 to the current master. Thank you in advance. |
|
Branch CR26746 has been updated forcibly by nbv. SHA-1: 6205ce8e12d1dba01dd284196eb65109c70877c4 |
|
Branch CR26746 has been rebased on the current MASTER. |
|
Dear BugMaster, Branch CR26746 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 6205ce8e12d1dba01dd284196eb65109c70877c4 Number of compiler warnings: occt component: Linux: 13 (13 on master) Windows: 0 (0 on master) products component: Linux: 39 (39 on master) Windows: 0 (0 on master) Regressions/Differences: Not detected Testing cases: bugs modalg_6 bug26746 - OK http://occt-tests/CR26746-master-occt-64/Debian70-64/bugs/modalg_6/bug26746.html http://occt-tests/CR26746-master-occt-64/Windows-64-VC10/bugs/modalg_6/bug26746.html Testing on Linux: Total MEMORY difference: 91931881 / 92516896 [-0.63%] Total CPU difference: 19471.659999999825 / 19402.610000000048 [+0.36%] Testing on Windows: Total MEMORY difference: 58089457 / 58098989 [-0.02%] Total CPU difference: 18219.247589298928 / 18016.040686698903 [+1.13%] |
|
Branch CR26746 has been deleted by kgv. SHA-1: 6205ce8e12d1dba01dd284196eb65109c70877c4 |
occt: master 0b4abfb9 2015-10-09 14:48:36
Committer: bugmaster Details Diff |
0026746: Method gp_Torus::Coefficients(...) returns incorrect value. Bug has been fixed. Test case for this issue has been created (with corresponding DRAW-command). |
Affected Issues 0026746 |
|
mod - src/gp/gp_Torus.cxx | Diff File | ||
mod - src/gp/gp_Torus.hxx | Diff File | ||
mod - src/QABugs/QABugs_19.cxx | Diff File | ||
add - tests/bugs/modalg_6/bug26746 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-10-02 15:57 |
|
New Issue | |
2015-10-02 15:57 |
|
Assigned To | => msv |
2015-10-02 16:13 |
|
Status | new => assigned |
2015-10-02 16:16 | git | Note Added: 0046407 | |
2015-10-02 16:25 | git | Note Added: 0046410 | |
2015-10-02 16:40 |
|
Note Added: 0046412 | |
2015-10-02 16:40 |
|
Status | assigned => resolved |
2015-10-02 16:40 |
|
Steps to Reproduce Updated | |
2015-10-02 17:43 |
|
Relationship added | related to 0025605 |
2015-10-05 09:53 | git | Note Added: 0046438 | |
2015-10-07 15:34 |
|
Note Added: 0046565 | |
2015-10-07 15:34 |
|
Assigned To | msv => ifv |
2015-10-09 11:41 |
|
Note Added: 0046619 | |
2015-10-09 11:41 |
|
Assigned To | ifv => nbv |
2015-10-09 11:41 |
|
Status | resolved => feedback |
2015-10-09 13:15 |
|
Note Added: 0046621 | |
2015-10-09 13:16 |
|
File Added: torus.wxm | |
2015-10-09 13:18 |
|
Note Edited: 0046621 | |
2015-10-09 13:23 |
|
Assigned To | nbv => ifv |
2015-10-09 14:23 |
|
Note Added: 0046624 | |
2015-10-09 14:23 |
|
Assigned To | ifv => bugmaster |
2015-10-09 14:23 |
|
Status | feedback => reviewed |
2015-10-09 14:28 |
|
Note Edited: 0046621 | |
2015-10-09 15:53 |
|
Assigned To | bugmaster => apv |
2015-10-09 16:44 |
|
Note Added: 0046636 | |
2015-10-09 16:44 |
|
Assigned To | apv => nbv |
2015-10-09 16:44 |
|
Status | reviewed => feedback |
2015-10-09 17:49 | git | Note Added: 0046638 | |
2015-10-09 17:49 |
|
Assigned To | nbv => apv |
2015-10-09 17:50 |
|
Note Added: 0046639 | |
2015-10-09 17:50 |
|
Assigned To | apv => msv |
2015-10-09 17:50 |
|
Status | feedback => resolved |
2015-10-09 17:50 |
|
Assigned To | msv => bugmaster |
2015-10-09 17:50 |
|
Status | resolved => reviewed |
2015-10-09 17:54 |
|
Assigned To | bugmaster => apv |
2015-10-12 15:48 |
|
Test case number | => bugs modalg_6 bug26746 |
2015-10-12 16:30 |
|
Note Added: 0046680 | |
2015-10-12 16:30 |
|
Assigned To | apv => bugmaster |
2015-10-12 16:30 |
|
Status | reviewed => tested |
2015-10-16 13:18 | bugmaster | Changeset attached | => occt master 0b4abfb9 |
2015-10-16 13:18 | bugmaster | Status | tested => verified |
2015-10-16 13:18 | bugmaster | Resolution | open => fixed |
2015-10-16 17:02 | git | Note Added: 0047122 | |
2016-04-20 15:44 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:49 |
|
Status | verified => closed |