- varie modifiche ai tagli di lama per DownUp, caso solo 2d
- in FaceData.GetEdgesInfo si scrivono anche i ptStart e ptEnd; IsFaceRhomboid diventa IsFaceParallelogram - in BeamLib aggiunta IsEdgeOnBox
This commit is contained in:
+42
-4
@@ -793,13 +793,13 @@ function BeamLib.GetPlaneOrientation( vtN)
|
||||
|
||||
-- modulo della proiezione in ogni piano
|
||||
local Orientation = {
|
||||
{ sPlane = "XY", dMagnitude = sqrt( x^2 + y^2)},
|
||||
{ sPlane = "XZ", dMagnitude = sqrt( x^2 + z^2)},
|
||||
{ sPlane = "YZ", dMagnitude = sqrt( y^2 + z^2)}
|
||||
{ sPlane = "XY", dMagnitude = EgtClamp( sqrt( x^2 + y^2), 0, 1)},
|
||||
{ sPlane = "XZ", dMagnitude = EgtClamp( sqrt( x^2 + z^2), 0, 1)},
|
||||
{ sPlane = "YZ", dMagnitude = EgtClamp( sqrt( y^2 + z^2), 0, 1)}
|
||||
}
|
||||
|
||||
-- modulo totale in 3d
|
||||
local dTotalMagnitude = sqrt( x^2 + y^2 + z^2)
|
||||
local dTotalMagnitude = EgtClamp( sqrt( x^2 + y^2 + z^2), 0, 1)
|
||||
|
||||
-- incidenza del modulo in ogni piano
|
||||
for i = 1, #Orientation do
|
||||
@@ -818,6 +818,44 @@ function BeamLib.GetPlaneOrientation( vtN)
|
||||
return Orientation
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function BeamLib.IsEdgeOnBox( Face, Edge, b3Box)
|
||||
-- TODO sostituire con informazioni direttamente da box e rimuuovere il parametro Face
|
||||
local ptEdge1, _, ptEdge2 = EgtSurfTmFacetOppositeSide( Face.idTrimesh, Face.id, -Edge.vtN, GDB_ID.ROOT)
|
||||
|
||||
-- il lato è sul box se i suoi estremi sono entrambi sullo stesso lato del box
|
||||
if ptEdge1:getZ() > b3Box:getMax():getZ() - 500 * GEO.EPS_SMALL
|
||||
and ptEdge2:getZ() > b3Box:getMax():getZ() - 500 * GEO.EPS_SMALL then
|
||||
|
||||
return true
|
||||
end
|
||||
if ptEdge1:getZ() > b3Box:getMin():getZ() - 500 * GEO.EPS_SMALL
|
||||
and ptEdge2:getZ() > b3Box:getMin():getZ() - 500 * GEO.EPS_SMALL then
|
||||
|
||||
return true
|
||||
end
|
||||
if ptEdge1:getY() > b3Box:getMax():getY() - 500 * GEO.EPS_SMALL
|
||||
and ptEdge2:getY() > b3Box:getMax():getY() - 500 * GEO.EPS_SMALL then
|
||||
|
||||
return true
|
||||
end
|
||||
if ptEdge1:getY() > b3Box:getMin():getY() - 500 * GEO.EPS_SMALL
|
||||
and ptEdge2:getY() > b3Box:getMin():getY() - 500 * GEO.EPS_SMALL then
|
||||
|
||||
return true
|
||||
end
|
||||
if ptEdge1:getX() > b3Box:getMax():getX() - 500 * GEO.EPS_SMALL
|
||||
and ptEdge2:getX() > b3Box:getMax():getX() - 500 * GEO.EPS_SMALL then
|
||||
|
||||
return true
|
||||
end
|
||||
if ptEdge1:getX() > b3Box:getMin():getX() - 500 * GEO.EPS_SMALL
|
||||
and ptEdge2:getX() > b3Box:getMin():getX() - 500 * GEO.EPS_SMALL then
|
||||
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- nNearSide : 3=Z+, -3=Z-
|
||||
function BeamLib.PutStartNearestToEdge( nCrvId, b3Raw, dMaxDist, nNearSide)
|
||||
|
||||
Reference in New Issue
Block a user