DataBeam :
- migliorate funzioni GetNearestOrthoOpposite e GetNearestParalOpposite per casi limite.
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
-- BeamLib.lua by Egaltech s.r.l. 2022/05/18
|
||||
-- BeamLib.lua by Egaltech s.r.l. 2022/05/25
|
||||
-- Libreria globale per Travi
|
||||
-- 2020/07/28 Corretto calcolo attacchi e uscite di lame per non uscire dalla faccia sotto.
|
||||
-- 2020/08/18 Aggiunto a GetNearestParalOpposite e GetNearestOrthoOpposite parametro opzionale vtNorm.
|
||||
@@ -273,7 +273,7 @@ function BeamLib.GetNearestParalOpposite( vtRef, vtNorm)
|
||||
vtMyRef:normalize()
|
||||
end
|
||||
-- se prevalente una componente orizzontale (con piccolissimo vantaggio)
|
||||
if abs( vtMyRef:getX()) > 0.99 * abs( vtMyRef:getZ()) or abs( vtMyRef:getY()) > 0.99 * abs( vtMyRef:getZ()) then
|
||||
if abs( vtMyRef:getX()) > 0.95 * abs( vtMyRef:getZ()) or abs( vtMyRef:getY()) > 0.95 * abs( vtMyRef:getZ()) then
|
||||
if abs( vtMyRef:getX()) > abs( vtMyRef:getY()) - GEO.EPS_SMALL then
|
||||
if vtMyRef:getX() > -GEO.EPS_SMALL then
|
||||
return MCH_MILL_FU.PARAL_LEFT
|
||||
@@ -307,7 +307,7 @@ function BeamLib.GetNearestOrthoOpposite( vtRef, vtNorm)
|
||||
vtMyRef:normalize()
|
||||
end
|
||||
-- se prevalente una componente orizzontale (con piccolissimo vantaggio)
|
||||
if abs( vtMyRef:getX()) > 0.99 * abs( vtMyRef:getZ()) or abs( vtMyRef:getY()) > 0.99 * abs( vtMyRef:getZ()) then
|
||||
if abs( vtMyRef:getX()) > 0.95 * abs( vtMyRef:getZ()) or abs( vtMyRef:getY()) > 0.95 * abs( vtMyRef:getZ()) then
|
||||
-- se prevale la componente destra/sinistra (con piccolo vantaggio)
|
||||
if abs( vtMyRef:getX()) > 0.9 * abs( vtMyRef:getY()) then
|
||||
if vtMyRef:getX() > -GEO.EPS_SMALL then
|
||||
|
||||
Reference in New Issue
Block a user