#### View Issue Details

ID Project Category View Status Date Submitted Last Update 0026747 Open CASCADE OCCT:Modeling Algorithms public 2015-10-02 17:03 2016-12-09 16:37 nbv bugmaster low tweak closed fixed 7.1.0 7.1.0 0026747: Some constructors of gp_Parab2d class contain redundant parameters According to the theory, parabola is set by its directrix (is a simple line, not a vector) and focus point. The distances from every point of the parabola to the directrix and to the focus point are equal. The distance from the directrix to the focus point is equal to two focal length or to parameter of parabola. At that, there is a rule to direct X-axis (symmetry-axis) of local coordinate system (UCS) from the directrix to the focus point. Y-axis is always parallel to the directrix. In this case, every point of parabola is satisfied to the equation (in UCS) y(x)^2 = 2*p*x, where p is parameter of parabola. Now, let consider existing constructors: 1. gp_Parab2d(const gp_Ax2d& D, const gp_Pnt2d& F, const Standard_Boolean Sense = Standard_True); I do not understand, what should be the result of this constructor. Directrix D is directed line (has gp_Ax2d type). Does it mean that the direction of Y-axe should correspond to this direction? If it is not and the directrix direction is excess parameter then why we do not use gp_Lin2d class for directrix (indeed, line has direction, but it is its internal value as distinct from vector). Otherwise (if Y-direction correspond to the direction of the directrix, i.e. is defined), X-direction is defined by the directrix and the focus point (see above). Then, what is the role of "Sense" parameter? I cannot answer. 2. Constructor gp_Parab2d(const gp_Ax22d& D, const gp_Pnt2d& F). We have analogical situation here: gp_Ax22d class sets full coordinate system XOY. Additionally, we need in focal-length only (which must be laid in positive direction of the X-axis). Why do we use focus point? More over, what kind of parabola should we obtain if the focus point does not lie in the X-axis? I cannot answer. P.S. Results of parabola creation for some constructor seems to be wrong. See Steps To Reproduce. Test cases have been created and pushed to the branch.           Parabola 1 (see parab1.png): // On the current MASTER, we have empty-parabola and exception in Debug-mode. GCE2d_MakeParabola aPrb(gp_Ax2d(gp_Pnt2d(0.0, 3.0), gp_Dir2d(0.0, 1.0)), gp_Pnt2d(1.0, 3.0));           Parabola 2 (see parab2.png): // Left-handed coordinate system is used (Sense = Standard_False). // However, the parabola is oriented as when right-handed coordinate system is used. // More over, the parabola intersects its directrix. It is good, if and only if // the focal length is equal to zero. But aPrb.Value()->Parab2d().Focal() returns 1.5 (on the current MASTER). GCE2d_MakeParabola aPrb(gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(0.0, 1.0)), gp_Pnt2d(-1.0, 3.0), Standard_False);           Parabola 3 (see parab3.png): // Focus point lies in the directrix. Consequently, focal length is really equal to zero. // But aPrb.Value()->Parab2d().Focal() returns 1.5 (on the current MASTER). GCE2d_MakeParabola aPrb(gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(0.0, 1.0)), gp_Pnt2d(0.0, 3.0), Standard_False); All changes have been documented in dox/dev_guides/upgrade/upgrade.md file. No tags attached. bugs modalg_6 bug26747_1, bug26747_2, bug26747_3

#### Attached Files

 parab1.png (10,421 bytes) parab2.png (10,633 bytes) parab3.png (10,685 bytes)

#### Relationships

 related to 0025605 closed msv Optimize methods of gp_* classes to avoid sqrt() function calling

#### Related Changesets

 occt: master c1609fbe 2016-04-11 08:12:45 nbv Committer: bugmaster 0026747: Some constructors of gp_Parab2d class contain redundant parameters 1. Useless constructors have been deleted. 2. Value returned by gp_Parab2d::Directrix() method has been corrected to exclude reversing the directrix. 3. Documentation of gp_Parab2d class has been updated (in hxx-file). 4. Upgrade Guide has been updated according to corrections made in this issue. Creation of test cases for this issue. Affected Issues0026747 mod - dox/dev_guides/upgrade/upgrade.md mod - src/gce/gce_MakeParab2d.cxx mod - src/gce/gce_MakeParab2d.hxx mod - src/GCE2d/GCE2d_MakeParabola.cxx mod - src/GCE2d/GCE2d_MakeParabola.hxx mod - src/gp/gp_Parab2d.cxx mod - src/gp/gp_Parab2d.hxx mod - src/gp/gp_Parab2d.lxx mod - src/QABugs/QABugs_20.cxx add - tests/bugs/modalg_6/bug26747_1 add - tests/bugs/modalg_6/bug26747_2 add - tests/bugs/modalg_6/bug26747_3

#### Issue History

2015-10-02 17:03 nbv New Issue
2015-10-02 17:03 nbv Assigned To => msv
2015-10-02 17:03 nbv File Added: parab1.png
2015-10-02 17:03 nbv File Added: parab2.png
2015-10-02 17:11 nbv Note Added: 0046413
2015-10-02 17:11 nbv Status new => feedback
2015-10-02 17:43 nbv Relationship added related to 0025605
2015-10-07 15:39 msv Note Added: 0046567
2015-10-07 15:39 msv Assigned To msv => ifv
2015-10-12 10:07 ifv Assigned To ifv => msv
2015-10-12 10:10 ifv Note Added: 0046665
2015-10-12 10:22 msv Note Added: 0046667
2015-10-12 10:22 msv Assigned To msv => nbv
2015-10-12 10:22 msv Status feedback => assigned
2015-10-28 10:50 msv Target Version 7.0.0 => 7.1.0
2016-04-11 15:12 git Note Added: 0052571
2016-04-11 15:13 nbv Note Added: 0052572
2016-04-11 15:13 nbv Assigned To nbv => msv
2016-04-11 15:13 nbv Status assigned => resolved
2016-04-11 15:13 nbv Steps to Reproduce Updated
2016-04-12 06:20 abv Note Added: 0052594
2016-04-12 10:07 git Note Added: 0052595
2016-04-12 10:08 nbv Note Added: 0052596
2016-04-26 10:09 git Note Added: 0053571
2016-04-26 10:10 nbv Note Added: 0053572
2016-04-28 15:26 msv Note Added: 0053683
2016-04-28 15:26 msv Assigned To msv => nbv
2016-04-28 15:26 msv Status resolved => assigned
2016-04-28 15:51 git Note Added: 0053684
2016-04-28 15:52 nbv Note Added: 0053685
2016-04-28 15:52 nbv Assigned To nbv => msv
2016-04-28 15:52 nbv Status assigned => resolved
2016-04-28 16:47 msv Note Added: 0053693
2016-04-28 16:47 msv Assigned To msv => nbv
2016-04-28 16:47 msv Status resolved => assigned
2016-04-28 16:47 msv Priority normal => low
2016-05-04 16:20 git Note Added: 0053813
2016-05-04 16:21 nbv Note Added: 0053814
2016-05-04 16:21 nbv Assigned To nbv => msv
2016-05-04 16:21 nbv Status assigned => resolved
2016-05-25 16:18 msv Note Added: 0054402
2016-05-25 16:18 msv Assigned To msv => nbv
2016-05-25 16:18 msv Status resolved => assigned
2016-05-25 16:52 git Note Added: 0054406
2016-05-25 16:55 nbv Note Added: 0054407
2016-05-25 16:55 nbv Assigned To nbv => msv
2016-05-25 16:55 nbv Status assigned => resolved
2016-05-25 19:44 msv Note Added: 0054417
2016-05-25 19:44 msv Assigned To msv => bugmaster
2016-05-25 19:44 msv Status resolved => reviewed
2016-05-26 15:31 mkv Assigned To bugmaster => mkv
2016-05-26 15:32 mkv Note Added: 0054450
2016-05-26 15:32 mkv Assigned To mkv => nbv
2016-05-26 15:32 mkv Status reviewed => feedback
2016-05-26 16:13 git Note Added: 0054453
2016-05-26 16:14 nbv Assigned To nbv => mkv
2016-05-26 16:14 nbv Note Added: 0054454
2016-05-26 16:28 mkv Status feedback => reviewed
2016-05-27 13:12 mkv Note Added: 0054490
2016-05-27 13:12 mkv Note Added: 0054491
2016-05-27 13:12 mkv Assigned To mkv => bugmaster
2016-05-27 13:12 mkv Status reviewed => tested
2016-05-27 13:13 mkv Test case number => bugs modalg_6 bug26747_1, bug26747_2, bug26747_3
2016-06-02 14:22 abv Note Added: 0054630
2016-06-02 14:22 abv Assigned To bugmaster => nbv
2016-06-02 14:22 abv Status tested => assigned
2016-06-02 16:41 nbv Summary Some constructors of gp_Parab2d classes have not understandable interface and create wrong parabola => Some constructors of gp_Parab2d class contain redundant parameters
2016-06-02 16:41 nbv Description Updated
2016-06-02 16:41 nbv Steps to Reproduce Updated
2016-06-02 16:54 nbv File Deleted: parab1.png
2016-06-02 16:54 nbv File Deleted: parab2.png
2016-06-02 16:54 nbv File Added: parab1.png
2016-06-02 16:54 nbv File Added: parab2.png
2016-06-02 16:55 nbv File Added: parab3.png
2016-06-02 17:31 nbv Description Updated
2016-06-02 17:31 git Note Added: 0054646
2016-06-02 17:33 nbv Additional Information Updated
2016-06-02 17:35 nbv Note Added: 0054647
2016-06-02 17:35 nbv Assigned To nbv => abv
2016-06-02 17:35 nbv Status assigned => resolved
2016-06-02 17:59 git Note Added: 0054651
2016-06-02 18:09 abv Note Added: 0054652
2016-06-02 18:09 abv Assigned To abv => bugmaster
2016-06-02 18:09 abv Status resolved => reviewed
2016-06-03 09:21 nbv Note Added: 0054657
2016-06-03 09:21 nbv Description Updated
2016-06-03 13:21 mkv Assigned To bugmaster => mkv
2016-06-03 13:41 git Note Added: 0054682
2016-06-06 18:57 mkv Note Added: 0054741
2016-06-06 18:57 mkv Note Added: 0054742
2016-06-06 18:57 mkv Note Added: 0054743
2016-06-06 18:57 mkv Assigned To mkv => bugmaster
2016-06-06 18:57 mkv Status reviewed => tested
2016-06-10 13:12 bugmaster Changeset attached => occt master c1609fbe
2016-06-10 13:12 bugmaster Status tested => verified
2016-06-10 13:12 bugmaster Resolution open => fixed
2016-06-17 12:14 git Note Added: 0055151
2016-06-17 12:14 git Note Added: 0055153
2016-06-17 12:14 git Note Added: 0055155
2016-06-17 12:14 git Note Added: 0055156
2016-06-17 12:14 git Note Added: 0055158
2016-06-17 12:14 git Note Added: 0055159
2016-12-09 16:31 aiv Status verified => closed
2016-12-09 16:37 aiv Fixed in Version => 7.1.0