2019-08-08 02:56 PM
2019-08-08 06:13 PM
2019-08-09 03:13 AM
Joachim wrote:Thanks for the reply Joachim!
If you devide 2 Numbers, you always get as result a real number.
And you can turn the real number back again into integer by using INT command.
It would be helpful if you post your script with the issue.
! PARAMETRIC KITCHEN CABINET ! copyright 2019 by Jarrod Phillips ! VARIABLES width = A depth = B height = ZZYZX ! FRONT KICKBOARD add 0, doorPanelThickness+0.002+toedepth, 0 building_material buildingMat1, bForePen1, bBackPen1 cwall_ mat1, mat2, mat3, toeHeight, 0, width, width, 0, toeThickness, 15, 15, 15, 15, 0, 0 del 1 ! REAR KICKBOARD add 0, depth-toeThickness, 0 building_material buildingMat1, bForePen1, bBackPen1 cwall_ mat1, mat2, mat3, toeHeight, 0, width, width, 0, toeThickness, 15, 15, 15, 15, 0, 0 del 1 ! LEFT KICKBOARD add toeThickness, doorPanelThickness+0.002+toeThickness+toeDepth, 0 rotz 90 building_material buildingMat1, bForePen1, bBackPen1 cwall_ mat1, mat2, mat3, toeHeight, 0, depth-(2*toeThickness+doorPanelThickness+0.002+toeDepth), depth-(2*toeThickness+doorPanelThickness+0.002+toeDepth), 0, toeThickness, 15, 15, 15, 15, 0, 0 del 2 ! RIGHT KICKBOARD add width, doorPanelThickness+0.002+toeThickness+toeDepth, 0 rotz 90 building_material buildingMat1, bForePen1, bBackPen1 cwall_ mat1, mat2, mat3, toeHeight, 0, depth-(2*toeThickness+doorPanelThickness+0.002+toeDepth), depth-(2*toeThickness+doorPanelThickness+0.002+toeDepth), 0, toeThickness, 15, 15, 15, 15, 0, 0 del 2 ! BOTTOM PANEL add 0, doorPanelThickness+0.002, toeHeight building_material buildingMat2, bForePen2, bBackPen2 cprism_ mat4, mat5, mat6, 5, bottomPanelThickness, 0, 0, 15, width, 0, 15, width, depth-(doorPanelThickness+0.002), 15, 0, depth-(doorPanelThickness+0.002), 15, 0, 0, 15 del 1 ! DOOR PANEL if doorOn then add 0.002, 0, toeHeight+0.002 rotz 360-doorAngle building_material buildingMat3, bForePen3, bBackPen3 cwall_ mat7, mat8, mat9, height-(toeHeight+0.002), 0, width-0.004, width-0.004, 0, doorPanelThickness, 15, 15, 15, 15, 0, 0 del 2 endif ! REAR PANEL add 0, depth-rearPanelThickness, toeHeight+bottomPanelThickness building_material buildingMat2, bForePen2, bBackPen2 cwall_ mat4, mat5, mat6, height-(toeHeight+bottomPanelThickness), 0, width, width, 0, rearPanelThickness, 15, 15, 15, 15, 0, 0 del 1 ! LEFT PANEL add 0, doorPanelThickness+0.002, toeHeight+bottomPanelThickness rotz 90 building_material buildingMat2, bForePen2, bBackPen2 cwall_ mat4, mat5, mat6, height-(toeHeight+bottomPanelThickness), 0, depth-(rearPanelThickness+doorPanelThickness+0.002), depth-(rearPanelThickness+doorPanelThickness+0.002), 0, -leftPanelThickness, 15, 15, 15, 15, 0, 0 del 2 ! RIGHT PANEL add width-rightPanelThickness, doorPanelThickness+0.002, toeHeight+bottomPanelThickness rotz 90 building_material buildingMat2, bForePen2, bBackPen2 cwall_ mat4, mat5, mat6, height-(toeHeight+bottomPanelThickness), 0, depth-(rearPanelThickness+doorPanelThickness+0.002), depth-(rearPanelThickness+doorPanelThickness+0.002), 0, -rightPanelThickness, 15, 15, 15, 15, 0, 0 del 2 If braceHorizontal then ! FRONT HORIZONTAL BRACING MEMBER add leftPanelThickness, doorPanelThickness+0.002, height-frontBraceThickness building_material buildingMat4, bForePen4, bBackPen4 cprism_ mat10, mat11, mat12, 5, frontBraceThickness, 0, 0, 15, width-(leftPanelThickness+rightPanelThickness), 0, 15, width-(leftPanelThickness+rightPanelThickness), braceHeight, 15, 0, braceHeight, 15, 0, 0, 15 del 1 ! REAR HORIZONTAL BRACING MEMBER add leftPanelThickness, depth-(braceHeight+rearPanelThickness), height-rearBraceThickness building_material buildingMat4, bForePen4, bBackPen4 cprism_ mat10, mat11, mat12, 5, rearBraceThickness, 0, 0, 15, width-(leftPanelThickness+rightPanelThickness), 0, 15, width-(leftPanelThickness+rightPanelThickness), braceHeight, 15, 0, braceHeight, 15, 0, 0, 15 del 1 else ! FRONT VERTICAL BRACING MEMBER add leftPanelThickness, doorPanelThickness+0.002, height-braceHeight building_material buildingMat4, bForePen4, bBackPen4 cwall_ mat10, mat11, mat12, braceHeight, 0, width-(leftPanelThickness+rightPanelThickness), width-(leftPanelThickness+rightPanelThickness), 0, frontBraceThickness, 15, 15, 15, 15, 0, 0 del 1 ! REAR VERTICIAL BRACING MEMBER add leftPanelThickness, depth-(rearPanelThickness+rearBraceThickness), height-braceHeight building_material buildingMat4, bForePen4, bBackPen4 cwall_ mat10, mat11, mat12, braceHeight, 0, width-(leftPanelThickness+rightPanelThickness), width-(leftPanelThickness+rightPanelThickness), 0, rearBraceThickness, 15, 15, 15, 15, 0, 0 del 1 endif ! SHELF if numShelf > 1 then add leftPanelThickness+0.002, doorPanelThickness+0.004, toeHeight for k= (height-toeHeight)/numShelf to (height-toeHeight)-(height-toeHeight)/numShelf step (height-toeHeight)/numShelf addz k building_material buildingMat5, bForePen5, bBackPen5 cprism_ mat13, mat14, mat15, 5, adjustShelfThickness, 0, 0, 15, width-(leftPanelThickness+0.002+0.002+rightPanelThickness), 0, 15, width-(leftPanelThickness+0.002+0.002+rightPanelThickness), depth-(doorPanelThickness+0.002+0.002+0.002+rearPanelThickness), 15, 0, depth-(doorPanelThickness+0.002+0.002+0.002+rearPanelThickness), 15, 0, 0, 15 del 1 next k endif
2019-08-09 03:54 AM
k= (height-toeHeight)/numShelf to (height-toeHeight)-(height-toeHeight)/numShelf step (height-toeHeight)/numShelf for count = 1 to numShelf addz k .... shelf stuff next count DEL numShelf
2019-08-09 04:05 AM
Barry wrote:Hello Barry,
Just having a quick look at your code you might want to try this for the shelf.
k= (height-toeHeight)/numShelf to (height-toeHeight)-(height-toeHeight)/numShelf step (height-toeHeight)/numShelf for count = 1 to numShelf addz k .... shelf stuff next count DEL numShelf
Barry.
2019-08-10 09:26 AM
Barry wrote:Hello Barry,
Just having a quick look at your code you might want to try this for the shelf.
k= (height-toeHeight)/numShelf to (height-toeHeight)-(height-toeHeight)/numShelf step (height-toeHeight)/numShelf for count = 1 to numShelf addz k .... shelf stuff next count DEL numShelf
Barry.
! SHELF if numShelf > 1 then add leftPanelThickness+0.002, doorPanelThickness+0.004, toeHeight k= (height-toeHeight)/numShelf for count = 1 to numShelf-1 addz k building_material buildingMat5, bForePen5, bBackPen5 cprism_ mat13, mat14, mat15, 5, adjustShelfThickness, 0, 0, 15, width-(leftPanelThickness+0.002+0.002+rightPanelThickness), 0, 15, width-(leftPanelThickness+0.002+0.002+rightPanelThickness), depth-(doorPanelThickness+0.002+0.002+0.002+rearPanelThickness), 15, 0, depth-(doorPanelThickness+0.002+0.002+0.002+rearPanelThickness), 15, 0, 0, 15 next count DEL numShelf endifThanks for you help!
2019-08-12 03:57 AM