- in BeamLib aggiunta funzione GetNearestParalOpposite da automatismo vecchio
- in STR0003 abilitata sega a catena e parziale refactoring
This commit is contained in:
@@ -211,6 +211,40 @@ function BeamLib.GetNearestOrthoOpposite( vtRef, vtNorm)
|
||||
return nil
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function BeamLib.GetNearestParalOpposite( vtRef, vtNorm)
|
||||
-- se definita anche la normale alla faccia, elimino la parte di vtRef parallela a questa
|
||||
local vtMyRef = Vector3d( vtRef)
|
||||
if vtNorm then
|
||||
vtMyRef = vtMyRef - ( vtMyRef * vtNorm) * vtNorm
|
||||
vtMyRef:normalize()
|
||||
end
|
||||
-- se prevalente una componente orizzontale (con piccolissimo vantaggio)
|
||||
if abs( vtMyRef:getX()) > 0.95 * abs( vtMyRef:getZ()) or abs( vtMyRef:getY()) > 0.95 * abs( vtMyRef:getZ()) then
|
||||
if abs( vtMyRef:getX()) > 0.95 * abs( vtMyRef:getY()) then
|
||||
if vtMyRef:getX() > -GEO.EPS_SMALL then
|
||||
return MCH_MILL_FU.PARAL_LEFT
|
||||
else
|
||||
return MCH_MILL_FU.PARAL_RIGHT
|
||||
end
|
||||
else
|
||||
if vtMyRef:getY() > -GEO.EPS_SMALL then
|
||||
return MCH_MILL_FU.PARAL_FRONT
|
||||
else
|
||||
return MCH_MILL_FU.PARAL_BACK
|
||||
end
|
||||
end
|
||||
-- altrimenti prevale la verticale
|
||||
else
|
||||
if vtMyRef:getZ() > -GEO.EPS_SMALL then
|
||||
return MCH_MILL_FU.PARAL_DOWN
|
||||
else
|
||||
return MCH_MILL_FU.PARAL_TOP
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Funzione per determinare se la faccia ha lati molto corti (trascurabili) ed è quindi approssimabile ad una 3 facce
|
||||
function BeamLib.Is3EdgesApprox( Proc, idFace, nAddGrpId)
|
||||
|
||||
Reference in New Issue
Block a user