DataWall :

- modifiche per forature orizzontali lunghe da dividere in due parti
- corretta gestione mortasature passanti
- modifiche a nesting
- in FreeContour penna e chiodatura sempre riportate sulla superficie sopra.
This commit is contained in:
DarioS
2021-11-15 10:15:35 +01:00
parent 340f43bd01
commit d6e3cbfc26
8 changed files with 166 additions and 78 deletions
+11 -10
View File
@@ -88,11 +88,7 @@ end
function WPM.Make( Proc, nRawId, b3Raw)
-- recupero e verifico l'entità curva
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
local bForceOneSide
local bRevertSide
if AuxId then
AuxId = AuxId + Proc.Id
end
if AuxId then AuxId = AuxId + Proc.Id end
if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then
local sErr = 'Error : missing profile geometry'
EgtOutLog( sErr)
@@ -155,6 +151,8 @@ function WPM.Make( Proc, nRawId, b3Raw)
-- creo superficie chiusa
local nFlat = EgtSurfTmByFlatContour( EgtGetParent( AuxId), AuxId, 0.05)
if nFlat then
-- la superficie deve sempre essere rivolta verso l'alto
local vtNN = EgtSurfTmFacetNormVersor( nFlat, 0, GDB_ID.ROOT)
frMor, dL, dW = EgtSurfTmFacetMinAreaRectangle( nFlat, 0, GDB_ID.ROOT)
ptC = frMor:getOrigin()
vtN = frMor:getVersZ()
@@ -163,12 +161,13 @@ function WPM.Make( Proc, nRawId, b3Raw)
local bxMax = b3Aux:getMax()
local b3Mor = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, frMor)
local bxMin = b3Mor:getMin()
local dMove = bxMin:getZ()-bxMax:getZ()
local dMove = bxMin:getZ() - bxMax:getZ()
if vtNN:getZ() < 0.1 then dMove = -dMove end
-- se il percorso ausiliario è esterno al grezzo, lo riavvicino
if abs( dMove) > GEO.EPS_SMALL then
AuxId = EgtCopyGlob( AuxId, WL.GetAddGroup(nPartId))
EgtMove( AuxId, Vector3d(0,0,-dMove))
EgtMove( nFlat, Vector3d(0,0,-dMove))
AuxId = EgtCopyGlob( AuxId, WL.GetAddGroup( Proc.PartId))
EgtMove( AuxId, Vector3d( 0, 0, dMove), GDB_RT.GLOB)
EgtMove( nFlat, Vector3d( 0, 0, dMove), GDB_RT.GLOB)
frMor, dL, dW = EgtSurfTmFacetMinAreaRectangle( nFlat, 0, GDB_ID.ROOT)
ptC = frMor:getOrigin()
vtN = frMor:getVersZ()
@@ -180,6 +179,8 @@ function WPM.Make( Proc, nRawId, b3Raw)
-- scrivo info nel log
EgtOutLog( 'ptC=' .. tostring( ptC) ..' vtN=' .. tostring( vtN), 3)
-- Se mortasa chiusa
local bForceOneSide
local bRevertSide
if bClosedBtm then
-- verifico che la mortasa non sia orientata verso il basso (limite -5 deg)
if vtN:getZ() < WD.NZ_MINA then
@@ -203,7 +204,7 @@ function WPM.Make( Proc, nRawId, b3Raw)
local b3Mor = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, frMor)
local dMorH = b3Mor:getDimZ()
-- elevazione del punto centro
local _, dCenElev = WL.GetPointDirDepth( nPartId, ptC, vtN)
local _, dCenElev = WL.GetPointDirDepth( Proc.PartId, ptC, vtN)
dMorH = max( dMorH, dCenElev or 0)
-- determino larghezza della mortasa
if dL < dW then dL, dW = dW, dL end