3dPrinting :
- aggiunto slicing a 45° lungo Y.
This commit is contained in:
@@ -143,8 +143,9 @@ KEY_HAS_SOLIDS = "Solids"
|
||||
|
||||
SLICING_TYPE = {
|
||||
VERTICAL = 1,
|
||||
DEG45 = 2,
|
||||
HORIZONTAL = 3,
|
||||
DEG45_X = 2,
|
||||
DEG45_Y = 3,
|
||||
HORIZONTAL = 4,
|
||||
}
|
||||
|
||||
TYPE = {
|
||||
|
||||
@@ -282,8 +282,10 @@ function CalcSlices.Exec( nPartId, nStmId, HMax)
|
||||
local nSlicingType = EgtGetInfo( s_nPartId, KEY_SLICING_TYPE, 'i')
|
||||
if nSlicingType == SLICING_TYPE.HORIZONTAL then
|
||||
vtSlicing = X_AX()
|
||||
elseif nSlicingType == SLICING_TYPE.DEG45 then
|
||||
elseif nSlicingType == SLICING_TYPE.DEG45_X then
|
||||
vtSlicing = VectorFromSpherical( 1, 45, 0)
|
||||
elseif nSlicingType == SLICING_TYPE.DEG45_Y then
|
||||
vtSlicing = VectorFromSpherical( 1, 45, 90)
|
||||
end
|
||||
|
||||
EgtSetInfo( s_nPartId, KEY_SLICING_DIR, vtSlicing)
|
||||
|
||||
@@ -961,7 +961,7 @@ local function SpiralVase( vLayIds, dCorrZ, LayerParams)
|
||||
local nSlicingType = EgtGetInfo( s_nPartId, KEY_SLICING_TYPE, 'i')
|
||||
|
||||
-- copio ultimo layer
|
||||
if nSlicingType ~= SLICING_TYPE.DEG45 then
|
||||
if nSlicingType ~= SLICING_TYPE.DEG45_X and nSlicingType ~= SLICING_TYPE.DEG45_Y then
|
||||
local nNewLay = EgtCopyGlob( vLayIds[#vLayIds], vLayIds[#vLayIds], GDB_IN.AFTER)
|
||||
table.insert( vLayIds, nNewLay)
|
||||
EgtMove( nNewLay, LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
@@ -1010,7 +1010,7 @@ local function SpiralVase( vLayIds, dCorrZ, LayerParams)
|
||||
|
||||
-- correggo posizione in Z ( per essere sicuri di appoggiare sul piano)
|
||||
EgtMove( nNewEntId, dCorrZ * Z_AX(), GDB_RT.GLOB)
|
||||
if nSlicingType == SLICING_TYPE.DEG45 then
|
||||
if nSlicingType == SLICING_TYPE.DEG45_X or nSlicingType == SLICING_TYPE.DEG45_Y then
|
||||
-- eventuale spostamento dell'altezza layer
|
||||
EgtMove( nNewEntId, LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
end
|
||||
@@ -1089,7 +1089,7 @@ function CalcToolPath.Exec( nPartId)
|
||||
local vtMove = Vector3d( 0, 0, dCorrZ)
|
||||
-- se slicing a 45° aggiungo correzione anche in direzione dello slicing
|
||||
local nSlicingType = EgtGetInfo( s_nPartId, KEY_SLICING_TYPE, 'i') or 1
|
||||
if nSlicingType == SLICING_TYPE.DEG45 then
|
||||
if nSlicingType == SLICING_TYPE.DEG45_X or nSlicingType == SLICING_TYPE.DEG45_Y then
|
||||
vtMove = vtMove + LayerParams.dLayHeight / 2 * LayerParams.vtSlicing
|
||||
end
|
||||
local SolidLayId = EgtGetFirstNameInGroup( s_nPartId, PRINT_SOLID)
|
||||
@@ -1124,7 +1124,7 @@ function CalcToolPath.Exec( nPartId)
|
||||
return
|
||||
else
|
||||
EgtSetStatus( nPathGrpId, GDB_ST.OFF)
|
||||
end
|
||||
end
|
||||
-- recupero il gruppo dei percorsi utensile
|
||||
local nTpathGrpId = EgtGetFirstNameInGroup( nCrvGrpId, TOOLPATH_GRP)
|
||||
if not nTpathGrpId then
|
||||
|
||||
@@ -42,8 +42,10 @@ local function LoadParams( sFile, nPartId)
|
||||
local sSlicingType = EgtGetStringFromIni( SEC_DEFAULT, KEY_SLICING_TYPE, 'Vertical', sFile)
|
||||
if sSlicingType == 'Horizontal' then
|
||||
EgtSetInfo( nPartId, KEY_SLICING_TYPE, SLICING_TYPE.HORIZONTAL)
|
||||
elseif sSlicingType == 'Deg45' then
|
||||
EgtSetInfo( nPartId, KEY_SLICING_TYPE, SLICING_TYPE.DEG45)
|
||||
elseif sSlicingType == 'Deg45X' then
|
||||
EgtSetInfo( nPartId, KEY_SLICING_TYPE, SLICING_TYPE.DEG45_X)
|
||||
elseif sSlicingType == 'Deg45Y' then
|
||||
EgtSetInfo( nPartId, KEY_SLICING_TYPE, SLICING_TYPE.DEG45_Y)
|
||||
else
|
||||
EgtSetInfo( nPartId, KEY_SLICING_TYPE, SLICING_TYPE.VERTICAL)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user