- modificate STR0002 e FaceData per lavorare facce tunnel per Bevel-1-Through con vtNY o vtNZ = 0
This commit is contained in:
+18
-3
@@ -228,15 +228,27 @@ end
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- TODO valutare refactoring per mettere i calcoli del tunnel in una funzione
|
||||
-- TODO creare le facce tunnel solo se non ci sono già. Verirficare all'inizio se già presente in AddGrpId e nel caso riferire all'id di quella esistente e ricalcolare solo le informazioni della faccia.
|
||||
-- TODO test iniziale replicato in GetMainFaces
|
||||
local function GetTunnelFaces( Proc, Part)
|
||||
local TunnelAddedFaces = {}
|
||||
|
||||
if not ( Proc.Topology.bIsThrough and Proc.Topology.bAllRightAngles and Proc.nFct < 5) then
|
||||
if not ( ( Proc.Topology.bIsThrough and Proc.Topology.bAllRightAngles and Proc.nFct < 5)
|
||||
or ( Proc.Topology.sName == 'Bevel-1-Through' and ( abs( Proc.Faces[1].vtN:getY()) < GEO.EPS_SMALL or abs( Proc.Faces[1].vtN:getZ()) < GEO.EPS_SMALL))) then
|
||||
|
||||
error( 'GetTunnelFaces : Topology not implemented')
|
||||
end
|
||||
|
||||
-- direzione del tunnel
|
||||
local vtTunnelDirection = Proc.Faces[1].vtN ^ Proc.Faces[ Proc.Faces[1].Adjacencies[1] + 1].vtN
|
||||
local vtTunnelDirection = V_NULL()
|
||||
if Proc.nFct == 1 then
|
||||
if Proc.Faces[1].vtN:getY() < GEO.EPS_SMALL then
|
||||
vtTunnelDirection = Y_AX()
|
||||
else
|
||||
vtTunnelDirection = Z_AX()
|
||||
end
|
||||
else
|
||||
vtTunnelDirection = Proc.Faces[1].vtN ^ Proc.Faces[ Proc.Faces[1].Adjacencies[1] + 1].vtN
|
||||
end
|
||||
|
||||
-- centro del tunnel
|
||||
local frTunnel = Frame3d( Proc.Faces[1].ptCenter, vtTunnelDirection)
|
||||
@@ -561,6 +573,7 @@ end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- recupero facce principali della feature, in base alla topologia
|
||||
-- TODO test iniziale replicato in GetTunnelFaces
|
||||
function FaceData.GetMainFaces( Proc, Part)
|
||||
|
||||
EgtOutLog( '---MainFaces START---')
|
||||
@@ -571,7 +584,9 @@ function FaceData.GetMainFaces( Proc, Part)
|
||||
Proc.Topology.sFamily == 'Pocket' or Proc.Topology.sFamily == 'Tunnel' or Proc.Topology.sFamily == 'Bevel' or
|
||||
Proc.Topology.sFamily == 'DoubleBevel' or Proc.Topology.sFamily == 'Cut' then
|
||||
|
||||
if Proc.Topology.bIsThrough and Proc.Topology.bAllRightAngles and Proc.nFct < 5 then
|
||||
if ( Proc.Topology.bIsThrough and Proc.Topology.bAllRightAngles and Proc.nFct < 5)
|
||||
or ( Proc.Topology.sName == 'Bevel-1-Through' and ( abs( Proc.Faces[1].vtN:getY()) < GEO.EPS_SMALL or abs( Proc.Faces[1].vtN:getZ()) < GEO.EPS_SMALL)) then
|
||||
|
||||
MainFaces.TunnelAddedFaces = GetTunnelFaces( Proc, Part)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user