Index: development/Visualisatie_3D/Parametric_3D_models/TBX.json =================================================================== diff -u -r134 -r135 --- development/Visualisatie_3D/Parametric_3D_models/TBX.json (.../TBX.json) (revision 134) +++ development/Visualisatie_3D/Parametric_3D_models/TBX.json (.../TBX.json) (revision 135) @@ -28,6 +28,18 @@ "default": "SW", "source": "/CB_VW_ConfiguratorTAB/CB_VW_Colours/C_TBX_BoxSystemColour" }, + "BackSideMaterial": { + "default": "Wood", + "source": "/CB_VW_ViewSection3/CB_VW_NeededFor3D/C_BOX_BackSideMaterial" + }, + "BackHeightInMM": { + "default": "84", + "source": "/CB_VW_ViewSection3/CB_VW_NeededFor3D/C_BOX_BackHeightInMm" + }, + "BackHeight": { + "default": "None", + "source": "/CB_VW_ConfiguratorTAB/CB_VW_Afwerking/C_TBX_BackHeight.Input" + }, "DND_CoverCapOuter": { "default": 0, "source": "/CB_VW_ConfiguratorTAB/CB_BOX_NietMeeleveren/C_TBX_DND.CoverCap.Bool" @@ -58,11 +70,20 @@ "BaseDepth = BoxSystemDepth - 24", "ChipBoardThickness = 16", "TranslationDrawersideRight = BaseWidth", + "BackWidth = InternalWidth - 87", + "BoxSystemCenterWidth = BaseWidth/2", + "BackHeightFor3D = is(BackHeight, 'None') ? BoxSystemHeight : BackHeight", "VARSECTIE = '***************************************GallerySide****************************************' ", "GallerySide_HeightMatrix = ['B', '118.5'; 'C', '150.5'; 'D', '182.5']", "GallerySide_HeightTranslation = lookup(GallerySide_HeightMatrix, [['=', string(BoxSystemHeight)], ['#', 'distance']])", "GallerySide_SideTranslation = -37.5 + 15.5", "ShowGallerySide = is(BoxSystemHeight, SideHeight) ? 0 : 1", + "VARSECTIE = '***************************************BackFixing****************************************' ", + "BackFixing_HeightMatrix = ['N', '22'; 'M', '20'; 'K', '22'; 'C', '39'; 'D', '8'; 'B', '39']", + "BackFixing_HeightTranslationLookup = lookup(BackFixing_HeightMatrix, [['=', string(BackHeightFor3D)], ['#', 'distance']])", + "BackFixing_HeightTranslation = (BackHeightInMM - ChipBoardThickness) - BackFixing_HeightTranslationLookup.distance", + "BackFixing_SideWaysTranslation = (87 - 75) / 2 + 9", + "BackFixing_BackTranslation = -BaseDepth - ChipBoardThickness", "VARSECTIE = '***************************************MATERIAL / DO NOT DELIVER****************************************' ", "MaterialId_ChipBoard = concat('MT_ChipBoard_', BaseColour)", "MaterialId_BoxSystemColour = concat('MT_BLUM_', BoxSystemColour)", @@ -72,6 +93,7 @@ "ProductId_CoverCapsOuter = concat('P-VIS-TBX.CoverCapsOuter-', string(SideHeight))", "ProductId_GallerySide = concat('P-VIS-TBX.GallerySide-', string(BoxSystemDepth))", "ProductId_GallerySideFixing = 'P-VIS-TBX.GallerySideFixing' ", + "ProductId_BackFixing = concat('P-VIS-TBX.BackFixing-', string(BackHeightFor3D))", "VARSECTIE = '***************************************EINDE****************************************' " ] }, @@ -82,7 +104,7 @@ { "cube": { "center": { - "x": "BaseWidth/2", + "x": "BoxSystemCenterWidth", "y": "-ChipBoardThickness/2", "z": "-BaseDepth/2" }, @@ -192,6 +214,56 @@ "x": "TranslationDrawersideRight - GallerySide_SideTranslation", "y": "GallerySide_HeightTranslation.distance" } + }, + { + "comment": "Wooden Back", + "if": "is(BackSideMaterial, 'Wood')", + "material": "MaterialId_ChipBoard", + "subtract": [ + { + "cube": { + "center": { + "x": "BoxSystemCenterWidth", + "y": "BackHeightInMM / 2 - ChipBoardThickness", + "z": "-BaseDepth - (ChipBoardThickness / 2)" + }, + "size": { + "x": "BackWidth", + "y": "BackHeightInMM", + "z": "ChipBoardThickness" + } + } + } + ] + }, + { + "comment": "BackFixing Left", + "if": "is(BackSideMaterial, 'Wood')", + "geometry": { + "pass": true, + "url": "ProductId_BackFixing" + }, + "material": "MaterialId_BoxSystemColour", + "translate": { + "x": "BackFixing_SideWaysTranslation", + "y": "BackFixing_HeightTranslation", + "z": "BackFixing_BackTranslation" + } + }, + { + "comment": "BackFixing Right", + "if": "is(BackSideMaterial, 'Wood')", + "geometry": { + "pass": true, + "url": "ProductId_BackFixing" + }, + "material": "MaterialId_BoxSystemColour", + "mirror": "x", + "translate": { + "x": "BaseWidth - BackFixing_SideWaysTranslation", + "y": "BackFixing_HeightTranslation", + "z": "BackFixing_BackTranslation" + } } ] } \ No newline at end of file