<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - EDITING: Cannot change a polygon point to Smooth Transition (see comment 17)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=49319#c30">Comment # 30</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - EDITING: Cannot change a polygon point to Smooth Transition (see comment 17)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=49319">bug 49319</a>
from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
<pre>After some debugging on gdb, I noticed this part of bt:
#0 basegfx::getContinuity(basegfx::B2DVector const&, basegfx::B2DVector
const&) (rBackVector=..., rForwardVector=...) at
basegfx/source/vector/b2dvector.cxx:169
#1 0x00007fffec561661 in basegfx::B2DPolygon::getContinuityInPoint(unsigned
int) const (this=0x7e99400, nIndex=2) at
basegfx/source/polygon/b2dpolygon.cxx:1387
#2 0x00007ffff1be4c35 in ImplPolygon::ImplPolygon(basegfx::B2DPolygon const&)
(this=0x7ffffffeeb00, rPolygon=bezier curve basegfx::B2DPolygon = {...}) at
tools/source/generic/poly.cxx:414
0x00007ffff1beb7c9 in tools::Polygon::Polygon(basegfx::B2DPolygon const&)
(this=0x7ffffffeebb0, rPolygon=bezier curve basegfx::B2DPolygon = {...}) at
tools/source/generic/poly.cxx:1862
0x00007ffff35aec43 in XPolygon::XPolygon(basegfx::B2DPolygon const&)
(this=0x7ffffffeec50, rPolygon=bezier curve basegfx::B2DPolygon = {...}) at
svx/source/xoutdev/_xpoly.cxx:826
0x00007ffff35aef73 in XPolyPolygon::XPolyPolygon(basegfx::B2DPolyPolygon
const&) (this=0x7ffffffeed70, rPolyPolygon=open basegfx::B2DPolyPolygon with 1
sub-polygon(s) = {...})
at svx/source/xoutdev/_xpoly.cxx:855
#6 0x00007ffff3205f10 in SdrPathObj::AddToPlusHdlList(SdrHdlList&, SdrHdl&)
const (this=0x35c38c0, rHdlList=..., rHdl=...) at
svx/source/svdraw/svdopath.cxx:2006
"B2VectorContinuity::getContinuity" should return "B2VectorContinuity::C1"
but areParallel(rBackVector, rForwardVector) return false where it should
return true.
See
<a href="https://opengrok.libreoffice.org/xref/core/basegfx/source/vector/b2dvector.cxx?r=1d92933d#167">https://opengrok.libreoffice.org/xref/core/basegfx/source/vector/b2dvector.cxx?r=1d92933d#167</a>
Here are the values retrieved (std::cerr << setprecision(15) << ...):
fValA=33122.8002951872
fValB=33122.8002951847
Here's the code of b2dvector.cxx::areParallel:
118 bool areParallel( const B2DVector& rVecA, const B2DVector& rVecB )
119 {
120 const double fValA(rVecA.getX() * rVecB.getY());
121 const double fValB(rVecA.getY() * rVecB.getX());
122
123 return fTools::equal(fValA, fValB);
124 }
See
<a href="https://opengrok.libreoffice.org/xref/core/basegfx/source/vector/b2dvector.cxx?r=1d92933d#118">https://opengrok.libreoffice.org/xref/core/basegfx/source/vector/b2dvector.cxx?r=1d92933d#118</a>
Just "relaxing" a bit the equal comparison allows to return true in our case.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>