Commit 497f6b54 authored by Martin Schultz's avatar Martin Schultz

fixes #50

 Please enter the commit message for your changes. Lines starting
parent 6949ad71
......@@ -70,7 +70,8 @@ getPointOnMesh(PolyLineBezierSplineData* _SplineData, ACG::Vec3d _point, ACG::Ve
ACG::Vec3d nor = mesh->mesh()->normal(neigh.handle);
if(_nor)
*_nor = nor;
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt = bsp->raycollision(_point, nor);
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt;
rayInt = bsp->raycollision(_point, nor);
if(rayInt.size())
return _point + nor * rayInt[0].second;
return _point + nor.normalize() * neigh.dist;
......
......@@ -82,7 +82,8 @@ struct Onb {
bool PolyLinePlugin::createCircle_getPointOnMesh(TriMeshObject* _triMeshObject, ACG::Vec3d _center,
ACG::Vec3d _pOnPlane, ACG::Vec3d _n, ACG::Vec3d* _pOut) {
OpenMeshTriangleBSPT<TriMesh>* bsp = _triMeshObject->requestTriangleBsp();
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt = bsp->raycollision(_pOnPlane, _n);
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt;
rayInt = bsp->raycollision(_pOnPlane, _n);
if (rayInt.empty())
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment