MantisBT - Community
View Issue Details
0023113Community[OCCT] OCCT:Modeling Algorithmspublic2012-04-16 17:542017-07-19 16:53
Alexander Schneller 
msv 
normaljust a question 
assignedopen 
ALL
[OCCT] 6.5.2 
 
Not needed
0023113: Incorrect use of parameter EnlargeCoeff in class GeomPlate_MakeApprox
Forum: http://www.opencascade.org/org/forum/thread_23128/?forum=3 [^]

The parameter "EnlargeCoeff" in both constructors of the class GeomPlate_MakeApprox, don't enlarge the surface in all cases.

If U or V == 0 the value remains the same
If U0 or V0 > 0 the surface is even smaller

I think the old code:

U0 = EnlargeCoeff * U0;
U1 = EnlargeCoeff * U1;
V0 = EnlargeCoeff * V0;
V1 = EnlargeCoeff * V1;

should be changed to:

UInterval = U1 - U0;
VInterval = V1 - V0;

UEnlarge = (EnlargeCoeff*UInterval - UInterval) * 0.5;
VEnlarge = (EnlargeCoeff*VInterval - VInterval) * 0.5;

if(UEnlarge < 0 ) UEnlarge = -UEnlarge;
if(VEnlarge < 0 ) VEnlarge = -VEnlarge;

U0 -= UEnlarge;
U1 += UEnlarge;

V0 -= VEnlarge;
V1 += VEnlarge;
No tags attached.
Issue History
2012-04-16 17:54Alexander SchnellerNew Issue
2012-04-16 17:54Alexander SchnellerAssigned To => jgv
2012-04-17 11:38Alexander SchnellerNote Added: 0020404
2012-04-17 11:39Alexander SchnellerNote Edited: 0020404bug_revision_view_page.php?bugnote_id=20404#r3824
2017-07-19 16:53mkvTest case number => Not needed
2017-07-19 16:53mkvAssigned Tojgv => msv
2017-07-19 16:53mkvStatusnew => assigned

Notes
(0020404)
Alexander Schneller   
2012-04-17 11:38   
(edited on: 2012-04-17 11:39)
The two lines are wrong

if(UEnlarge < 0 ) UEnlarge = -UEnlarge;
if(VEnlarge < 0 ) VEnlarge = -VEnlarge;

they must be omitted.