- in FACEBYBLADE correzioni a chiamata Cutting.nToolIndex
- in MachiningLib.Check2DBladeCollision ora si controlla correttamente se c'è intersezione
This commit is contained in:
@@ -320,6 +320,7 @@ local function Check2DBladeCollision( Edge, vtNFace, vtHead, Part, Tool, dDepthT
|
||||
ptMaxElev = ptMaxElev + vtNFace * Tool.dThickness
|
||||
end
|
||||
-- TODO qui sostituire con il valore reale letto dal SetupInfo
|
||||
-- per Fast si dovrà aggiungere la lunghezza del massimo utensile utilizzabile con lama
|
||||
local dHeadDepth = 480
|
||||
local dHeadWidth = 480
|
||||
local ptOpposite = ptMaxElev + Edge.vtN * dHeadWidth
|
||||
@@ -328,12 +329,19 @@ local function Check2DBladeCollision( Edge, vtNFace, vtHead, Part, Tool, dDepthT
|
||||
-- flat region dal rettangolo
|
||||
local idHeadSurfFr = EgtSurfFlatRegion( idTempGroup, idHeadRectangle)
|
||||
|
||||
-- intersezione
|
||||
--local idTestSurfFr = EgtCopyGlob( idPartSurfFr, idTempGroup)
|
||||
-- TODO ritornare correttamente
|
||||
local bCollisionFound = EgtSurfFrIntersect( idPartSurfFr, idHeadSurfFr)
|
||||
-- intersezione (se fallisce si inverte la flat region del motore, probabile normale opposta)
|
||||
local bIntersectSuccess = EgtSurfFrIntersect( idPartSurfFr, idHeadSurfFr)
|
||||
if not bIntersectSuccess then
|
||||
EgtInvertSurf( idHeadSurfFr)
|
||||
bIntersectSuccess = EgtSurfFrIntersect( idPartSurfFr, idHeadSurfFr)
|
||||
end
|
||||
if not bIntersectSuccess then
|
||||
error( 'Check2DBladeCollision : intersect fail')
|
||||
end
|
||||
|
||||
return false
|
||||
local bCollisionFound = EgtExistsObj( idPartSurfFr)
|
||||
|
||||
return bCollisionFound
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user