- in PreSimulationLib aggiunta funzione CheckOutOfStrokeFromGeometry, refactoring da STR0001
This commit is contained in:
@@ -234,6 +234,36 @@ function PreSimulationLib.CheckOutOfStroke( PointsOnToolTipCenter, vtHead, nSCC,
|
||||
return false
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- check extracorsa da geometria
|
||||
function PreSimulationLib.CheckOutOfStrokeFromGeometry( idGeometry, Proc, nSCC, Tool)
|
||||
|
||||
local b3GeomMaxOffset = EgtGetBBoxGlob( idGeometry, GDB_BB.STANDARD)
|
||||
local ptBoxCenter = b3GeomMaxOffset:getCenter()
|
||||
local dBoxDimX = b3GeomMaxOffset:getDimX()
|
||||
local dBoxDimY = b3GeomMaxOffset:getDimY()
|
||||
local dBoxDimZ = b3GeomMaxOffset:getDimZ()
|
||||
|
||||
-- si controlla il finecorsa nei punti al centro delle 6 facce del box
|
||||
local PointsOnToolTipCenter = {}
|
||||
-- X+
|
||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter + dBoxDimX / 2 * X_AX()))
|
||||
-- X-
|
||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter - dBoxDimX / 2 * X_AX()))
|
||||
-- Y+
|
||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter + dBoxDimY / 2 * Y_AX()))
|
||||
-- Y-
|
||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter - dBoxDimY / 2 * Y_AX()))
|
||||
-- Z+
|
||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter + dBoxDimZ / 2 * Z_AX()))
|
||||
-- Z-
|
||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter - dBoxDimZ / 2 * Z_AX()))
|
||||
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStroke( PointsOnToolTipCenter, Proc.FeatureInfo.vtTenonN, nSCC, Tool)
|
||||
|
||||
return bOutOfStroke
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function CheckCollisionPoint( ptToolExitToCheck, vtC, vtHead, PreCollisionData, Part, bCheckOnlyRestlength)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user