├── Beam_Drawing.dwg ├── Continuous_Beam ├── Continuous_Beam.dwg └── Continuous_Beam_Automation.ipynb ├── EPANET ├── Drawing1.dwg ├── Easy_labelling_Epanet_Data_Using_#Python.ipynb ├── epanet_output.xls ├── for_coordinates.inp ├── information.txt ├── output.rpt ├── point_block.dwg └── practice_file.net ├── Isolated_Footing_Design_Concentrically_Loaded_Exercise_Book.ipynb ├── Isolated_footing_Drawing.dwg ├── README.md ├── Simple_Beam_AutocadDrawing_automation.ipynb └── traverse_drawing_automation ├── Automate_Drawing_Traverse_Using_#Python.ipynb ├── Traverse_drawing.dwg ├── pointblck.dwg └── traverse_points.xlsx /Beam_Drawing.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/Beam_Drawing.dwg -------------------------------------------------------------------------------- /Continuous_Beam/Continuous_Beam.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/Continuous_Beam/Continuous_Beam.dwg -------------------------------------------------------------------------------- /Continuous_Beam/Continuous_Beam_Automation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Automation of Continuous Beam Drawing on Autocad using #BasicPYTHON #PYAUTOCAD" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 23, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from pyautocad import Autocad, APoint" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 24, 22 | "metadata": {}, 23 | "outputs": [ 24 | { 25 | "name": "stdout", 26 | "output_type": "stream", 27 | "text": [ 28 | "Continuous_Beam.dwg\n" 29 | ] 30 | } 31 | ], 32 | "source": [ 33 | "acad=Autocad() ###create_if_not_exists=True\n", 34 | "\n", 35 | "print(acad.doc.Name)\n", 36 | "doc=acad.ActiveDocument\n", 37 | "ms=doc.ModelSpace" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": 25, 43 | "metadata": {}, 44 | "outputs": [ 45 | { 46 | "name": "stdout", 47 | "output_type": "stream", 48 | "text": [ 49 | "Enter No Of Storey : 3\n" 50 | ] 51 | } 52 | ], 53 | "source": [ 54 | "z=0\n", 55 | "N=int(input('Enter No Of Storey : '))" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "metadata": {}, 61 | "source": [ 62 | "# Functions for Drawing...." 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": 26, 68 | "metadata": {}, 69 | "outputs": [], 70 | "source": [ 71 | "def draw(p1x,p1y,p2x,p2y):\n", 72 | " for j in range(len(p1x)):\n", 73 | " p1=APoint(p1x[j],p1y[j]+z)\n", 74 | " p2=APoint(p2x[j],p2y[j]+z)\n", 75 | " line1=acad.model.AddLine(p1,p2)\n", 76 | " line1.layer='Beam_LSection' \n", 77 | " \n", 78 | "def l_dimdraw(long_dim_x0,long_dim_y0,long_dim_x1,long_dim_y1):\n", 79 | " for j in range(len(long_dim_x0)):\n", 80 | " p1=APoint(long_dim_x0[j],long_dim_y0[j]+z)\n", 81 | " p2=APoint(long_dim_x1[j],long_dim_y1[j]+z)\n", 82 | " line1=acad.model.AddLine(p1,p2)\n", 83 | " line1.layer='text' \n", 84 | " \n" 85 | ] 86 | }, 87 | { 88 | "cell_type": "code", 89 | "execution_count": 27, 90 | "metadata": {}, 91 | "outputs": [], 92 | "source": [ 93 | "def draw_longitudinal_rebar(p1x,p1y,p2x,p2y):\n", 94 | " for j in range(len(p1x)):\n", 95 | " p1=APoint(p1x[j],p1y[j]+z)\n", 96 | " p2=APoint(p2x[j],p2y[j]+z)\n", 97 | " line1=acad.model.AddLine(p1,p2)\n", 98 | " line1.layer='Long_rebar'\n", 99 | " \n", 100 | "def draw_without_cantilever(column_width,column_cc,a,a_initial,d,beam_cc):\n", 101 | " ###---lower longitdudinal rebar(first three points---------##----\n", 102 | " p3x=[a_initial-column_width+column_cc,a_initial-column_width+column_cc,a-column_cc,a_initial-column_width+column_cc,a_initial-column_width+column_cc,a-column_cc]\n", 103 | " p3y=[beam_cc,beam_cc,beam_cc,d-beam_cc,d-beam_cc,d-beam_cc]\n", 104 | "\n", 105 | " p4x=[a_initial-column_width+column_cc,a-column_cc,a-column_cc,a_initial-column_width+column_cc,a-column_cc,a-column_cc]\n", 106 | " p4y=[d*2,beam_cc,d*2,-d,d-beam_cc,-d]\n", 107 | " \n", 108 | " drawing_1=draw_longitudinal_rebar(p3x,p3y,p4x,p4y)" 109 | ] 110 | }, 111 | { 112 | "cell_type": "markdown", 113 | "metadata": {}, 114 | "source": [ 115 | "# For Stirrups Details ....." 116 | ] 117 | }, 118 | { 119 | "cell_type": "code", 120 | "execution_count": 28, 121 | "metadata": {}, 122 | "outputs": [], 123 | "source": [ 124 | "beam_cc=20\n", 125 | "cc=beam_cc\n", 126 | "\n", 127 | "def stirrup(l_next,z,d,cc,a):\n", 128 | "\n", 129 | " l=l_next\n", 130 | "##For stirrups\n", 131 | " print('')\n", 132 | " print('For stirrups : ')\n", 133 | " spacing_left=int(input('Enter Spacing(mm) on left section(l/3) of Beam : '))\n", 134 | " spacing_center=int(input('Enter Spacing(mm) on center section of Beam : '))\n", 135 | " spacing_right=int(input('Enter Spacing(mm) on right section(l/3) of Beam : '))\n", 136 | " \n", 137 | " print('')\n", 138 | " sp=0\n", 139 | " \n", 140 | " ##ForStirrups\n", 141 | " #print('')\n", 142 | " #print('**********Stirrup Diameter***********')\n", 143 | " #print('')\n", 144 | " stirrup_dia=8#int(input('Enter diameter of stirrup : '))\n", 145 | " for j in range(3):\n", 146 | " if j==0:\n", 147 | " n_left=round(((l/3-50*2)/spacing_left))+1\n", 148 | " ##Annotation\n", 149 | " ##inclined line\n", 150 | " ptext_1=APoint(a+l/6,d/2+z)\n", 151 | " ptext_2=APoint(a+l/6+46.6,-86.4+z)\n", 152 | " #Line1\n", 153 | " line1=acad.model.AddLine(ptext_1,ptext_2)\n", 154 | " line1.layer='text'\n", 155 | " ##Flat line\n", 156 | " ptext_3=APoint(a+l/6+46.6,-86.4+z)\n", 157 | " ptext_4=APoint(a+46.6+77+l/6,-86.4+z)\n", 158 | " line2=acad.model.AddLine(ptext_3,ptext_4)\n", 159 | " line2.layer='text'\n", 160 | " ##Text To beshown\n", 161 | " text_dim=[n_left,stirrup_dia,spacing_left]\n", 162 | " text_length=acad.model.AddText(' %s-%smmdia@%smm c/c'%(text_dim[0],text_dim[1],text_dim[2]),ptext_4,25)\n", 163 | " text_length.layer='text'\n", 164 | "\n", 165 | " \n", 166 | " ##Stirrup lines @middle\n", 167 | " ptext_5=APoint(a+l/6-250,d/2+z)\n", 168 | " ptext_6=APoint(a+l/6+250,d/2+z)\n", 169 | " line3=acad.model.AddLine(ptext_5,ptext_6)\n", 170 | " line3.linetype='strrp'\n", 171 | " \n", 172 | " for j in range(n_left):\n", 173 | " if j == 0:\n", 174 | " p3=APoint(a+50,cc+z)\n", 175 | " p4=APoint(a+50,z+d-cc)\n", 176 | " line=acad.model.AddLine(p3,p4)\n", 177 | " line.layer='Stirrups_sides'\n", 178 | " sp=sp+50\n", 179 | " # print(sp)\n", 180 | " else:\n", 181 | " sp=sp+spacing_left\n", 182 | " #print(sp)\n", 183 | " p3=APoint(a+sp,z+cc)\n", 184 | " p4=APoint(a+sp,z+d-cc)\n", 185 | " line=acad.model.AddLine(p3,p4)\n", 186 | " line.layer='Stirrups_sides' \n", 187 | " \n", 188 | " elif j==1:\n", 189 | " n_center=round(((l/3-50*2)/spacing_center))+1\n", 190 | " ##inclined line\n", 191 | " ptext_1=APoint(a+l/2,d/2+z)\n", 192 | " ptext_2=APoint(a+46.6+l/2,d+z+86.4)\n", 193 | " #Line1\n", 194 | " line1=acad.model.AddLine(ptext_1,ptext_2)\n", 195 | " line1.layer='text'\n", 196 | " ##Flat line\n", 197 | " ptext_3=APoint(a+46.6+l/2,d+z+86.4)\n", 198 | " ptext_4=APoint(a+46.6+77+l/2,d+z+86.4)\n", 199 | " line2=acad.model.AddLine(ptext_3,ptext_4)\n", 200 | " line2.layer='text'\n", 201 | " ##Text To beshown\n", 202 | " text_dim=[n_center,stirrup_dia,spacing_center]\n", 203 | " text_length=acad.model.AddText(' %s-%smmdia@%smm c/c'%(text_dim[0],text_dim[1],text_dim[2]),ptext_4,25)\n", 204 | " text_length.layer='text'\n", 205 | " \n", 206 | " ##Stirrup lines @middle\n", 207 | " ptext_5=APoint(a+l/2-250,d/2+z)\n", 208 | " ptext_6=APoint(a+l/2+250,d/2+z)\n", 209 | " line3=acad.model.AddLine(ptext_5,ptext_6)\n", 210 | " line3.linetype='strrp'\n", 211 | " \n", 212 | " for j in range(n_center):\n", 213 | " sp=sp+spacing_center\n", 214 | " #print(sp)\n", 215 | " p3=APoint(a+sp,z+cc)\n", 216 | " p4=APoint(a+sp,z+d-cc)\n", 217 | " line=acad.model.AddLine(p3,p4)\n", 218 | " line.layer='Stirrups_center' \n", 219 | " \n", 220 | "\n", 221 | " else:\n", 222 | " n_right=round(((l/3-50*2)/spacing_right))+1\n", 223 | " \n", 224 | " ##Annotation\n", 225 | " ##inclined line\n", 226 | " ptext_1=APoint(a+5*l/6,d/2+z)\n", 227 | " ptext_2=APoint(a+5*l/6-46.6,-86.4+z)\n", 228 | " #Line1\n", 229 | " line1=acad.model.AddLine(ptext_1,ptext_2)\n", 230 | " line1.layer='text'\n", 231 | " ##Flat line\n", 232 | " ptext_3=APoint(a+5*l/6-46.6,-86.4+z)\n", 233 | " ptext_4=APoint(a+5*l/6-46.6-77,-86.4+z)\n", 234 | " ptext_5=APoint(a+5*l/6-46.6-77-468,-86.4+z)\n", 235 | " line2=acad.model.AddLine(ptext_3,ptext_4)\n", 236 | " line2.layer='text'\n", 237 | " ##Text To beshown\n", 238 | " text_dim=[n_right,stirrup_dia,spacing_right]\n", 239 | " text_length=acad.model.AddText(' %s-%smmdia@%smm c/c'%(text_dim[0],text_dim[1],text_dim[2]),ptext_5,25)\n", 240 | " text_length.layer='text'\n", 241 | "\n", 242 | " \n", 243 | " ##Stirrup lines @middle\n", 244 | " ptext_5=APoint(a+5*l/6-250,d/2+z)\n", 245 | " ptext_6=APoint(a+5*l/6+250,d/2+z)\n", 246 | " line3=acad.model.AddLine(ptext_5,ptext_6)\n", 247 | " line3.linetype='strrp'\n", 248 | " \n", 249 | " \n", 250 | " for j in range(n_right):\n", 251 | " sp=sp+spacing_right\n", 252 | " # print(sp)\n", 253 | " if sp>l-50:\n", 254 | " sp=sp-50\n", 255 | " #print(sp)\n", 256 | " #p3=APoint(sp,cc)\n", 257 | " #p4=APoint(sp,d-cc)\n", 258 | " #line=acad.model.Addline(p3,p4)\n", 259 | " #line.layer='Stirrups_sides'\n", 260 | " break\n", 261 | " p3=APoint(a+sp,z+cc)\n", 262 | " p4=APoint(a+sp,z+d-cc)\n", 263 | " line=acad.model.AddLine(p3,p4)\n", 264 | " line.layer='Stirrups_sides' \n", 265 | " " 266 | ] 267 | }, 268 | { 269 | "cell_type": "markdown", 270 | "metadata": {}, 271 | "source": [ 272 | "# For Section Details...." 273 | ] 274 | }, 275 | { 276 | "cell_type": "markdown", 277 | "metadata": {}, 278 | "source": [ 279 | "1.Section A-A" 280 | ] 281 | }, 282 | { 283 | "cell_type": "code", 284 | "execution_count": 29, 285 | "metadata": {}, 286 | "outputs": [], 287 | "source": [ 288 | "def section_draw_AA(l_next,z,d,beam_cc,b,a):\n", 289 | " l=l_next\n", 290 | " cc=beam_cc\n", 291 | " left_cut=l/6\n", 292 | " center_cut=l/2\n", 293 | " right_cut=l/2+l/3\n", 294 | "\n", 295 | " section_cutx1=[a+left_cut,a+center_cut,a+right_cut]\n", 296 | " section_cuty1=[-300,-300,-300]\n", 297 | "\n", 298 | " section_cutx2=[a+left_cut,a+center_cut,a+right_cut]\n", 299 | " section_cuty2=[b+300,b+300,b+300]\n", 300 | "\n", 301 | " text=['A','B','C'] #####\n", 302 | "\n", 303 | " for j in range(len(section_cutx1)):\n", 304 | " Cut_line1=APoint(section_cutx1[j],section_cuty1[j]+z)\n", 305 | " text1=acad.model.AddText(' %s'%text[j],Cut_line1,50)\n", 306 | " text1.layer='text'\n", 307 | " Cut_line2=APoint(section_cutx2[j],section_cuty2[j]+z)\n", 308 | " text2=acad.model.AddText(' %s'%text[j],Cut_line2,50)\n", 309 | " text2.layer='text'\n", 310 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 311 | " line1.layer='Section_line'\n", 312 | " \n", 313 | " ###Cross Sections\n", 314 | "##Section AA\n", 315 | " p5x=[a+l/6-(b/2),a+l/6-(b/2),a+l/6+(b/2),a+l/6-(b/2),a+l/6-(b/2)+cc,a+l/6-(b/2)+cc,a+l/6+(b/2)-cc,a+l/6-(b/2)+cc,a+l/6-(b/2)+cc+20,a+l/6-(b/2)+cc]\n", 316 | " p5y=[-600,-(600+d),-600,-600,-600-cc,-(600+d)+cc,-600-cc,-600-cc,-600-cc,-600-cc-20]\n", 317 | "\n", 318 | " p6x=[a+l/6-(b/2),a+l/6+(b/2),a+l/6+(b/2),a+l/6+(b/2),a+l/6-(b/2)+cc,a+l/6+(b/2)-cc,a+l/6+(b/2)-cc,a+l/6+(b/2)-cc,a+l/6-(b/2)+cc+43,a+l/6-(b/2)+cc+23]\n", 319 | " p6y=[-(600+d),-(600+d),-(600+d),-600,-(600+d)+cc,-(600+d)+cc,-(600+d)+cc,-600-cc,-600-cc-23,-600-cc-43]\n", 320 | "\n", 321 | " for i in range(len(p5x)):\n", 322 | " Cut_line1=APoint(p5x[i],p5y[i]+z)\n", 323 | " #acad.model.AddText(' %s'%text[i],Cut_line1,50)\n", 324 | " Cut_line2=APoint(p6x[i],p6y[i]+z)\n", 325 | " #acad.model.AddText(' %s'%text[i],Cut_line2,50)\n", 326 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 327 | " if i <=3:\n", 328 | " line1.layer='Beam_CSection'\n", 329 | " else:\n", 330 | " line1.layer='Stirrups_sides'\n", 331 | " \n", 332 | " ##Rebars ##\n", 333 | " ##Need to manually enter these values\n", 334 | " no_rebar_lower=4\n", 335 | " no_rebar_upper=4\n", 336 | " dia_rebar_lower=10\n", 337 | " dia_rebar_upper=10\n", 338 | " \n", 339 | " ##Section__AA\n", 340 | " l=l_next\n", 341 | " cc=beam_cc\n", 342 | " v_interval=50\n", 343 | " text=['SECTION : A-A','SECTION : B-B','SECTION : C-C']\n", 344 | " for i in range(2):\n", 345 | " \n", 346 | " if i==0:\n", 347 | " ptext=APoint(a+l/6-b/2,-600-d-150+z)\n", 348 | " text=acad.model.AddText(' %s'%text[i],ptext,30)\n", 349 | " text.layer='text'\n", 350 | " ##Lower rebar \n", 351 | " #print('Section AA Lower: ')\n", 352 | " #int(input('Corner Bar lower(mm) :'))\n", 353 | " dia_rebar_lower_corner=16#int(input('Corner Bar lower(mm) :'))\n", 354 | " sp=a+l/6-(b/2)+cc+dia_rebar_lower_corner\n", 355 | " spacing=round(b-cc*2-2*dia_rebar_lower)/(no_rebar_lower-1)\n", 356 | " for i in range(no_rebar_lower):\n", 357 | " if i == 0:\n", 358 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 359 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 360 | " rebar1.layer='rebar_section'\n", 361 | " \n", 362 | " ##For annotation\n", 363 | " ptext_4=APoint(a+l/6,z-600-d-72)\n", 364 | " ptext_5=APoint(a+l/6+b/2+50,z-600-d-72)\n", 365 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 366 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 367 | " text_dim=[dia_rebar_lower_corner]\n", 368 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 369 | " \n", 370 | " \n", 371 | " elif i == no_rebar_lower-1:\n", 372 | " p_center=APoint(a+l/6+(b/2)-cc-dia_rebar_lower_corner,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 373 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 374 | " rebar1.layer='rebar_section'\n", 375 | " \n", 376 | " ##For annotation\n", 377 | " ptext_4=APoint(a+l/6,z-600-d-72)\n", 378 | " #ptext_5=APoint(l/6+b/2+50,z-500-28)\n", 379 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 380 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 381 | " #text_dim=[dia_rebar_lower_corner]\n", 382 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 383 | " \n", 384 | " else:\n", 385 | " #print(sp)\n", 386 | " sp=sp+spacing\n", 387 | " #print(sp)\n", 388 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower+z)\n", 389 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower)\n", 390 | " rebar1.layer='rebar_section' \n", 391 | " \n", 392 | " #Annotations\n", 393 | " ptext_4=APoint(sp,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 394 | " ptext_5=APoint(a+l/6+b/2+50,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 395 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 396 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 397 | " \n", 398 | " \n", 399 | " text_dim=[dia_rebar_lower]\n", 400 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 401 | " \n", 402 | " #v_interval-=100\n", 403 | "\n", 404 | " elif i==1:\n", 405 | " ##Upper rebar\n", 406 | " #print('Section AA Upper: ')\n", 407 | " dia_rebar_upper_corner=16#int(input('Corner Bar Upper(mm) :'))\n", 408 | " sp=a+l/6-(b/2)+cc+dia_rebar_upper_corner\n", 409 | " spacing=round(b-cc*2-dia_rebar_upper_corner*2)/(no_rebar_upper-1)\n", 410 | " for i in range(no_rebar_upper):\n", 411 | " if i == 0:\n", 412 | " p_center=APoint(sp,-600-cc-dia_rebar_upper_corner+z)\n", 413 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 414 | " rebar1.layer='rebar_section'\n", 415 | " ##For annotation\n", 416 | " ptext_4=APoint(a+l/6,z-500-28)\n", 417 | " ptext_5=APoint(a+l/6+b/2+50,z-500-28)\n", 418 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 419 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 420 | " text_dim=[dia_rebar_upper_corner]\n", 421 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 422 | " \n", 423 | " elif i == no_rebar_upper-1:\n", 424 | " p_center=APoint(a+l/6+(b/2)-cc-dia_rebar_upper_corner,-600-cc-dia_rebar_upper_corner+z)\n", 425 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 426 | " rebar1.layer='rebar_section'\n", 427 | " ##For annotation\n", 428 | " ptext_4=APoint(a+l/6,z-500-28)\n", 429 | " #ptext_5=APoint(l/6+b/2+50,z-500-28)\n", 430 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 431 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 432 | " #text_dim=[dia_rebar_upper_corner]\n", 433 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 434 | " \n", 435 | " else:\n", 436 | " sp=sp+spacing\n", 437 | " p_center=APoint(sp,-600-cc-dia_rebar_upper+z)\n", 438 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper)\n", 439 | " rebar1.layer='rebar_section'\n", 440 | " \n", 441 | " #Annotations\n", 442 | " ptext_4=APoint(sp,-600-cc-dia_rebar_upper+z-v_interval)\n", 443 | " ptext_5=APoint(a+l/6+b/2+50,-600-cc-dia_rebar_upper+z-v_interval)\n", 444 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 445 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 446 | " text_dim=[dia_rebar_upper]\n", 447 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 448 | " \n", 449 | " #v_interval-=100\n", 450 | "\n" 451 | ] 452 | }, 453 | { 454 | "cell_type": "markdown", 455 | "metadata": {}, 456 | "source": [ 457 | "2.Section B-B" 458 | ] 459 | }, 460 | { 461 | "cell_type": "code", 462 | "execution_count": 30, 463 | "metadata": {}, 464 | "outputs": [], 465 | "source": [ 466 | "def section_draw_BB(l_next,z,d,beam_cc,b,a):\n", 467 | " ###Cross Sections\n", 468 | " l=l_next\n", 469 | " cc=beam_cc\n", 470 | " #left_cut=l/6\n", 471 | " center_cut=a+l/2\n", 472 | " v_interval=50\n", 473 | " right_cut=center_cut\n", 474 | "##Section CC\n", 475 | " p5x=[right_cut-(b/2),right_cut-(b/2),right_cut+(b/2),right_cut-(b/2),right_cut-(b/2)+cc,right_cut-(b/2)+cc,right_cut+(b/2)-cc,right_cut-(b/2)+cc,right_cut-(b/2)+cc+20,right_cut-(b/2)+cc,]\n", 476 | " p5y=[-600,-(600+d),-600,-600,-600-cc,-(600+d)+cc,-600-cc,-600-cc,-600-cc,-600-cc-20]\n", 477 | "\n", 478 | " p6x=[right_cut-(b/2),right_cut+(b/2),right_cut+(b/2),right_cut+(b/2),right_cut-(b/2)+cc,right_cut+(b/2)-cc,right_cut+(b/2)-cc,right_cut+(b/2)-cc,right_cut-(b/2)+cc+43,right_cut-(b/2)+cc+23]\n", 479 | " p6y=[-(600+d),-(600+d),-(600+d),-600,-(600+d)+cc,-(600+d)+cc,-(600+d)+cc,-600-cc,-600-cc-23,-600-cc-43]\n", 480 | "\n", 481 | " for i in range(len(p5x)):\n", 482 | " Cut_line1=APoint(p5x[i],p5y[i]+z)\n", 483 | " #acad.model.AddText(' %s'%text[i],Cut_line1,50)\n", 484 | " Cut_line2=APoint(p6x[i],p6y[i]+z)\n", 485 | " #acad.model.AddText(' %s'%text[i],Cut_line2,50)\n", 486 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 487 | " if i <=3:\n", 488 | " line1.layer='Beam_CSection'\n", 489 | " else:\n", 490 | " line1.layer='Stirrups_center'\n", 491 | " \n", 492 | "##Rebars\n", 493 | " no_rebar_lower=3\n", 494 | " no_rebar_upper=3\n", 495 | " dia_rebar_lower=10\n", 496 | " dia_rebar_upper=10\n", 497 | "\n", 498 | "\n", 499 | "##Section__CC\n", 500 | " text=['SECTION : B-B']\n", 501 | " for i in range(2): \n", 502 | " if i==0:\n", 503 | " ptext=APoint(right_cut-b/2,-600-d-150+z)\n", 504 | " text=acad.model.AddText(' %s'%text[i],ptext,30)\n", 505 | " text.layer='text' \n", 506 | " \n", 507 | "##Lower rebar\n", 508 | " #print('Section CC Lower: ')\n", 509 | " dia_rebar_lower_corner=16#int(input('Corner Bar Lower(mm) :'))\n", 510 | " sp=right_cut-(b/2)+cc+dia_rebar_lower_corner\n", 511 | " spacing=round(b-cc*2-2*dia_rebar_lower_corner)/(no_rebar_lower-1)\n", 512 | " for i in range(no_rebar_lower):\n", 513 | " if i == 0:\n", 514 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 515 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 516 | " rebar1.layer='rebar_section'\n", 517 | " \n", 518 | " ##For annotation\n", 519 | " ptext_4=APoint(a+l/2,z-600-d-72)\n", 520 | " ptext_5=APoint(a+l/2+b/2+50,z-600-d-72)\n", 521 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 522 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 523 | " text_dim=[dia_rebar_lower_corner]\n", 524 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 525 | " \n", 526 | " elif i == no_rebar_lower-1:\n", 527 | " p_center=APoint(right_cut+(b/2)-cc-dia_rebar_lower_corner,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 528 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 529 | " rebar1.layer='rebar_section'\n", 530 | " \n", 531 | " ##For annotation\n", 532 | " ptext_4=APoint(a+l/2,z-600-d-72)\n", 533 | " #ptext_5=APoint(a+5*l/6+b/2+50,z-500-28)\n", 534 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 535 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 536 | " #text_dim=[dia_rebar_lower_corner]\n", 537 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 538 | " \n", 539 | " else:\n", 540 | " sp=sp+spacing\n", 541 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower+z)\n", 542 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower)\n", 543 | " rebar1.layer='rebar_section' \n", 544 | " \n", 545 | " #Annotations\n", 546 | " ptext_4=APoint(sp,-(600+d)+cc+dia_rebar_lower+z+v_interval) \n", 547 | " ptext_5=APoint(a+l/2+b/2+50,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 548 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 549 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 550 | " \n", 551 | " \n", 552 | " text_dim=[dia_rebar_lower]\n", 553 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 554 | " \n", 555 | " #v_interval-=100\n", 556 | " \n", 557 | " \n", 558 | " elif i==1:\n", 559 | " ##Upper rebar\n", 560 | " #print('Section CC Upper: ')\n", 561 | " dia_rebar_upper_corner=16#int(input('Corner Bar Upper(mm) :'))\n", 562 | " \n", 563 | " sp=right_cut-(b/2)+cc+dia_rebar_upper_corner\n", 564 | " spacing=round(b-cc*2-2*dia_rebar_upper_corner)/(no_rebar_upper-1)\n", 565 | " for i in range(no_rebar_upper):\n", 566 | " if i == 0:\n", 567 | " p_center=APoint(sp,-600-cc-dia_rebar_upper_corner+z)\n", 568 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 569 | " rebar1.layer='rebar_section'\n", 570 | " \n", 571 | " ##For annotation\n", 572 | " ptext_4=APoint(a+l/2,z-500-28)\n", 573 | " ptext_5=APoint(a+l/2+b/2+50,z-500-28)\n", 574 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 575 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 576 | " text_dim=[dia_rebar_upper_corner]\n", 577 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 578 | " \n", 579 | " elif i == no_rebar_upper-1:\n", 580 | " p_center=APoint(right_cut+(b/2)-cc-dia_rebar_upper_corner,-600-cc-dia_rebar_upper_corner+z)\n", 581 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 582 | " rebar1.layer='rebar_section'\n", 583 | " \n", 584 | " ##For annotation\n", 585 | " ptext_4=APoint(a+l/2,z-500-28)\n", 586 | " #ptext_5=APoint(a+5*l/6+b/2+50,z-500-28)\n", 587 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 588 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 589 | " #text_dim=[dia_rebar_lower_corner]\n", 590 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 591 | " \n", 592 | " else:\n", 593 | " sp=sp+spacing\n", 594 | " p_center=APoint(sp,-600-cc-dia_rebar_upper+z)\n", 595 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper)\n", 596 | " rebar1.layer='rebar_section' \n", 597 | " #Annotations\n", 598 | " ptext_4=APoint(sp,-600-cc-dia_rebar_upper+z-v_interval)\n", 599 | " ptext_5=APoint(a+l/2+b/2+50,-600-cc-dia_rebar_upper+z-v_interval)\n", 600 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 601 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 602 | " text_dim=[dia_rebar_upper]\n", 603 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 604 | " \n", 605 | " #v_interval-=100" 606 | ] 607 | }, 608 | { 609 | "cell_type": "markdown", 610 | "metadata": {}, 611 | "source": [ 612 | "3.Section C-C" 613 | ] 614 | }, 615 | { 616 | "cell_type": "code", 617 | "execution_count": 31, 618 | "metadata": {}, 619 | "outputs": [], 620 | "source": [ 621 | "def section_draw_CC(l_next,z,d,beam_cc,b,a):\n", 622 | " ###Cross Sections\n", 623 | " l=l_next\n", 624 | " cc=beam_cc\n", 625 | " #left_cut=l/6\n", 626 | " #center_cut=l/2\n", 627 | " v_interval=50\n", 628 | " right_cut=a+l/2+l/3\n", 629 | "##Section CC\n", 630 | " p5x=[right_cut-(b/2),right_cut-(b/2),right_cut+(b/2),right_cut-(b/2),right_cut-(b/2)+cc,right_cut-(b/2)+cc,right_cut+(b/2)-cc,right_cut-(b/2)+cc,right_cut-(b/2)+cc+20,right_cut-(b/2)+cc,]\n", 631 | " p5y=[-600,-(600+d),-600,-600,-600-cc,-(600+d)+cc,-600-cc,-600-cc,-600-cc,-600-cc-20]\n", 632 | "\n", 633 | " p6x=[right_cut-(b/2),right_cut+(b/2),right_cut+(b/2),right_cut+(b/2),right_cut-(b/2)+cc,right_cut+(b/2)-cc,right_cut+(b/2)-cc,right_cut+(b/2)-cc,right_cut-(b/2)+cc+43,right_cut-(b/2)+cc+23]\n", 634 | " p6y=[-(600+d),-(600+d),-(600+d),-600,-(600+d)+cc,-(600+d)+cc,-(600+d)+cc,-600-cc,-600-cc-23,-600-cc-43]\n", 635 | "\n", 636 | " for i in range(len(p5x)):\n", 637 | " Cut_line1=APoint(p5x[i],p5y[i]+z)\n", 638 | " #acad.model.AddText(' %s'%text[i],Cut_line1,50)\n", 639 | " Cut_line2=APoint(p6x[i],p6y[i]+z)\n", 640 | " #acad.model.AddText(' %s'%text[i],Cut_line2,50)\n", 641 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 642 | " if i <=3:\n", 643 | " line1.layer='Beam_CSection'\n", 644 | " else:\n", 645 | " line1.layer='Stirrups_sides'\n", 646 | " \n", 647 | "##Rebars\n", 648 | " no_rebar_lower=4\n", 649 | " no_rebar_upper=4\n", 650 | " dia_rebar_lower=10\n", 651 | " dia_rebar_upper=10\n", 652 | "\n", 653 | "\n", 654 | "##Section__CC\n", 655 | " text=['SECTION : C-C']\n", 656 | " for i in range(2): \n", 657 | " if i==0:\n", 658 | " ptext=APoint(right_cut-b/2,-600-d-150+z)\n", 659 | " text=acad.model.AddText(' %s'%text[i],ptext,30)\n", 660 | " text.layer='text' \n", 661 | " \n", 662 | "##Lower rebar\n", 663 | " #print('Section CC Lower: ')\n", 664 | " dia_rebar_lower_corner=16#int(input('Corner Bar Lower(mm) :'))\n", 665 | " sp=right_cut-(b/2)+cc+dia_rebar_lower_corner\n", 666 | " spacing=round(b-cc*2-2*dia_rebar_lower_corner)/(no_rebar_lower-1)\n", 667 | " for i in range(no_rebar_lower):\n", 668 | " if i == 0:\n", 669 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 670 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 671 | " rebar1.layer='rebar_section'\n", 672 | " \n", 673 | " ##For annotation\n", 674 | " ptext_4=APoint(a+5*l/6,z-600-d-72)\n", 675 | " ptext_5=APoint(a+5*l/6+b/2+50,z-600-d-72)\n", 676 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 677 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 678 | " text_dim=[dia_rebar_lower_corner]\n", 679 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 680 | " \n", 681 | " elif i == no_rebar_lower-1:\n", 682 | " p_center=APoint(right_cut+(b/2)-cc-dia_rebar_lower_corner,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 683 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 684 | " rebar1.layer='rebar_section'\n", 685 | " \n", 686 | " ##For annotation\n", 687 | " ptext_4=APoint(a+5*l/6,z-600-d-72)\n", 688 | " #ptext_5=APoint(a+5*l/6+b/2+50,z-500-28)\n", 689 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 690 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 691 | " #text_dim=[dia_rebar_lower_corner]\n", 692 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 693 | " \n", 694 | " else:\n", 695 | " sp=sp+spacing\n", 696 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower+z)\n", 697 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower)\n", 698 | " rebar1.layer='rebar_section' \n", 699 | " \n", 700 | " #Annotations\n", 701 | " ptext_4=APoint(sp,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 702 | " ptext_5=APoint(a+5*l/6+b/2+50,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 703 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 704 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 705 | " \n", 706 | " \n", 707 | " text_dim=[dia_rebar_lower]\n", 708 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 709 | " \n", 710 | " #v_interval-=100\n", 711 | " \n", 712 | " \n", 713 | " elif i==1:\n", 714 | " ##Upper rebar\n", 715 | " #print('Section CC Upper: ')\n", 716 | " dia_rebar_upper_corner=16#int(input('Corner Bar Upper(mm) :'))\n", 717 | " sp=right_cut-(b/2)+cc+dia_rebar_upper_corner\n", 718 | " spacing=round(b-cc*2-2*dia_rebar_upper_corner)/(no_rebar_upper-1)\n", 719 | " for i in range(no_rebar_upper):\n", 720 | " if i == 0:\n", 721 | " p_center=APoint(sp,-600-cc-dia_rebar_upper_corner+z)\n", 722 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 723 | " rebar1.layer='rebar_section'\n", 724 | " \n", 725 | " ##For annotation\n", 726 | " ptext_4=APoint(a+5*l/6,z-500-28)\n", 727 | " ptext_5=APoint(a+5*l/6+b/2+50,z-500-28)\n", 728 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 729 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 730 | " text_dim=[dia_rebar_upper_corner]\n", 731 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 732 | " \n", 733 | " elif i == no_rebar_upper-1:\n", 734 | " p_center=APoint(right_cut+(b/2)-cc-dia_rebar_upper_corner,-600-cc-dia_rebar_upper_corner+z)\n", 735 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 736 | " rebar1.layer='rebar_section'\n", 737 | " \n", 738 | " ##For annotation\n", 739 | " ptext_4=APoint(a+5*l/6,z-500-28)\n", 740 | " #ptext_5=APoint(a+5*l/6+b/2+50,z-500-28)\n", 741 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 742 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 743 | " #text_dim=[dia_rebar_lower_corner]\n", 744 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 745 | " \n", 746 | " else:\n", 747 | " sp=sp+spacing\n", 748 | " p_center=APoint(sp,-600-cc-dia_rebar_upper+z)\n", 749 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper)\n", 750 | " rebar1.layer='rebar_section' \n", 751 | " #Annotations\n", 752 | " ptext_4=APoint(sp,-600-cc-dia_rebar_upper+z-v_interval)\n", 753 | " ptext_5=APoint(a+5*l/6+b/2+50,-600-cc-dia_rebar_upper+z-v_interval)\n", 754 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 755 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 756 | " text_dim=[dia_rebar_upper]\n", 757 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 758 | " \n", 759 | " #v_interval-=100\n", 760 | " \n", 761 | " " 762 | ] 763 | }, 764 | { 765 | "cell_type": "markdown", 766 | "metadata": {}, 767 | "source": [ 768 | "# For Final Output....\n" 769 | ] 770 | }, 771 | { 772 | "cell_type": "code", 773 | "execution_count": 32, 774 | "metadata": {}, 775 | "outputs": [ 776 | { 777 | "name": "stdout", 778 | "output_type": "stream", 779 | "text": [ 780 | "\n", 781 | "Storey no 0 :\n", 782 | "\n", 783 | "Enter the no of span : 3\n", 784 | "Enter starting grid(mm) origin or shift from origin on right : 0\n", 785 | "\n", 786 | "***********************************************************\n", 787 | "\n", 788 | "Enter Beam Span(mm) no 1 : 3000\n", 789 | "\n", 790 | "\n", 791 | "For stirrups : \n", 792 | "Enter Spacing(mm) on left section(l/3) of Beam : 110\n", 793 | "Enter Spacing(mm) on center section of Beam : 150\n", 794 | "Enter Spacing(mm) on right section(l/3) of Beam : 110\n", 795 | "\n", 796 | "***********************************************************\n", 797 | "\n", 798 | "Enter Beam Span(mm) no 2 : 3500\n", 799 | "\n", 800 | "\n", 801 | "For stirrups : \n", 802 | "Enter Spacing(mm) on left section(l/3) of Beam : 150\n", 803 | "Enter Spacing(mm) on center section of Beam : 200\n", 804 | "Enter Spacing(mm) on right section(l/3) of Beam : 150\n", 805 | "\n", 806 | "***********************************************************\n", 807 | "\n", 808 | "Enter Beam Span(mm) no 3 : 3000\n", 809 | "\n", 810 | "\n", 811 | "For stirrups : \n", 812 | "Enter Spacing(mm) on left section(l/3) of Beam : 110\n", 813 | "Enter Spacing(mm) on center section of Beam : 150\n", 814 | "Enter Spacing(mm) on right section(l/3) of Beam : 110\n", 815 | "\n", 816 | "\n", 817 | "Storey no 1 :\n", 818 | "\n", 819 | "Enter the no of span : 2\n", 820 | "Enter starting grid(mm) origin or shift from origin on right : 3300\n", 821 | "\n", 822 | "***********************************************************\n", 823 | "\n", 824 | "Enter Beam Span(mm) no 1 : 3500\n", 825 | "\n", 826 | "\n", 827 | "For stirrups : \n", 828 | "Enter Spacing(mm) on left section(l/3) of Beam : 150\n", 829 | "Enter Spacing(mm) on center section of Beam : 200\n", 830 | "Enter Spacing(mm) on right section(l/3) of Beam : 150\n", 831 | "\n", 832 | "***********************************************************\n", 833 | "\n", 834 | "Enter Beam Span(mm) no 2 : 3000\n", 835 | "\n", 836 | "\n", 837 | "For stirrups : \n", 838 | "Enter Spacing(mm) on left section(l/3) of Beam : 110\n", 839 | "Enter Spacing(mm) on center section of Beam : 150\n", 840 | "Enter Spacing(mm) on right section(l/3) of Beam : 110\n", 841 | "\n", 842 | "\n", 843 | "Storey no 2 :\n", 844 | "\n", 845 | "Enter the no of span : 1\n", 846 | "Enter starting grid(mm) origin or shift from origin on right : 7100\n", 847 | "\n", 848 | "***********************************************************\n", 849 | "\n", 850 | "Enter Beam Span(mm) no 1 : 3000\n", 851 | "\n", 852 | "\n", 853 | "For stirrups : \n", 854 | "Enter Spacing(mm) on left section(l/3) of Beam : 110\n", 855 | "Enter Spacing(mm) on center section of Beam : 150\n", 856 | "Enter Spacing(mm) on right section(l/3) of Beam : 110\n", 857 | "\n", 858 | "\n", 859 | "****************************************************\n", 860 | "\n", 861 | "Drawing has been created....\n", 862 | "\n", 863 | "****************************************************\n" 864 | ] 865 | } 866 | ], 867 | "source": [ 868 | "###Output @ Autocad\n", 869 | "for i in range(N):\n", 870 | " beam_cc=20\n", 871 | " column_cc=40\n", 872 | " \n", 873 | " print('')\n", 874 | " print('Storey no {} :'.format(i))\n", 875 | " print('')\n", 876 | " \n", 877 | " span_no = int(input('Enter the no of span : '))\n", 878 | " a=int(input('Enter starting grid(mm) origin or shift from origin on right : ')) ## put span+no*width of column\n", 879 | " \n", 880 | " print('')\n", 881 | " \n", 882 | " a_initial=a\n", 883 | " \n", 884 | " \n", 885 | " l_initial = 0\n", 886 | " l_next = 0\n", 887 | " z1=0\n", 888 | " storey_height=3000##int(input('Enter the floor height(mm): ')) ###clear floor height\n", 889 | " for i in range(0,span_no):\n", 890 | " \n", 891 | " ##Parameters input\n", 892 | " print('***********************************************************')\n", 893 | " print('')\n", 894 | " l=int(input('Enter Beam Span(mm) no {} : '.format(i+1)))\n", 895 | " l_next=l\n", 896 | " b=300#int(input('Enter breadth(mm) : '))\n", 897 | " d=400#int(input('Enter depth(mm) : '))\n", 898 | " column_width=300#int(input('Enter the column width(mm) : '))\n", 899 | " print('')\n", 900 | " l_initial=a+l\n", 901 | " l=l_initial\n", 902 | " \n", 903 | " \n", 904 | " long_dim_x0 = [a,a,a,a+l_next,a+l_next,a+l_next/6-b/2,a+l_next/6-b/2,a+l_next/6-b/2,a+l_next/6+b/2,a+l_next/6+b/2,a+l_next/6-b/2-90,a+l_next/6-b/2-90,a+l_next/6-b/2-90,a+l_next/6-b/2-90,a+l_next/6-b/2-90]\n", 905 | " long_dim_y0 = [d+420,d+420,d+420,d+420,d+420,-460+z1,-460+z1,-460+z1,-460+z1,-460+z1,-600+z1,-600+z1,-600+z1,-600+z1-d,-600+z1-d]\n", 906 | " long_dim_x1 = [a+l_next,a+35.36,a+35.36,a+l_next-35.36,a+l_next-35.36,a+l_next/6+b/2,a+l_next/6-b/2+27.36,a+l_next/6-b/2+27.36,a+l_next/6+b/2-27.36,a+l_next/6+b/2-27.36,a+l_next/6-b/2-90,a+l_next/6-b/2-90-27.36,a+l_next/6-b/2-90+27.36,a+l_next/6-b/2-90-27.36,a+l_next/6-b/2-90+27.36]\n", 907 | " long_dim_y1 = [d+420,d+420+35.36,d+420-35.36,d+420+35.36,d+420-35.36,-460+z1,-460+z1+27.36,-460+z1-27.36,-460+z1+27.36,-460+z1-27.36,-600+z1-d,-600+z1-27.36,-600+z1-27.36,-600+z1+27.36-d,-600+z1+27.36-d]\n", 908 | " \n", 909 | " if span_no == 1:\n", 910 | " \n", 911 | " ###--------beam concrete longitudinal section ---------------------------------------###---------extra rebar------### ###l dimension of beam with arrow##\n", 912 | " p1x=[a-column_width,a,a,a+l_next,a+l_next+column_width,a-column_width,a-column_width,a+0,a+0,l_next+a,a+l_next+column_width,a+l_next/3,a+l_next/3,a+(l_next-(l_next/3)),a+(l_next-(l_next/3))]\n", 913 | " p1y=[0,0,0,0,d,d,d,d,d,d,d,d-beam_cc,beam_cc,beam_cc,d-beam_cc]\n", 914 | "\n", 915 | " p2x=[a-column_width,a,a+l_next,a+l_next,a+l_next+column_width,a-column_width,a-column_width,a+0,a+l_next,a+l_next,a+l_next+column_width,a+l_next/3+40,a+l_next/3+40,a+(l_next-(l_next/3))-40,a+(l_next-(l_next/3))-40]\n", 916 | " p2y=[-(d+200),-(d+200),0,-(d+200),-(d+200),d*2+200,-d,d*2+200,d,2*d+200,2*d+200,d-beam_cc-40,beam_cc+40,beam_cc+40,d-beam_cc-40]\n", 917 | "\n", 918 | "\n", 919 | " drawing=draw(p1x,p1y,p2x,p2y)\n", 920 | " draw_stirrup=stirrup(l_next,z,d,beam_cc,a)\n", 921 | " draw_section_AA=section_draw_AA(l_next,z,d,beam_cc,b,a)\n", 922 | " draw_section_BB=section_draw_BB(l_next,z,d,beam_cc,b,a)\n", 923 | " draw_section_CC=section_draw_CC(l_next,z,d,beam_cc,b,a)\n", 924 | " draw_l_dim=l_dimdraw(long_dim_x0,long_dim_y0,long_dim_x1,long_dim_y1)\n", 925 | "\n", 926 | "\n", 927 | "\n", 928 | " text_dim=[l_next,b,d]\n", 929 | " ptext_length=APoint(a+l_next/2-b/4,d+460+z)\n", 930 | " ptext_width=APoint(a+l_next/6-b/4,-430+z)\n", 931 | " ptext_depth=APoint(a+l_next/6-b-100,z-600-d/2)\n", 932 | "\n", 933 | " text_length=acad.model.AddText(' %s'%text_dim[0],ptext_length,30)\n", 934 | " text_length.layer='text'\n", 935 | "\n", 936 | " text_width=acad.model.AddText(' %s'%text_dim[1],ptext_width,30)\n", 937 | " text_width.layer='text'\n", 938 | "\n", 939 | " text_depth=acad.model.AddText(' %s'%text_dim[2],ptext_depth,30)\n", 940 | " text_depth.layer='text'\n", 941 | "\n", 942 | " else:\n", 943 | " \n", 944 | " \n", 945 | " if i == 0 :\n", 946 | "\n", 947 | " ###--------beam concrete longitudinal section ---------------------------------------###---------extra rebar------### ###l dimension of beam with arrow##\n", 948 | " p1x=[a-column_width,a,a,a+l_next,a+l_next+column_width,a-column_width,a-column_width,a+0,a+0,l_next+a,a+l_next+column_width,a+l_next/3,a+l_next/3,a+(l_next-(l_next/3)),a+(l_next-(l_next/3))]\n", 949 | " p1y=[0,0,0,0,0,d,d,d,d,d,d,d-beam_cc,beam_cc,beam_cc,d-beam_cc]\n", 950 | "\n", 951 | " p2x=[a-column_width,a,a+l_next,a+l_next,a+l_next+column_width,a-column_width,a-column_width,a+0,a+l_next,a+l_next,a+l_next+column_width,a+l_next/3+40,a+l_next/3+40,a+(l_next-(l_next/3))-40,a+(l_next-(l_next/3))-40]\n", 952 | " p2y=[-(d+200),-(d+200),0,-(d+200),-(d+200),d*2+200,-d,d*2+200,d,2*d+200,2*d+200,d-beam_cc-40,beam_cc+40,beam_cc+40,d-beam_cc-40]\n", 953 | "\n", 954 | "\n", 955 | " drawing=draw(p1x,p1y,p2x,p2y)\n", 956 | " draw_stirrup=stirrup(l_next,z,d,beam_cc,a)\n", 957 | " draw_section_AA=section_draw_AA(l_next,z,d,beam_cc,b,a)\n", 958 | " draw_section_BB=section_draw_BB(l_next,z,d,beam_cc,b,a)\n", 959 | " draw_section_CC=section_draw_CC(l_next,z,d,beam_cc,b,a)\n", 960 | " draw_l_dim=l_dimdraw(long_dim_x0,long_dim_y0,long_dim_x1,long_dim_y1)\n", 961 | "\n", 962 | "\n", 963 | " \n", 964 | "\n", 965 | " text_dim=[l_next,b,d]\n", 966 | " ptext_length=APoint(a+l_next/2-b/4,d+460+z)\n", 967 | " ptext_width=APoint(a+l_next/6-b/4,-430+z)\n", 968 | " ptext_depth=APoint(a+l_next/6-b-100,z-600-d/2)\n", 969 | "\n", 970 | " text_length=acad.model.AddText(' %s'%text_dim[0],ptext_length,30)\n", 971 | " text_length.layer='text'\n", 972 | "\n", 973 | " text_width=acad.model.AddText(' %s'%text_dim[1],ptext_width,30)\n", 974 | " text_width.layer='text'\n", 975 | "\n", 976 | " text_depth=acad.model.AddText(' %s'%text_dim[2],ptext_depth,30)\n", 977 | " text_depth.layer='text'\n", 978 | "\n", 979 | "\n", 980 | " elif i == span_no-1:\n", 981 | "\n", 982 | " p1x=[a,a,l,l,l+column_width,a+l_next/3,a+l_next/3,a+(l_next-(l_next/3)),a+(l_next-(l_next/3))]\n", 983 | " p1y=[d,0,d,0,d*2+200,d-beam_cc,beam_cc,beam_cc,d-beam_cc]\n", 984 | "\n", 985 | " p2x=[l,l,l,l,l+column_width,a+l_next/3+40,a+l_next/3+40,a+(l_next-(l_next/3))-40,a+(l_next-(l_next/3))-40]\n", 986 | " p2y=[d,0,2*d+200,-(d+200),-(d+200),d-beam_cc-40,beam_cc+40,beam_cc+40,d-beam_cc-40]\n", 987 | "\n", 988 | " drawing=draw(p1x,p1y,p2x,p2y)\n", 989 | " draw_stirrup=stirrup(l_next,z,d,beam_cc,a)\n", 990 | " draw_section_AA=section_draw_AA(l_next,z,d,beam_cc,b,a)\n", 991 | " draw_section_BB=section_draw_BB(l_next,z,d,beam_cc,b,a)\n", 992 | " draw_section_CC=section_draw_CC(l_next,z,d,beam_cc,b,a)\n", 993 | " draw_l_dim=l_dimdraw(long_dim_x0,long_dim_y0,long_dim_x1,long_dim_y1)\n", 994 | "\n", 995 | " text_dim=[l_next,b,d]\n", 996 | " ptext_length=APoint(a+l_next/2-b/4,d+460+z)\n", 997 | " ptext_width=APoint(a+l_next/6-b/4,-430+z)\n", 998 | " ptext_depth=APoint(a+l_next/6-b-100,z-600-d/2)\n", 999 | "\n", 1000 | " text_length=acad.model.AddText(' %s'%text_dim[0],ptext_length,30)\n", 1001 | " text_length.layer='text'\n", 1002 | "\n", 1003 | " text_width=acad.model.AddText(' %s'%text_dim[1],ptext_width,30)\n", 1004 | " text_width.layer='text'\n", 1005 | "\n", 1006 | " text_depth=acad.model.AddText(' %s'%text_dim[2],ptext_depth,30)\n", 1007 | " text_depth.layer='text'\n", 1008 | "\n", 1009 | "\n", 1010 | " else:\n", 1011 | " p1x=[a,a,l,l,l+column_width,l+column_width,a+l_next/3,a+l_next/3,a+(l_next-(l_next/3)),a+(l_next-(l_next/3))]\n", 1012 | " p1y=[d,0,d,0,d,0,d-beam_cc,beam_cc,beam_cc,d-beam_cc]\n", 1013 | "\n", 1014 | " p2x=[l,l,l,l,l+column_width,l+column_width,a+l_next/3+40,a+l_next/3+40,a+(l_next-(l_next/3))-40,a+(l_next-(l_next/3))-40]\n", 1015 | " p2y=[d,0,2*d+200,-(d+200),(d*2+200),-(d+200),d-beam_cc-40,beam_cc+40,beam_cc+40,d-beam_cc-40]\n", 1016 | "\n", 1017 | " drawing_1=draw(p1x,p1y,p2x,p2y)\n", 1018 | " draw_stirrup=stirrup(l_next,z,d,beam_cc,a)\n", 1019 | " draw_section_AA=section_draw_AA(l_next,z,d,beam_cc,b,a)\n", 1020 | " draw_section_BB=section_draw_BB(l_next,z,d,beam_cc,b,a)\n", 1021 | " draw_section_CC=section_draw_CC(l_next,z,d,beam_cc,b,a)\n", 1022 | " draw_l_dim=l_dimdraw(long_dim_x0,long_dim_y0,long_dim_x1,long_dim_y1)\n", 1023 | "\n", 1024 | "\n", 1025 | " text_dim=[l_next,b,d]\n", 1026 | " ptext_length=APoint(a+l_next/2-b/4,d+460+z)\n", 1027 | " ptext_width=APoint(a+l_next/6-b/4,-430+z)\n", 1028 | " ptext_depth=APoint(a+l_next/6-b-100,z-600-d/2)\n", 1029 | "\n", 1030 | " text_length=acad.model.AddText(' %s'%text_dim[0],ptext_length,30)\n", 1031 | " text_length.layer='text'\n", 1032 | "\n", 1033 | " text_width=acad.model.AddText(' %s'%text_dim[1],ptext_width,30)\n", 1034 | " text_width.layer='text'\n", 1035 | "\n", 1036 | " text_depth=acad.model.AddText(' %s'%text_dim[2],ptext_depth,30)\n", 1037 | " text_depth.layer='text'\n", 1038 | " \n", 1039 | " \n", 1040 | " \n", 1041 | " a=l_initial+column_width\n", 1042 | "\n", 1043 | " l_initial=l_initial+column_width\n", 1044 | "\n", 1045 | " dimension_each=a-l\n", 1046 | " #print(l,a)\n", 1047 | " #print(dimension_each)\n", 1048 | " \n", 1049 | "\n", 1050 | " draw_without_cantilever(column_width,column_cc,a,a_initial,d,beam_cc)\n", 1051 | " \n", 1052 | " \n", 1053 | " \n", 1054 | " \n", 1055 | " z=z+storey_height+d\n", 1056 | " z1=z-storey_height-d\n", 1057 | " \n", 1058 | "\n", 1059 | "print('')\n", 1060 | "print('****************************************************')\n", 1061 | "print('')\n", 1062 | "print(\"Drawing has been created....\")\n", 1063 | "print('')\n", 1064 | "print('****************************************************')\n" 1065 | ] 1066 | }, 1067 | { 1068 | "cell_type": "code", 1069 | "execution_count": null, 1070 | "metadata": {}, 1071 | "outputs": [], 1072 | "source": [ 1073 | "span_1+column_width+span_2+column_width=3000+300+3500+300" 1074 | ] 1075 | }, 1076 | { 1077 | "cell_type": "code", 1078 | "execution_count": null, 1079 | "metadata": {}, 1080 | "outputs": [], 1081 | "source": [] 1082 | }, 1083 | { 1084 | "cell_type": "code", 1085 | "execution_count": null, 1086 | "metadata": {}, 1087 | "outputs": [], 1088 | "source": [] 1089 | } 1090 | ], 1091 | "metadata": { 1092 | "kernelspec": { 1093 | "display_name": "Python 3", 1094 | "language": "python", 1095 | "name": "python3" 1096 | }, 1097 | "language_info": { 1098 | "codemirror_mode": { 1099 | "name": "ipython", 1100 | "version": 3 1101 | }, 1102 | "file_extension": ".py", 1103 | "mimetype": "text/x-python", 1104 | "name": "python", 1105 | "nbconvert_exporter": "python", 1106 | "pygments_lexer": "ipython3", 1107 | "version": "3.7.6" 1108 | } 1109 | }, 1110 | "nbformat": 4, 1111 | "nbformat_minor": 4 1112 | } 1113 | -------------------------------------------------------------------------------- /EPANET/Drawing1.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/EPANET/Drawing1.dwg -------------------------------------------------------------------------------- /EPANET/Easy_labelling_Epanet_Data_Using_#Python.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "Easy Labelling of Epanet Data On Autocad Using #Python#Pyautocad#Pandas" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "1.This code cell is the required package and library required to execute the task." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 2, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "from pyautocad import Autocad, APoint\n", 24 | "import pandas as pd" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "metadata": {}, 30 | "source": [ 31 | " 2.This code cell link active autocad modelspace for the drawing." 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": 3, 37 | "metadata": {}, 38 | "outputs": [ 39 | { 40 | "name": "stdout", 41 | "output_type": "stream", 42 | "text": [ 43 | "Drawing1.dwg\n" 44 | ] 45 | } 46 | ], 47 | "source": [ 48 | "acad=Autocad() #create_if_not_exists=True\n", 49 | "print(acad.doc.Name)\n", 50 | "doc=acad.ActiveDocument\n", 51 | "ms=doc.ModelSpace\n" 52 | ] 53 | }, 54 | { 55 | "cell_type": "markdown", 56 | "metadata": {}, 57 | "source": [ 58 | " 3.This code cell will set layers details to be loaded on autocad modelspace." 59 | ] 60 | }, 61 | { 62 | "cell_type": "code", 63 | "execution_count": 4, 64 | "metadata": {}, 65 | "outputs": [], 66 | "source": [ 67 | "layers=['node','linkid','text','tp','ln']\n", 68 | "colors = [20,92,2,250,170]\n", 69 | "Lt= ['HIDDEN','ACAD_ISO06W100','PHANTOM','DOT','ACAD_ISO05W100']" 70 | ] 71 | }, 72 | { 73 | "cell_type": "markdown", 74 | "metadata": {}, 75 | "source": [ 76 | " 4.This code cell will load layers on autocad modelspace." 77 | ] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "execution_count": 5, 82 | "metadata": {}, 83 | "outputs": [], 84 | "source": [ 85 | "for i in range(len(layers)):\n", 86 | " Layer1=acad.ActiveDocument.Layers.Add(layers[i])\n", 87 | " Layer1.color=colors[i]\n", 88 | " acad.ActiveDocument.Linetypes.Load(Lt[i],\"acad.lin\")\n", 89 | " Layer1.Linetype=Lt[i]\n", 90 | " Layer1.Lineweight= 0.02" 91 | ] 92 | }, 93 | { 94 | "cell_type": "markdown", 95 | "metadata": {}, 96 | "source": [ 97 | " 5.Importing data from Epanet Report in Jupyter notebook .Here Pandas library is used." 98 | ] 99 | }, 100 | { 101 | "cell_type": "code", 102 | "execution_count": 10, 103 | "metadata": {}, 104 | "outputs": [], 105 | "source": [ 106 | "file=pd.read_excel('epanet_output.xls',sheet_name='Nodal')\n", 107 | "file_lnk=pd.read_excel('epanet_output.xls',sheet_name='link_design')\n", 108 | "file_lnkana=pd.read_excel('epanet_output.xls',sheet_name='link_analysis')" 109 | ] 110 | }, 111 | { 112 | "cell_type": "markdown", 113 | "metadata": {}, 114 | "source": [ 115 | " 6.Displaying the data from imported excel file." 116 | ] 117 | }, 118 | { 119 | "cell_type": "code", 120 | "execution_count": 11, 121 | "metadata": {}, 122 | "outputs": [ 123 | { 124 | "data": { 125 | "text/html": [ 126 | "
\n", 127 | "\n", 140 | "\n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | " \n", 209 | " \n", 210 | " \n", 211 | "
S.N.XYZWater DemandHeadPressureNode1
01628936.2423122051.4121020.0NaN1020.000.00R1
12628919.2253122005.9871000.50.51002.061.56N1
23628811.0003121714.600928.80.31001.9773.17N2
34628820.4003121626.900914.10.31001.8787.77N3
45628784.3003121545.300904.50.31001.7897.28N4
\n", 212 | "
" 213 | ], 214 | "text/plain": [ 215 | " S.N. X Y Z Water Demand Head Pressure \\\n", 216 | "0 1 628936.242 3122051.412 1020.0 NaN 1020.00 0.00 \n", 217 | "1 2 628919.225 3122005.987 1000.5 0.5 1002.06 1.56 \n", 218 | "2 3 628811.000 3121714.600 928.8 0.3 1001.97 73.17 \n", 219 | "3 4 628820.400 3121626.900 914.1 0.3 1001.87 87.77 \n", 220 | "4 5 628784.300 3121545.300 904.5 0.3 1001.78 97.28 \n", 221 | "\n", 222 | " Node1 \n", 223 | "0 R1 \n", 224 | "1 N1 \n", 225 | "2 N2 \n", 226 | "3 N3 \n", 227 | "4 N4 " 228 | ] 229 | }, 230 | "execution_count": 11, 231 | "metadata": {}, 232 | "output_type": "execute_result" 233 | } 234 | ], 235 | "source": [ 236 | "file.head()" 237 | ] 238 | }, 239 | { 240 | "cell_type": "code", 241 | "execution_count": 12, 242 | "metadata": {}, 243 | "outputs": [ 244 | { 245 | "data": { 246 | "text/html": [ 247 | "
\n", 248 | "\n", 261 | "\n", 262 | " \n", 263 | " \n", 264 | " \n", 265 | " \n", 266 | " \n", 267 | " \n", 268 | " \n", 269 | " \n", 270 | " \n", 271 | " \n", 272 | " \n", 273 | " \n", 274 | " \n", 275 | " \n", 276 | " \n", 277 | " \n", 278 | " \n", 279 | " \n", 280 | " \n", 281 | " \n", 282 | " \n", 283 | " \n", 284 | " \n", 285 | " \n", 286 | " \n", 287 | " \n", 288 | " \n", 289 | " \n", 290 | " \n", 291 | " \n", 292 | " \n", 293 | " \n", 294 | " \n", 295 | " \n", 296 | " \n", 297 | " \n", 298 | " \n", 299 | " \n", 300 | " \n", 301 | " \n", 302 | " \n", 303 | " \n", 304 | " \n", 305 | " \n", 306 | " \n", 307 | " \n", 308 | " \n", 309 | " \n", 310 | " \n", 311 | " \n", 312 | " \n", 313 | " \n", 314 | " \n", 315 | " \n", 316 | " \n", 317 | " \n", 318 | " \n", 319 | " \n", 320 | " \n", 321 | " \n", 322 | " \n", 323 | " \n", 324 | " \n", 325 | " \n", 326 | " \n", 327 | " \n", 328 | " \n", 329 | " \n", 330 | " \n", 331 | " \n", 332 | " \n", 333 | " \n", 334 | " \n", 335 | " \n", 336 | " \n", 337 | " \n", 338 | "
S.N.XYZWater DemandlinkIDLengthDiameterPressure Class
01628927.73353.122029e+061020.0NaNP148.51506H
12628865.11253.121860e+061000.50.5P2310.842006H
23628815.70003.121671e+06928.80.3P388.201506H
34628802.35003.121586e+06914.10.3P489.231506H
45628780.05003.121493e+06904.50.3P5104.251106H
\n", 339 | "
" 340 | ], 341 | "text/plain": [ 342 | " S.N. X Y Z Water Demand linkID Length \\\n", 343 | "0 1 628927.7335 3.122029e+06 1020.0 NaN P1 48.51 \n", 344 | "1 2 628865.1125 3.121860e+06 1000.5 0.5 P2 310.84 \n", 345 | "2 3 628815.7000 3.121671e+06 928.8 0.3 P3 88.20 \n", 346 | "3 4 628802.3500 3.121586e+06 914.1 0.3 P4 89.23 \n", 347 | "4 5 628780.0500 3.121493e+06 904.5 0.3 P5 104.25 \n", 348 | "\n", 349 | " Diameter Pressure Class \n", 350 | "0 50 6H \n", 351 | "1 200 6H \n", 352 | "2 150 6H \n", 353 | "3 150 6H \n", 354 | "4 110 6H " 355 | ] 356 | }, 357 | "execution_count": 12, 358 | "metadata": {}, 359 | "output_type": "execute_result" 360 | } 361 | ], 362 | "source": [ 363 | "file_lnk.head()" 364 | ] 365 | }, 366 | { 367 | "cell_type": "code", 368 | "execution_count": 13, 369 | "metadata": {}, 370 | "outputs": [ 371 | { 372 | "data": { 373 | "text/html": [ 374 | "
\n", 375 | "\n", 388 | "\n", 389 | " \n", 390 | " \n", 391 | " \n", 392 | " \n", 393 | " \n", 394 | " \n", 395 | " \n", 396 | " \n", 397 | " \n", 398 | " \n", 399 | " \n", 400 | " \n", 401 | " \n", 402 | " \n", 403 | " \n", 404 | " \n", 405 | " \n", 406 | " \n", 407 | " \n", 408 | " \n", 409 | " \n", 410 | " \n", 411 | " \n", 412 | " \n", 413 | " \n", 414 | " \n", 415 | " \n", 416 | " \n", 417 | " \n", 418 | " \n", 419 | " \n", 420 | " \n", 421 | " \n", 422 | " \n", 423 | " \n", 424 | " \n", 425 | " \n", 426 | " \n", 427 | " \n", 428 | " \n", 429 | " \n", 430 | " \n", 431 | " \n", 432 | " \n", 433 | " \n", 434 | " \n", 435 | " \n", 436 | " \n", 437 | " \n", 438 | " \n", 439 | " \n", 440 | " \n", 441 | " \n", 442 | " \n", 443 | " \n", 444 | " \n", 445 | " \n", 446 | " \n", 447 | " \n", 448 | " \n", 449 | " \n", 450 | " \n", 451 | " \n", 452 | " \n", 453 | " \n", 454 | " \n", 455 | " \n", 456 | " \n", 457 | " \n", 458 | " \n", 459 | "
S.N.XYZPipe IDflowVelocityHeadloss
01628927.73353.122029e+061020.0P17.050.220.30
12628865.11253.121860e+061000.5P26.750.381.13
23628815.70003.121671e+06928.8P36.450.361.04
34628802.35003.121586e+06914.1P46.150.654.44
45628780.05003.121493e+06904.5P55.850.624.04
\n", 460 | "
" 461 | ], 462 | "text/plain": [ 463 | " S.N. X Y Z Pipe ID flow Velocity Headloss\n", 464 | "0 1 628927.7335 3.122029e+06 1020.0 P1 7.05 0.22 0.30\n", 465 | "1 2 628865.1125 3.121860e+06 1000.5 P2 6.75 0.38 1.13\n", 466 | "2 3 628815.7000 3.121671e+06 928.8 P3 6.45 0.36 1.04\n", 467 | "3 4 628802.3500 3.121586e+06 914.1 P4 6.15 0.65 4.44\n", 468 | "4 5 628780.0500 3.121493e+06 904.5 P5 5.85 0.62 4.04" 469 | ] 470 | }, 471 | "execution_count": 13, 472 | "metadata": {}, 473 | "output_type": "execute_result" 474 | } 475 | ], 476 | "source": [ 477 | "file_lnkana.head()" 478 | ] 479 | }, 480 | { 481 | "cell_type": "markdown", 482 | "metadata": {}, 483 | "source": [ 484 | " 7.Finding number of Nodes." 485 | ] 486 | }, 487 | { 488 | "cell_type": "code", 489 | "execution_count": 14, 490 | "metadata": {}, 491 | "outputs": [ 492 | { 493 | "data": { 494 | "text/plain": [ 495 | "19" 496 | ] 497 | }, 498 | "execution_count": 14, 499 | "metadata": {}, 500 | "output_type": "execute_result" 501 | } 502 | ], 503 | "source": [ 504 | "n=file['S.N.'].count()\n", 505 | "n" 506 | ] 507 | }, 508 | { 509 | "cell_type": "markdown", 510 | "metadata": {}, 511 | "source": [ 512 | " 8.Finding number of links." 513 | ] 514 | }, 515 | { 516 | "cell_type": "code", 517 | "execution_count": 15, 518 | "metadata": {}, 519 | "outputs": [ 520 | { 521 | "data": { 522 | "text/plain": [ 523 | "18" 524 | ] 525 | }, 526 | "execution_count": 15, 527 | "metadata": {}, 528 | "output_type": "execute_result" 529 | } 530 | ], 531 | "source": [ 532 | "n1=file_lnk['S.N.'].count()\n", 533 | "n1" 534 | ] 535 | }, 536 | { 537 | "cell_type": "code", 538 | "execution_count": 16, 539 | "metadata": {}, 540 | "outputs": [ 541 | { 542 | "data": { 543 | "text/plain": [ 544 | "18" 545 | ] 546 | }, 547 | "execution_count": 16, 548 | "metadata": {}, 549 | "output_type": "execute_result" 550 | } 551 | ], 552 | "source": [ 553 | "n2=file_lnkana['S.N.'].count()\n", 554 | "n2" 555 | ] 556 | }, 557 | { 558 | "cell_type": "markdown", 559 | "metadata": {}, 560 | "source": [ 561 | " 9.This code cell will draw points(Nodes) on autocad modelspace and also list the points for connecting it with lines." 562 | ] 563 | }, 564 | { 565 | "cell_type": "code", 566 | "execution_count": 20, 567 | "metadata": {}, 568 | "outputs": [], 569 | "source": [ 570 | "points_list=[]\n", 571 | "for i in range(n):\n", 572 | " points= APoint(file['X'][i],file['Y'][i],file['Z'][i])\n", 573 | " #print(\"Points no {} : x = {} , y = {} \".format(i+1,points[0],points[1]))\n", 574 | " #print(points)\n", 575 | " # \n", 576 | " InsertionPnt=points\n", 577 | " pointblock=acad.model.InsertBlock(InsertionPnt,'point_block',7.5,7.5,7.5,0)\n", 578 | " pointblock.layer = 'node'\n", 579 | " points_list.append(points)\n", 580 | " \n", 581 | " points_loc=APoint(points[0]+8,points[1]+3)\n", 582 | " text_length=acad.model.AddText('%s'%(file['Node1'][i]),points_loc,5)\n", 583 | " text_length.layer='node'\n", 584 | " #text_data=acad.model.AddText(' (water demand = %s lps)'%(file['Water Demand'][i]),points_loc,2)\n", 585 | " #text_data=acad.model.AddText(' (demand = %s lps,Residual Pressure = %s m)'%(file['Water Demand'][i],file['Residual Pressure'][i]),points_loc,5)\n", 586 | " #text_data.layer='text'" 587 | ] 588 | }, 589 | { 590 | "cell_type": "markdown", 591 | "metadata": {}, 592 | "source": [ 593 | " 10.This code cell will label link design data on autocad modelspace at midpoint of every link respectively." 594 | ] 595 | }, 596 | { 597 | "cell_type": "code", 598 | "execution_count": 21, 599 | "metadata": {}, 600 | "outputs": [], 601 | "source": [ 602 | "points_list1=[]\n", 603 | "for i in range(n1):\n", 604 | " points= APoint(file_lnk['X'][i],file_lnk['Y'][i],file_lnk['Z'][i])\n", 605 | " #print(\"Points no {} : x = {} , y = {} \".format(i+1,points[0],points[1]))\n", 606 | " #print(points)\n", 607 | "\n", 608 | " points_loc=APoint(points[0]+25,points[1])\n", 609 | " text_length=acad.model.AddText('%s'%(file_lnk['linkID'][i]),points_loc,5)\n", 610 | " text_length.layer='linkid'\n", 611 | " text_length=acad.model.AddText(' (%s m-DN %s mm-%s)'%(file_lnk['Length'][i],file_lnk['Diameter'][i],file_lnk['Pressure Class'][i]),points_loc,3)\n", 612 | " text_length.layer='text'" 613 | ] 614 | }, 615 | { 616 | "cell_type": "markdown", 617 | "metadata": {}, 618 | "source": [ 619 | " 11.This code cell will label link analysis data on autocad modelspace at midpoint of every link respectively." 620 | ] 621 | }, 622 | { 623 | "cell_type": "code", 624 | "execution_count": 22, 625 | "metadata": {}, 626 | "outputs": [], 627 | "source": [ 628 | "points_list2=[]\n", 629 | "for i in range(n2):\n", 630 | " points= APoint(file_lnkana['X'][i],file_lnkana['Y'][i],file_lnkana['Z'][i])\n", 631 | " #print(\"Points no {} : x = {} , y = {} \".format(i+1,points[0],points[1]))\n", 632 | " #print(points)\n", 633 | " \n", 634 | " points_loc=APoint(points[0]+20,points[1]-10)\n", 635 | " text_length=acad.model.AddText(' (Q = %s lps v = %s m/s h_loss = %s m )'%(file_lnkana['flow'][i],file_lnkana['Velocity'][i],file_lnkana['Headloss'][i]),points_loc,3)\n", 636 | " text_length.layer='text'" 637 | ] 638 | }, 639 | { 640 | "cell_type": "markdown", 641 | "metadata": {}, 642 | "source": [ 643 | " 12.This code cell will draw lines (link) between points(nodes) on autocad modelspace." 644 | ] 645 | }, 646 | { 647 | "cell_type": "code", 648 | "execution_count": 23, 649 | "metadata": {}, 650 | "outputs": [], 651 | "source": [ 652 | "for i in range(n):\n", 653 | " if i< n-1:\n", 654 | " line1=acad.model.AddLine(points_list[i],points_list[i+1])\n", 655 | " line1.layer='ln'\n", 656 | " else:\n", 657 | " break" 658 | ] 659 | }, 660 | { 661 | "cell_type": "code", 662 | "execution_count": null, 663 | "metadata": {}, 664 | "outputs": [], 665 | "source": [] 666 | } 667 | ], 668 | "metadata": { 669 | "kernelspec": { 670 | "display_name": "Python 3", 671 | "language": "python", 672 | "name": "python3" 673 | }, 674 | "language_info": { 675 | "codemirror_mode": { 676 | "name": "ipython", 677 | "version": 3 678 | }, 679 | "file_extension": ".py", 680 | "mimetype": "text/x-python", 681 | "name": "python", 682 | "nbconvert_exporter": "python", 683 | "pygments_lexer": "ipython3", 684 | "version": "3.7.6" 685 | } 686 | }, 687 | "nbformat": 4, 688 | "nbformat_minor": 4 689 | } 690 | -------------------------------------------------------------------------------- /EPANET/epanet_output.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/EPANET/epanet_output.xls -------------------------------------------------------------------------------- /EPANET/for_coordinates.inp: -------------------------------------------------------------------------------- 1 | [TITLE] 2 | 3 | 4 | [JUNCTIONS] 5 | ;ID Elev Demand Pattern 6 | 1 1000.5 0.5 ; 7 | 2 928.8 0.3 ; 8 | 3 914.1 0.3 ; 9 | 4 904.5 0.3 ; 10 | 5 901.8 0.3 ; 11 | 6 904 0.3 ; 12 | 7 901.8 0.45 ; 13 | 8 898.4 0.3 ; 14 | 9 883 0.3 ; 15 | 11 881.2 0.3 ; 16 | 12 866.6 0.3 ; 17 | 13 873.1 0.7 ; 18 | 14 859.7 0.9 ; 19 | 15 865 1.1 ; 20 | 16 860 0.3 ; 21 | 17 830 0.3 ; 22 | 18 828 0.3 ; 23 | 19 825 0.3 ; 24 | 25 | [RESERVOIRS] 26 | ;ID Head Pattern 27 | R1 1020 ; 28 | 29 | [TANKS] 30 | ;ID Elevation InitLevel MinLevel MaxLevel Diameter MinVol VolCurve Overflow 31 | 32 | [PIPES] 33 | ;ID Node1 Node2 Length Diameter Roughness MinorLoss Status 34 | P1 1 2 310.84 200 0.1 0 Open ; 35 | P2 2 3 88.20 150 0.1 0 Open ; 36 | P3 3 4 89.23 150 0.1 0 Open ; 37 | P4 4 5 104.25 110 0.1 0 Open ; 38 | P5 5 6 46.08 110 0.1 0 Open ; 39 | P6 6 7 44.86 110 0.1 0 Open ; 40 | P7 7 8 86.12 110 0.1 0 Open ; 41 | P8 8 9 613.88 110 0.1 0 Open ; 42 | P9 9 11 29.95 110 0.1 0 Open ; 43 | P10 11 12 70.63 110 0.1 0 Open ; 44 | P11 12 13 71.60 50 0.1 0 Open ; 45 | P12 13 14 113.29 50 0.1 0 Open ; 46 | P13 14 15 60.17 50 0.1 0 Open ; 47 | P14 15 16 60.55 50 0.1 0 Open ; 48 | P15 16 17 60.74 50 0.1 0 Open ; 49 | P16 17 18 49.37 50 0.1 0 Open ; 50 | P17 18 19 31.85 50 0.1 0 Open ; 51 | P18 R1 1 48.51 50 0.1 0 Open ; 52 | 53 | [PUMPS] 54 | ;ID Node1 Node2 Parameters 55 | 56 | [VALVES] 57 | ;ID Node1 Node2 Diameter Type Setting MinorLoss 58 | 59 | [TAGS] 60 | 61 | [DEMANDS] 62 | ;Junction Demand Pattern Category 63 | 64 | [STATUS] 65 | ;ID Status/Setting 66 | 67 | [PATTERNS] 68 | ;ID Multipliers 69 | 70 | [CURVES] 71 | ;ID X-Value Y-Value 72 | 73 | [CONTROLS] 74 | 75 | 76 | [RULES] 77 | 78 | 79 | [ENERGY] 80 | Global Efficiency 75 81 | Global Price 0 82 | Demand Charge 0 83 | 84 | [EMITTERS] 85 | ;Junction Coefficient 86 | 87 | [QUALITY] 88 | ;Node InitQual 89 | 90 | [SOURCES] 91 | ;Node Type Quality Pattern 92 | 93 | [REACTIONS] 94 | ;Type Pipe/Tank Coefficient 95 | 96 | 97 | [REACTIONS] 98 | Order Bulk 1 99 | Order Tank 1 100 | Order Wall 1 101 | Global Bulk 0 102 | Global Wall 0 103 | Limiting Potential 0 104 | Roughness Correlation 0 105 | 106 | [MIXING] 107 | ;Tank Model 108 | 109 | [TIMES] 110 | Duration 0:00 111 | Hydraulic Timestep 1:00 112 | Quality Timestep 0:05 113 | Pattern Timestep 1:00 114 | Pattern Start 0:00 115 | Report Timestep 1:00 116 | Report Start 0:00 117 | Start ClockTime 12 am 118 | Statistic NONE 119 | 120 | [REPORT] 121 | Status No 122 | Summary No 123 | Page 0 124 | 125 | [OPTIONS] 126 | Units LPS 127 | Headloss D-W 128 | Specific Gravity 1 129 | Viscosity 1 130 | Trials 40 131 | Accuracy 0.001 132 | CHECKFREQ 2 133 | MAXCHECK 10 134 | DAMPLIMIT 0 135 | Unbalanced Continue 10 136 | Pattern 1 137 | Demand Multiplier 1 138 | Emitter Exponent 0.5 139 | Quality None mg/L 140 | Diffusivity 1 141 | Tolerance 0.01 142 | 143 | [COORDINATES] 144 | ;Node X-Coord Y-Coord 145 | 1 628919.225 3122005.987 146 | 2 628811.000 3121714.600 147 | 3 628820.400 3121626.900 148 | 4 628784.300 3121545.300 149 | 5 628775.800 3121441.400 150 | 6 628789.500 3121397.400 151 | 7 628809.400 3121357.200 152 | 8 628845.700 3121279.100 153 | 9 628993.200 3120683.200 154 | 11 628989.300 3120653.500 155 | 12 628978.500 3120583.700 156 | 13 628989.200 3120512.900 157 | 14 629034.600 3120409.100 158 | 15 628980.100 3120383.600 159 | 16 628932.800 3120345.800 160 | 17 628897.600 3120296.300 161 | 18 628887.400 3120248.000 162 | 19 628897.200 3120217.700 163 | R1 628936.242 3122051.412 164 | 165 | [VERTICES] 166 | ;Link X-Coord Y-Coord 167 | 168 | [LABELS] 169 | ;X-Coord Y-Coord Label & Anchor Node 170 | 171 | [BACKDROP] 172 | DIMENSIONS 627470.520 3114639.655 629109.080 3122353.845 173 | UNITS None 174 | FILE 175 | OFFSET 0.00 0.00 176 | 177 | [END] 178 | -------------------------------------------------------------------------------- /EPANET/information.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /EPANET/output.rpt: -------------------------------------------------------------------------------- 1 | Page 1 2/18/2023 11:16:12 AM 2 | ********************************************************************** 3 | * E P A N E T * 4 | * Hydraulic and Water Quality * 5 | * Analysis for Pipe Networks * 6 | * Version 2.2 * 7 | ********************************************************************** 8 | 9 | Input File: practice_file.net 10 | 11 | 12 | 13 | Link - Node Table: 14 | ---------------------------------------------------------------------- 15 | Link Start End Length Diameter 16 | ID Node Node m mm 17 | ---------------------------------------------------------------------- 18 | P1 1 2 310.84 200 19 | P2 2 3 88.20 150 20 | P3 3 4 89.23 150 21 | P4 4 5 104.25 110 22 | P5 5 6 46.08 110 23 | P6 6 7 44.86 110 24 | P7 7 8 86.12 110 25 | P8 8 9 613.88 110 26 | P9 9 11 29.95 110 27 | P10 11 12 70.63 110 28 | P11 12 13 71.60 50 29 | P12 13 14 113.29 50 30 | P13 14 15 60.17 50 31 | P14 15 16 60.55 50 32 | P15 16 17 60.74 50 33 | P16 17 18 49.37 50 34 | P17 18 19 31.85 50 35 | P18 R1 1 48.51 50 36 | 37 | Node Results: 38 | ---------------------------------------------------------------------- 39 | Node Demand Head Pressure Quality 40 | ID LPS m m 41 | ---------------------------------------------------------------------- 42 | 1 0.50 1002.06 1.56 0.00 43 | 2 0.30 1001.97 73.17 0.00 44 | 3 0.30 1001.87 87.77 0.00 45 | 4 0.30 1001.78 97.28 0.00 46 | 5 0.30 1001.32 99.52 0.00 47 | 6 0.30 1001.13 97.13 0.00 48 | 7 0.45 1000.97 99.17 0.00 49 | 8 0.30 1000.70 102.30 0.00 50 | 9 0.30 998.98 115.98 0.00 51 | 11 0.30 998.91 117.71 0.00 52 | 12 0.30 998.75 132.15 0.00 53 | 13 0.70 991.45 118.35 0.00 54 | 14 0.90 983.56 123.86 0.00 55 | 56 | 57 | Page 2 58 | Node Results: (continued) 59 | ---------------------------------------------------------------------- 60 | Node Demand Head Pressure Quality 61 | ID LPS m m 62 | ---------------------------------------------------------------------- 63 | 15 1.10 981.34 116.34 0.00 64 | 16 0.30 980.69 120.69 0.00 65 | 17 0.30 980.30 150.30 0.00 66 | 18 0.30 980.15 152.15 0.00 67 | 19 0.30 980.12 155.12 0.00 68 | R1 -7.55 1020.00 0.00 0.00 Reservoir 69 | 70 | Link Results: 71 | ---------------------------------------------------------------------- 72 | Link Flow VelocityUnit Headloss Status 73 | ID LPS m/s m/km 74 | ---------------------------------------------------------------------- 75 | P1 7.05 0.22 0.30 Open 76 | P2 6.75 0.38 1.13 Open 77 | P3 6.45 0.36 1.04 Open 78 | P4 6.15 0.65 4.44 Open 79 | P5 5.85 0.62 4.04 Open 80 | P6 5.55 0.58 3.66 Open 81 | P7 5.10 0.54 3.13 Open 82 | P8 4.80 0.51 2.79 Open 83 | P9 4.50 0.47 2.47 Open 84 | P10 4.20 0.44 2.18 Open 85 | P11 3.90 1.99 102.01 Open 86 | P12 3.20 1.63 69.62 Open 87 | P13 2.30 1.17 36.95 Open 88 | P14 1.20 0.61 10.81 Open 89 | P15 0.90 0.46 6.33 Open 90 | P16 0.60 0.31 3.01 Open 91 | P17 0.30 0.15 0.87 Open 92 | P18 7.55 3.85 369.73 Open 93 | 94 | -------------------------------------------------------------------------------- /EPANET/point_block.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/EPANET/point_block.dwg -------------------------------------------------------------------------------- /EPANET/practice_file.net: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/EPANET/practice_file.net -------------------------------------------------------------------------------- /Isolated_footing_Drawing.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/Isolated_footing_Drawing.dwg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Autocad_Automation_learning 2 | ##my beginning level learning 3 | Sharing of my learning....application of python on making simple drawing on autocad.... 4 | 5 | In order to run you have to install pyautocad module from link below 6 | https://pypi.org/project/pyautocad/ 7 | https://pyautocad.readthedocs.io/en/latest/ 8 | 9 | 10 | ##In order to draw on autocad by running given jupyter notebook, you have to open the given .dwg file. 11 | 12 | ##if you want to see the demo........you can go through this link below: 13 | https://www.youtube.com/watch?v=AwDL8p2OG-c&t=32s 14 | 15 | EPANET OUPUT Easy Plotting and labelling can be done as shown in the demo below... 16 | https://youtu.be/eNswbPSgYwM 17 | 18 | -------------------------------------------------------------------------------- /Simple_Beam_AutocadDrawing_automation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Simple Automation of Drawing on Autocad using Basic Python " 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "from pyautocad import Autocad, APoint" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 2, 22 | "metadata": {}, 23 | "outputs": [ 24 | { 25 | "name": "stdout", 26 | "output_type": "stream", 27 | "text": [ 28 | "Beam_Drawing.dwg\n" 29 | ] 30 | } 31 | ], 32 | "source": [ 33 | "acad=Autocad() ###create_if_not_exists=True\n", 34 | "\n", 35 | "print(acad.doc.Name)\n", 36 | "doc=acad.ActiveDocument\n", 37 | "ms=doc.ModelSpace" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": 3, 43 | "metadata": {}, 44 | "outputs": [ 45 | { 46 | "name": "stdout", 47 | "output_type": "stream", 48 | "text": [ 49 | "Enter no of beam to be drawn : 1\n" 50 | ] 51 | } 52 | ], 53 | "source": [ 54 | "z=0\n", 55 | "##Enter no of columns to be drawn\n", 56 | "N=int(input('Enter no of beam to be drawn : '))" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 5, 62 | "metadata": {}, 63 | "outputs": [ 64 | { 65 | "name": "stdout", 66 | "output_type": "stream", 67 | "text": [ 68 | "***********************\n", 69 | "\n", 70 | "Beam no 1 \n", 71 | "Enter length(mm) : 3000\n", 72 | "Enter breadth(mm) : 230\n", 73 | "Enter depth(mm) : 300\n", 74 | "\n", 75 | "For stirrups : \n", 76 | "Enter Spacing(mm) on left section(l/3) of Beam : 100\n", 77 | "Enter Spacing(mm) on center section of Beam : 150\n", 78 | "Enter Spacing(mm) on right section(l/3) of Beam : 100\n", 79 | "\n", 80 | "**********Stirrup Diameter***********\n", 81 | "\n", 82 | "Enter diameter of stirrup : 8\n", 83 | "\n", 84 | "-----------------------------------------------\n", 85 | "Drawing is Ready Please Check the Autocad\n" 86 | ] 87 | } 88 | ], 89 | "source": [ 90 | "\n", 91 | "\n", 92 | "for i in range(N):\n", 93 | "\n", 94 | " ##Parameters input\n", 95 | " print('***********************')\n", 96 | " print('')\n", 97 | " print('Beam no {} '.format(i+1))\n", 98 | " l=int(input('Enter length(mm) : '))\n", 99 | " b=int(input('Enter breadth(mm) : '))\n", 100 | " d=int(input('Enter depth(mm) : '))\n", 101 | " print('')\n", 102 | " \n", 103 | " cc=20\n", 104 | " column_cc=40\n", 105 | " column_width=400\n", 106 | " ##Beam dimension with column joint\n", 107 | "\n", 108 | " p1x=[0,0,-column_width,l,l,l+column_width,0,0,0,-24.7,l+24.7,l/6-b/2-17.7,l/6+b/2-17.7,l/6-b/2,l/6-b/2-32.3,l/6-b/2-32.3,l/6-b/2-50]\n", 109 | " p1y=[0,d,-500,0,d,-500,0,d,d+425,d+400.2,d+449.7,-492.7,-492.7,-475,-600+17.7,-600+17.7-d,-600]\n", 110 | "\n", 111 | " p2x=[0,0,-column_width,l,l,l+column_width,l,l,l,24.7,l-24.7,l/6-b/2+17.7,l/6+b/2+17.7,l/6+b/2,l/6-b/2-67.7,l/6-b/2-67.7,l/6-b/2-50]\n", 112 | " p2y=[-500,d+500,500+d,-500,d+500,500+d,0,d,d+425,d+449.7,d+400.2,-457.3,-457.3,-475,-600-17.7,-600-17.7-d,-600-d]\n", 113 | "\n", 114 | " for j in range(len(p1x)):\n", 115 | " p1=APoint(p1x[j],p1y[j]+z)\n", 116 | " p2=APoint(p2x[j],p2y[j]+z)\n", 117 | " line1=acad.model.AddLine(p1,p2)\n", 118 | " line1.layer='Beam_LSection'\n", 119 | " if j >= 8:\n", 120 | " line1.layer='Text' \n", 121 | " \n", 122 | " ##Dimesnions on figure\n", 123 | " text_dim=[l,b,d]\n", 124 | " ptext_length=APoint(l/2-b/4,d+460+z)\n", 125 | " ptext_width=APoint(l/6-b/4,-430+z)\n", 126 | " ptext_depth=APoint(l/6-b-100,z-600-d/2)\n", 127 | "\n", 128 | " text_length=acad.model.AddText(' %s'%text_dim[0],ptext_length,30)\n", 129 | " text_length.layer='text'\n", 130 | "\n", 131 | " text_width=acad.model.AddText(' %s'%text_dim[1],ptext_width,30)\n", 132 | " text_width.layer='text'\n", 133 | "\n", 134 | " text_depth=acad.model.AddText(' %s'%text_dim[2],ptext_depth,30)\n", 135 | " text_depth.layer='text'\n", 136 | " \n", 137 | " #Longitudinal Rebar Top\n", 138 | "\n", 139 | " p3x=[-(column_width-column_cc),-(column_width-column_cc),-(column_width-column_cc),-(column_width-column_cc),l+(column_width-column_cc),l+(column_width-column_cc)]\n", 140 | " p3y=[cc,cc,d-cc,d-cc,d-cc,cc,d-cc]\n", 141 | "\n", 142 | " p4x=[l+(column_width-column_cc),-(column_width-column_cc),-(column_width-column_cc),l+(column_width-column_cc),l+(column_width-column_cc),l+(column_width-column_cc)]\n", 143 | " p4y=[cc,d+100,-(100),d-cc,-100,d+100]\n", 144 | "\n", 145 | " for k in range(len(p3x)):\n", 146 | " p3=APoint(p3x[k],p3y[k]+z)\n", 147 | " p4=APoint(p4x[k],p4y[k]+z)\n", 148 | " line1= acad.model.AddLine(p3,p4)\n", 149 | " line1.layer='Long_rebar'\n", 150 | " \n", 151 | " ##For stirrups\n", 152 | " print('For stirrups : ')\n", 153 | " spacing_left=int(input('Enter Spacing(mm) on left section(l/3) of Beam : '))\n", 154 | " spacing_center=int(input('Enter Spacing(mm) on center section of Beam : '))\n", 155 | " spacing_right=int(input('Enter Spacing(mm) on right section(l/3) of Beam : '))\n", 156 | " \n", 157 | " sp=0\n", 158 | " \n", 159 | " ##ForStirrups\n", 160 | " print('')\n", 161 | " print('**********Stirrup Diameter***********')\n", 162 | " print('')\n", 163 | " stirrup_dia=int(input('Enter diameter of stirrup : '))\n", 164 | " for j in range(3):\n", 165 | " if j==0:\n", 166 | " n_left=round(((l/3-50*2)/spacing_left))+1\n", 167 | " ##Annotation\n", 168 | " ##inclined line\n", 169 | " ptext_1=APoint(l/6,d/2+z)\n", 170 | " ptext_2=APoint(l/6+46.6,-86.4+z)\n", 171 | " #Line1\n", 172 | " line1=acad.model.AddLine(ptext_1,ptext_2)\n", 173 | " line1.layer='text'\n", 174 | " ##Flat line\n", 175 | " ptext_3=APoint(l/6+46.6,-86.4+z)\n", 176 | " ptext_4=APoint(46.6+77+l/6,-86.4+z)\n", 177 | " line2=acad.model.AddLine(ptext_3,ptext_4)\n", 178 | " line2.layer='text'\n", 179 | " ##Text To beshown\n", 180 | " text_dim=[n_left,stirrup_dia,spacing_left]\n", 181 | " text_length=acad.model.AddText(' %s-%smmdia@%smm c/c'%(text_dim[0],text_dim[1],text_dim[2]),ptext_4,25)\n", 182 | " text_length.layer='text'\n", 183 | "\n", 184 | " \n", 185 | " ##Stirrup lines @middle\n", 186 | " ptext_5=APoint(l/6-250,d/2+z)\n", 187 | " ptext_6=APoint(l/6+250,d/2+z)\n", 188 | " line3=acad.model.AddLine(ptext_5,ptext_6)\n", 189 | " line3.linetype='strrp'\n", 190 | " \n", 191 | " for j in range(n_left):\n", 192 | " if j == 0:\n", 193 | " p3=APoint(50,cc+z)\n", 194 | " p4=APoint(50,z+d-cc)\n", 195 | " line=acad.model.AddLine(p3,p4)\n", 196 | " line.layer='Stirrups_sides'\n", 197 | " sp=sp+50\n", 198 | " # print(sp)\n", 199 | " else:\n", 200 | " sp=sp+spacing_left\n", 201 | " #print(sp)\n", 202 | " p3=APoint(sp,z+cc)\n", 203 | " p4=APoint(sp,z+d-cc)\n", 204 | " line=acad.model.AddLine(p3,p4)\n", 205 | " line.layer='Stirrups_sides' \n", 206 | " \n", 207 | " elif j==1:\n", 208 | " n_center=round(((l/3-50*2)/spacing_center))+1\n", 209 | " ##inclined line\n", 210 | " ptext_1=APoint(l/2,d/2+z)\n", 211 | " ptext_2=APoint(46.6+l/2,d+z+86.4)\n", 212 | " #Line1\n", 213 | " line1=acad.model.AddLine(ptext_1,ptext_2)\n", 214 | " line1.layer='text'\n", 215 | " ##Flat line\n", 216 | " ptext_3=APoint(46.6+l/2,d+z+86.4)\n", 217 | " ptext_4=APoint(46.6+77+l/2,d+z+86.4)\n", 218 | " line2=acad.model.AddLine(ptext_3,ptext_4)\n", 219 | " line2.layer='text'\n", 220 | " ##Text To beshown\n", 221 | " text_dim=[n_center,stirrup_dia,spacing_center]\n", 222 | " text_length=acad.model.AddText(' %s-%smmdia@%smm c/c'%(text_dim[0],text_dim[1],text_dim[2]),ptext_4,25)\n", 223 | " text_length.layer='text'\n", 224 | " \n", 225 | " ##Stirrup lines @middle\n", 226 | " ptext_5=APoint(l/2-250,d/2+z)\n", 227 | " ptext_6=APoint(l/2+250,d/2+z)\n", 228 | " line3=acad.model.AddLine(ptext_5,ptext_6)\n", 229 | " line3.linetype='strrp'\n", 230 | " \n", 231 | " for j in range(n_center):\n", 232 | " sp=sp+spacing_center\n", 233 | " #print(sp)\n", 234 | " p3=APoint(sp,z+cc)\n", 235 | " p4=APoint(sp,z+d-cc)\n", 236 | " line=acad.model.AddLine(p3,p4)\n", 237 | " line.layer='Stirrups_center' \n", 238 | " \n", 239 | "\n", 240 | " else:\n", 241 | " n_right=round(((l/3-50*2)/spacing_right))+1\n", 242 | " \n", 243 | " ##Annotation\n", 244 | " ##inclined line\n", 245 | " ptext_1=APoint(5*l/6,d/2+z)\n", 246 | " ptext_2=APoint(5*l/6-46.6,-86.4+z)\n", 247 | " #Line1\n", 248 | " line1=acad.model.AddLine(ptext_1,ptext_2)\n", 249 | " line1.layer='text'\n", 250 | " ##Flat line\n", 251 | " ptext_3=APoint(5*l/6-46.6,-86.4+z)\n", 252 | " ptext_4=APoint(5*l/6-46.6-77,-86.4+z)\n", 253 | " ptext_5=APoint(5*l/6-46.6-77-468,-86.4+z)\n", 254 | " line2=acad.model.AddLine(ptext_3,ptext_4)\n", 255 | " line2.layer='text'\n", 256 | " ##Text To beshown\n", 257 | " text_dim=[n_right,stirrup_dia,spacing_right]\n", 258 | " text_length=acad.model.AddText(' %s-%smmdia@%smm c/c'%(text_dim[0],text_dim[1],text_dim[2]),ptext_5,25)\n", 259 | " text_length.layer='text'\n", 260 | "\n", 261 | " \n", 262 | " ##Stirrup lines @middle\n", 263 | " ptext_5=APoint(5*l/6-250,d/2+z)\n", 264 | " ptext_6=APoint(5*l/6+250,d/2+z)\n", 265 | " line3=acad.model.AddLine(ptext_5,ptext_6)\n", 266 | " line3.linetype='strrp'\n", 267 | " \n", 268 | " \n", 269 | " for j in range(n_right):\n", 270 | " sp=sp+spacing_right\n", 271 | " # print(sp)\n", 272 | " if sp>l-50:\n", 273 | " sp=sp-50\n", 274 | " #print(sp)\n", 275 | " #p3=APoint(sp,cc)\n", 276 | " #p4=APoint(sp,d-cc)\n", 277 | " #line=acad.model.Addline(p3,p4)\n", 278 | " #line.layer='Stirrups_sides'\n", 279 | " break\n", 280 | " p3=APoint(sp,z+cc)\n", 281 | " p4=APoint(sp,z+d-cc)\n", 282 | " line=acad.model.AddLine(p3,p4)\n", 283 | " line.layer='Stirrups_sides' \n", 284 | " \n", 285 | " #####Section cut line\n", 286 | "\n", 287 | " left_cut=l/6\n", 288 | " center_cut=l/2\n", 289 | " right_cut=l/2+l/3\n", 290 | "\n", 291 | " section_cutx1=[left_cut,center_cut,right_cut]\n", 292 | " section_cuty1=[-300,-300,-300]\n", 293 | "\n", 294 | " section_cutx2=[left_cut,center_cut,right_cut]\n", 295 | " section_cuty2=[b+300,b+300,b+300]\n", 296 | "\n", 297 | " text=['A','B','C'] #####\n", 298 | "\n", 299 | " for j in range(len(section_cutx1)):\n", 300 | " Cut_line1=APoint(section_cutx1[j],section_cuty1[j]+z)\n", 301 | " text1=acad.model.AddText(' %s'%text[j],Cut_line1,50)\n", 302 | " text1.layer='text'\n", 303 | " Cut_line2=APoint(section_cutx2[j],section_cuty2[j]+z)\n", 304 | " text2=acad.model.AddText(' %s'%text[j],Cut_line2,50)\n", 305 | " text2.layer='text'\n", 306 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 307 | " line1.layer='Section_line'\n", 308 | " \n", 309 | "###Cross Sections\n", 310 | "##Section AA\n", 311 | " p5x=[l/6-(b/2),l/6-(b/2),l/6+(b/2),l/6-(b/2),l/6-(b/2)+cc,l/6-(b/2)+cc,l/6+(b/2)-cc,l/6-(b/2)+cc,l/6-(b/2)+cc+20,l/6-(b/2)+cc,]\n", 312 | " p5y=[-600,-(600+d),-600,-600,-600-cc,-(600+d)+cc,-600-cc,-600-cc,-600-cc,-600-cc-20]\n", 313 | "\n", 314 | " p6x=[l/6-(b/2),l/6+(b/2),l/6+(b/2),l/6+(b/2),l/6-(b/2)+cc,l/6+(b/2)-cc,l/6+(b/2)-cc,l/6+(b/2)-cc,l/6-(b/2)+cc+43,l/6-(b/2)+cc+23]\n", 315 | " p6y=[-(600+d),-(600+d),-(600+d),-600,-(600+d)+cc,-(600+d)+cc,-(600+d)+cc,-600-cc,-600-cc-23,-600-cc-43]\n", 316 | "\n", 317 | " for i in range(len(p5x)):\n", 318 | " Cut_line1=APoint(p5x[i],p5y[i]+z)\n", 319 | " #acad.model.AddText(' %s'%text[i],Cut_line1,50)\n", 320 | " Cut_line2=APoint(p6x[i],p6y[i]+z)\n", 321 | " #acad.model.AddText(' %s'%text[i],Cut_line2,50)\n", 322 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 323 | " if i <=3:\n", 324 | " line1.layer='Beam_CSection'\n", 325 | " else:\n", 326 | " line1.layer='Stirrups_sides'\n", 327 | " \n", 328 | "##Rebars ##\n", 329 | "##Need to manually enter these values\n", 330 | " no_rebar_lower=3\n", 331 | " no_rebar_upper=3\n", 332 | " dia_rebar_lower=10\n", 333 | " dia_rebar_upper=10\n", 334 | " \n", 335 | "##Section__AA\n", 336 | " v_interval=50\n", 337 | " text=['SECTION : A-A','SECTION : B-B','SECTION : C-C']\n", 338 | " for i in range(2):\n", 339 | " \n", 340 | " if i==0:\n", 341 | " ptext=APoint(l/6-b/2,-600-d-150+z)\n", 342 | " text=acad.model.AddText(' %s'%text[i],ptext,30)\n", 343 | " text.layer='text'\n", 344 | " ##Lower rebar\n", 345 | " #print('Section AA Lower: ')\n", 346 | " dia_rebar_lower_corner=16#int(input('Corner Bar lower(mm) :'))\n", 347 | " \n", 348 | " sp=l/6-(b/2)+cc+dia_rebar_lower_corner\n", 349 | " spacing=round(b-cc*2-2*dia_rebar_lower)/(no_rebar_lower-1)\n", 350 | " for i in range(no_rebar_lower):\n", 351 | " if i == 0:\n", 352 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 353 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 354 | " rebar1.layer='rebar_section'\n", 355 | " \n", 356 | " ##For annotation\n", 357 | " ptext_4=APoint(l/6,z-600-d-72)\n", 358 | " ptext_5=APoint(l/6+b/2+50,z-600-d-72)\n", 359 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 360 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 361 | " text_dim=[dia_rebar_lower_corner]\n", 362 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 363 | " \n", 364 | " \n", 365 | " elif i == no_rebar_lower-1:\n", 366 | " p_center=APoint(l/6+(b/2)-cc-dia_rebar_lower_corner,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 367 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 368 | " rebar1.layer='rebar_section'\n", 369 | " \n", 370 | " ##For annotation\n", 371 | " ptext_4=APoint(l/6,z-600-d-72)\n", 372 | " #ptext_5=APoint(l/6+b/2+50,z-500-28)\n", 373 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 374 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 375 | " #text_dim=[dia_rebar_lower_corner]\n", 376 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 377 | " \n", 378 | " else:\n", 379 | " #print(sp)\n", 380 | " sp=sp+spacing\n", 381 | " #print(sp)\n", 382 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower+z)\n", 383 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower)\n", 384 | " rebar1.layer='rebar_section' \n", 385 | " \n", 386 | " #Annotations\n", 387 | " ptext_4=APoint(sp,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 388 | " ptext_5=APoint(l/6+b/2+50,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 389 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 390 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 391 | " \n", 392 | " \n", 393 | " text_dim=[dia_rebar_lower]\n", 394 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 395 | " \n", 396 | " #v_interval-=100\n", 397 | "\n", 398 | " elif i==1:\n", 399 | " ##Upper rebar\n", 400 | " #print('Section AA Upper: ')\n", 401 | " dia_rebar_upper_corner=16#int(input('Corner Bar Upper(mm) :'))\n", 402 | " sp=l/6-(b/2)+cc+dia_rebar_upper_corner\n", 403 | " spacing=round(b-cc*2-dia_rebar_upper_corner*2)/(no_rebar_upper-1)\n", 404 | " for i in range(no_rebar_upper):\n", 405 | " if i == 0:\n", 406 | " p_center=APoint(sp,-600-cc-dia_rebar_upper_corner+z)\n", 407 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 408 | " rebar1.layer='rebar_section'\n", 409 | " ##For annotation\n", 410 | " ptext_4=APoint(l/6,z-500-28)\n", 411 | " ptext_5=APoint(l/6+b/2+50,z-500-28)\n", 412 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 413 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 414 | " text_dim=[dia_rebar_upper_corner]\n", 415 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 416 | " \n", 417 | " elif i == no_rebar_upper-1:\n", 418 | " p_center=APoint(l/6+(b/2)-cc-dia_rebar_upper_corner,-600-cc-dia_rebar_upper_corner+z)\n", 419 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 420 | " rebar1.layer='rebar_section'\n", 421 | " ##For annotation\n", 422 | " ptext_4=APoint(l/6,z-500-28)\n", 423 | " #ptext_5=APoint(l/6+b/2+50,z-500-28)\n", 424 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 425 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 426 | " #text_dim=[dia_rebar_upper_corner]\n", 427 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 428 | " \n", 429 | " else:\n", 430 | " sp=sp+spacing\n", 431 | " p_center=APoint(sp,-600-cc-dia_rebar_upper+z)\n", 432 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper)\n", 433 | " rebar1.layer='rebar_section'\n", 434 | " \n", 435 | " #Annotations\n", 436 | " ptext_4=APoint(sp,-600-cc-dia_rebar_upper+z-v_interval)\n", 437 | " ptext_5=APoint(l/6+b/2+50,-600-cc-dia_rebar_upper+z-v_interval)\n", 438 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 439 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 440 | " text_dim=[dia_rebar_upper]\n", 441 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 442 | " \n", 443 | " #v_interval-=100\n", 444 | "###Cross Sections\n", 445 | "##Section BB\n", 446 | " p5x=[l/2-(b/2),l/2-(b/2),l/2+(b/2),l/2-(b/2),l/2-(b/2)+cc,l/2-(b/2)+cc,l/2+(b/2)-cc,l/2-(b/2)+cc,l/2-(b/2)+cc+20,l/2-(b/2)+cc,]\n", 447 | " p5y=[-600,-(600+d),-600,-600,-600-cc,-(600+d)+cc,-600-cc,-600-cc,-600-cc,-600-cc-20]\n", 448 | "\n", 449 | " p6x=[l/2-(b/2),l/2+(b/2),l/2+(b/2),l/2+(b/2),l/2-(b/2)+cc,l/2+(b/2)-cc,l/2+(b/2)-cc,l/2+(b/2)-cc,l/2-(b/2)+cc+43,l/2-(b/2)+cc+23]\n", 450 | " p6y=[-(600+d),-(600+d),-(600+d),-600,-(600+d)+cc,-(600+d)+cc,-(600+d)+cc,-600-cc,-600-cc-23,-600-cc-43]\n", 451 | "\n", 452 | " for i in range(len(p5x)):\n", 453 | " Cut_line1=APoint(p5x[i],p5y[i]+z)\n", 454 | " #acad.model.AddText(' %s'%text[i],Cut_line1,50)\n", 455 | " Cut_line2=APoint(p6x[i],p6y[i]+z)\n", 456 | " #acad.model.AddText(' %s'%text[i],Cut_line2,50)\n", 457 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 458 | " if i <=3:\n", 459 | " line1.layer='Beam_CSection'\n", 460 | " else:\n", 461 | " line1.layer='Stirrups_center'\n", 462 | " \n", 463 | " ##Rebars\n", 464 | " no_rebar_lower=3\n", 465 | " no_rebar_upper=3\n", 466 | " dia_rebar_lower=10\n", 467 | " dia_rebar_upper=10\n", 468 | " \n", 469 | "\n", 470 | " \n", 471 | "##Section__BB\n", 472 | " \n", 473 | " text=['SECTION : B-B']\n", 474 | " for i in range(2):\n", 475 | " \n", 476 | " if i==0:\n", 477 | " ptext=APoint(l/2-b/2,-600-d-150+z)\n", 478 | " text=acad.model.AddText(' %s'%text[i],ptext,30)\n", 479 | " text.layer='text'\n", 480 | " ##Lower rebar \n", 481 | " #print('Section BB Lower: ')\n", 482 | " dia_rebar_lower_corner=16#int(input('Corner Bar Lower(mm) :'))\n", 483 | " sp=l/2-(b/2)+cc+dia_rebar_lower_corner\n", 484 | " spacing=round(b-cc*2-2*dia_rebar_lower_corner)/(no_rebar_lower-1)\n", 485 | " for i in range(no_rebar_lower):\n", 486 | " if i == 0:\n", 487 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 488 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 489 | " rebar1.layer='rebar_section'\n", 490 | " \n", 491 | " ##For annotation\n", 492 | " ptext_4=APoint(l/2,z-600-d-72)\n", 493 | " ptext_5=APoint(l/2+b/2+50,z-600-d-72)\n", 494 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 495 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 496 | " text_dim=[dia_rebar_lower_corner]\n", 497 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 498 | " \n", 499 | " \n", 500 | " elif i == no_rebar_lower-1:\n", 501 | " p_center=APoint(l/2+(b/2)-cc-dia_rebar_lower_corner,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 502 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 503 | " rebar1.layer='rebar_section'\n", 504 | " \n", 505 | " ##For annotation\n", 506 | " ptext_4=APoint(l/2,z-600-d-72)\n", 507 | " #ptext_5=APoint(l/2+b/2+50,z-500-28)\n", 508 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 509 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 510 | " #text_dim=[dia_rebar_lower_corner]\n", 511 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 512 | " \n", 513 | " else:\n", 514 | " sp=sp+spacing\n", 515 | " #print(sp)\n", 516 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower+z)\n", 517 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower)\n", 518 | " rebar1.layer='rebar_section' \n", 519 | " \n", 520 | " #Annotations\n", 521 | " ptext_4=APoint(sp,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 522 | " ptext_5=APoint(l/2+b/2+50,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 523 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 524 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 525 | " \n", 526 | " \n", 527 | " text_dim=[dia_rebar_lower]\n", 528 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 529 | " \n", 530 | " #v_interval-=100\n", 531 | " elif i==1:\n", 532 | " ##Upper rebar\n", 533 | " #print('Section BB Upper: ')\n", 534 | " dia_rebar_upper_corner=16#int(input('Corner Bar Upper(mm) :'))\n", 535 | " sp=l/2-(b/2)+cc+dia_rebar_upper_corner\n", 536 | " spacing=round(b-cc*2-2*dia_rebar_upper_corner)/(no_rebar_upper-1)\n", 537 | " for i in range(no_rebar_upper):\n", 538 | " if i == 0:\n", 539 | " p_center=APoint(sp,-600-cc-dia_rebar_upper_corner+z)\n", 540 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 541 | " rebar1.layer='rebar_section'\n", 542 | " \n", 543 | " ##For annotation\n", 544 | " ptext_4=APoint(l/2,z-500-28)\n", 545 | " ptext_5=APoint(l/2+b/2+50,z-500-28)\n", 546 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 547 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 548 | " text_dim=[dia_rebar_lower_corner]\n", 549 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 550 | " \n", 551 | " elif i == no_rebar_upper-1:\n", 552 | " p_center=APoint(l/2+(b/2)-cc-dia_rebar_upper_corner,-600-cc-dia_rebar_upper_corner+z)\n", 553 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 554 | " rebar1.layer='rebar_section'\n", 555 | " \n", 556 | " ##For annotation\n", 557 | " ptext_4=APoint(l/2,z-500-28)\n", 558 | " #ptext_5=APoint(l/2+b/2+50,z-500-28)\n", 559 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 560 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 561 | " #text_dim=[dia_rebar_lower_corner]\n", 562 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 563 | " \n", 564 | " else:\n", 565 | " sp=sp+spacing\n", 566 | " p_center=APoint(sp,-600-cc-dia_rebar_upper+z)\n", 567 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper)\n", 568 | " rebar1.layer='rebar_section'\n", 569 | " \n", 570 | " #Annotations\n", 571 | " ptext_4=APoint(sp,-600-cc-dia_rebar_upper+z-v_interval)\n", 572 | " ptext_5=APoint(l/2+b/2+50,-600-cc-dia_rebar_upper+z-v_interval)\n", 573 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 574 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 575 | " text_dim=[dia_rebar_upper]\n", 576 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 577 | " \n", 578 | " #v_interval-=100\n", 579 | " \n", 580 | " \n", 581 | "###Cross Sections\n", 582 | "##Section CC\n", 583 | " p5x=[right_cut-(b/2),right_cut-(b/2),right_cut+(b/2),right_cut-(b/2),right_cut-(b/2)+cc,right_cut-(b/2)+cc,right_cut+(b/2)-cc,right_cut-(b/2)+cc,right_cut-(b/2)+cc+20,right_cut-(b/2)+cc,]\n", 584 | " p5y=[-600,-(600+d),-600,-600,-600-cc,-(600+d)+cc,-600-cc,-600-cc,-600-cc,-600-cc-20]\n", 585 | "\n", 586 | " p6x=[right_cut-(b/2),right_cut+(b/2),right_cut+(b/2),right_cut+(b/2),right_cut-(b/2)+cc,right_cut+(b/2)-cc,right_cut+(b/2)-cc,right_cut+(b/2)-cc,right_cut-(b/2)+cc+43,right_cut-(b/2)+cc+23]\n", 587 | " p6y=[-(600+d),-(600+d),-(600+d),-600,-(600+d)+cc,-(600+d)+cc,-(600+d)+cc,-600-cc,-600-cc-23,-600-cc-43]\n", 588 | "\n", 589 | " for i in range(len(p5x)):\n", 590 | " Cut_line1=APoint(p5x[i],p5y[i]+z)\n", 591 | " #acad.model.AddText(' %s'%text[i],Cut_line1,50)\n", 592 | " Cut_line2=APoint(p6x[i],p6y[i]+z)\n", 593 | " #acad.model.AddText(' %s'%text[i],Cut_line2,50)\n", 594 | " line1=acad.model.AddLine(Cut_line1,Cut_line2)\n", 595 | " if i <=3:\n", 596 | " line1.layer='Beam_CSection'\n", 597 | " else:\n", 598 | " line1.layer='Stirrups_sides'\n", 599 | " \n", 600 | "##Rebars\n", 601 | " no_rebar_lower=3\n", 602 | " no_rebar_upper=3\n", 603 | " dia_rebar_lower=10\n", 604 | " dia_rebar_upper=10\n", 605 | "\n", 606 | "\n", 607 | "##Section__CC\n", 608 | " text=['SECTION : C-C']\n", 609 | " for i in range(2): \n", 610 | " if i==0:\n", 611 | " ptext=APoint(right_cut-b/2,-600-d-150+z)\n", 612 | " text=acad.model.AddText(' %s'%text[i],ptext,30)\n", 613 | " text.layer='text' \n", 614 | " \n", 615 | "##Lower rebar\n", 616 | " #print('Section CC Lower: ')\n", 617 | " dia_rebar_lower_corner=16#int(input('Corner Bar Lower(mm) :'))\n", 618 | " sp=right_cut-(b/2)+cc+dia_rebar_lower_corner\n", 619 | " spacing=round(b-cc*2-2*dia_rebar_lower_corner)/(no_rebar_lower-1)\n", 620 | " for i in range(no_rebar_lower):\n", 621 | " if i == 0:\n", 622 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 623 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 624 | " rebar1.layer='rebar_section'\n", 625 | " \n", 626 | " ##For annotation\n", 627 | " ptext_4=APoint(5*l/6,z-600-d-72)\n", 628 | " ptext_5=APoint(5*l/6+b/2+50,z-600-d-72)\n", 629 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 630 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 631 | " text_dim=[dia_rebar_lower_corner]\n", 632 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 633 | " \n", 634 | " elif i == no_rebar_lower-1:\n", 635 | " p_center=APoint(right_cut+(b/2)-cc-dia_rebar_lower_corner,-(600+d)+cc+dia_rebar_lower_corner+z)\n", 636 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower_corner)\n", 637 | " rebar1.layer='rebar_section'\n", 638 | " \n", 639 | " ##For annotation\n", 640 | " ptext_4=APoint(5*l/6,z-600-d-72)\n", 641 | " #ptext_5=APoint(5*l/6+b/2+50,z-500-28)\n", 642 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 643 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 644 | " #text_dim=[dia_rebar_lower_corner]\n", 645 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 646 | " \n", 647 | " else:\n", 648 | " sp=sp+spacing\n", 649 | " p_center=APoint(sp,-(600+d)+cc+dia_rebar_lower+z)\n", 650 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_lower)\n", 651 | " rebar1.layer='rebar_section' \n", 652 | " \n", 653 | " #Annotations\n", 654 | " ptext_4=APoint(sp,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 655 | " ptext_5=APoint(5*l/6+b/2+50,-(600+d)+cc+dia_rebar_lower+z+v_interval)\n", 656 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 657 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 658 | " \n", 659 | " \n", 660 | " text_dim=[dia_rebar_lower]\n", 661 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 662 | " \n", 663 | " #v_interval-=100\n", 664 | " \n", 665 | " \n", 666 | " elif i==1:\n", 667 | " ##Upper rebar\n", 668 | " #print('Section CC Upper: ')\n", 669 | " dia_rebar_upper_corner=16#int(input('Corner Bar Upper(mm) :'))\n", 670 | " sp=right_cut-(b/2)+cc+dia_rebar_upper_corner\n", 671 | " spacing=round(b-cc*2-2*dia_rebar_upper_corner)/(no_rebar_upper-1)\n", 672 | " for i in range(no_rebar_upper):\n", 673 | " if i == 0:\n", 674 | " p_center=APoint(sp,-600-cc-dia_rebar_upper_corner+z)\n", 675 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 676 | " rebar1.layer='rebar_section'\n", 677 | " \n", 678 | " ##For annotation\n", 679 | " ptext_4=APoint(5*l/6,z-500-28)\n", 680 | " ptext_5=APoint(5*l/6+b/2+50,z-500-28)\n", 681 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 682 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 683 | " text_dim=[dia_rebar_lower_corner]\n", 684 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 685 | " \n", 686 | " elif i == no_rebar_upper-1:\n", 687 | " p_center=APoint(right_cut+(b/2)-cc-dia_rebar_upper_corner,-600-cc-dia_rebar_upper_corner+z)\n", 688 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper_corner)\n", 689 | " rebar1.layer='rebar_section'\n", 690 | " \n", 691 | " ##For annotation\n", 692 | " ptext_4=APoint(5*l/6,z-500-28)\n", 693 | " #ptext_5=APoint(5*l/6+b/2+50,z-500-28)\n", 694 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 695 | " #line3=acad.model.AddLine(ptext_4,ptext_5)\n", 696 | " #text_dim=[dia_rebar_lower_corner]\n", 697 | " #text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 698 | " \n", 699 | " else:\n", 700 | " sp=sp+spacing\n", 701 | " p_center=APoint(sp,-600-cc-dia_rebar_upper+z)\n", 702 | " rebar1=acad.model.AddCircle(p_center,dia_rebar_upper)\n", 703 | " rebar1.layer='rebar_section' \n", 704 | " #Annotations\n", 705 | " ptext_4=APoint(sp,-600-cc-dia_rebar_upper+z-v_interval)\n", 706 | " ptext_5=APoint(5*l/6+b/2+50,-600-cc-dia_rebar_upper+z-v_interval)\n", 707 | " line2=acad.model.AddLine(p_center,ptext_4)\n", 708 | " line3=acad.model.AddLine(ptext_4,ptext_5)\n", 709 | " text_dim=[dia_rebar_upper]\n", 710 | " text_length=acad.model.AddText(' %s mm dia'%(text_dim[0]),ptext_5,20)\n", 711 | " \n", 712 | " #v_interval-=100\n", 713 | " \n", 714 | " \n", 715 | " z=z-4000\n", 716 | " print('')\n", 717 | " print('-----------------------------------------------')\n", 718 | " print('Drawing is Ready Please Check the Autocad') " 719 | ] 720 | }, 721 | { 722 | "cell_type": "code", 723 | "execution_count": null, 724 | "metadata": {}, 725 | "outputs": [], 726 | "source": [] 727 | }, 728 | { 729 | "cell_type": "code", 730 | "execution_count": null, 731 | "metadata": {}, 732 | "outputs": [], 733 | "source": [] 734 | } 735 | ], 736 | "metadata": { 737 | "kernelspec": { 738 | "display_name": "Python 3", 739 | "language": "python", 740 | "name": "python3" 741 | }, 742 | "language_info": { 743 | "codemirror_mode": { 744 | "name": "ipython", 745 | "version": 3 746 | }, 747 | "file_extension": ".py", 748 | "mimetype": "text/x-python", 749 | "name": "python", 750 | "nbconvert_exporter": "python", 751 | "pygments_lexer": "ipython3", 752 | "version": "3.7.6" 753 | } 754 | }, 755 | "nbformat": 4, 756 | "nbformat_minor": 4 757 | } 758 | -------------------------------------------------------------------------------- /traverse_drawing_automation/Automate_Drawing_Traverse_Using_#Python.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "Automate Traverse Drawing Using #Python#Pyautocad#Pandas" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "1.This code cell is the required package and library required to execute the task." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 53, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "from pyautocad import Autocad, APoint\n", 24 | "import pandas as pd" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "metadata": {}, 30 | "source": [ 31 | " 2.This code cell links autocad modelspace for the drawing." 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": null, 37 | "metadata": {}, 38 | "outputs": [], 39 | "source": [ 40 | "acad=Autocad() ###create_if_not_exists=True\n", 41 | "print(acad.doc.Name)\n", 42 | "doc=acad.ActiveDocument\n", 43 | "ms=doc.ModelSpace" 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "metadata": {}, 49 | "source": [ 50 | " 3.This code cell will set layers details to be loaded on autocad modelspace." 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 55, 56 | "metadata": {}, 57 | "outputs": [], 58 | "source": [ 59 | "layers=['Pnt','ln','text']\n", 60 | "colors = [20,92,2]\n", 61 | "Lt= ['HIDDEN','ACAD_ISO06W100','PHANTOM']" 62 | ] 63 | }, 64 | { 65 | "cell_type": "markdown", 66 | "metadata": {}, 67 | "source": [ 68 | " 4.This code cell will load layers on autocad modelspace." 69 | ] 70 | }, 71 | { 72 | "cell_type": "code", 73 | "execution_count": 56, 74 | "metadata": {}, 75 | "outputs": [], 76 | "source": [ 77 | "for i in range(len(layers)):\n", 78 | " Layer1=acad.ActiveDocument.Layers.Add(layers[i])\n", 79 | " Layer1.color=colors[i]\n", 80 | " acad.ActiveDocument.Linetypes.Load(Lt[i],\"acad.lin\")\n", 81 | " Layer1.Linetype=Lt[i]\n", 82 | " Layer1.Lineweight= 0.02" 83 | ] 84 | }, 85 | { 86 | "cell_type": "markdown", 87 | "metadata": {}, 88 | "source": [ 89 | " 5.Importing traverse points in Jupyter notebook .Here Pandas library is used." 90 | ] 91 | }, 92 | { 93 | "cell_type": "code", 94 | "execution_count": 57, 95 | "metadata": {}, 96 | "outputs": [], 97 | "source": [ 98 | "file=pd.read_excel('traverse_points.xlsx') " 99 | ] 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": {}, 104 | "source": [ 105 | " 6.Displaying the data from imported excel file." 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 58, 111 | "metadata": {}, 112 | "outputs": [ 113 | { 114 | "data": { 115 | "text/html": [ 116 | "
\n", 117 | "\n", 130 | "\n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | "
S.N.EastingNorthingElevationRemarks
01618642.515303483.9801005.913A
12618585.367303437.530944.338B
23618711.664303381.707940.929C
34618799.685303475.868875.036D
45618741.575303523.867885.654E
\n", 184 | "
" 185 | ], 186 | "text/plain": [ 187 | " S.N. Easting Northing Elevation Remarks\n", 188 | "0 1 618642.515 303483.980 1005.913 A\n", 189 | "1 2 618585.367 303437.530 944.338 B\n", 190 | "2 3 618711.664 303381.707 940.929 C\n", 191 | "3 4 618799.685 303475.868 875.036 D\n", 192 | "4 5 618741.575 303523.867 885.654 E" 193 | ] 194 | }, 195 | "execution_count": 58, 196 | "metadata": {}, 197 | "output_type": "execute_result" 198 | } 199 | ], 200 | "source": [ 201 | "file" 202 | ] 203 | }, 204 | { 205 | "cell_type": "markdown", 206 | "metadata": {}, 207 | "source": [ 208 | " 7.Finding number of data(or number of stations)." 209 | ] 210 | }, 211 | { 212 | "cell_type": "code", 213 | "execution_count": 59, 214 | "metadata": {}, 215 | "outputs": [ 216 | { 217 | "data": { 218 | "text/plain": [ 219 | "5" 220 | ] 221 | }, 222 | "execution_count": 59, 223 | "metadata": {}, 224 | "output_type": "execute_result" 225 | } 226 | ], 227 | "source": [ 228 | "n=file['S.N.'].count()\n", 229 | "n" 230 | ] 231 | }, 232 | { 233 | "cell_type": "markdown", 234 | "metadata": {}, 235 | "source": [ 236 | " 8.This code cell will draw points on autocad modelspace and also list the points for connecting it with lines." 237 | ] 238 | }, 239 | { 240 | "cell_type": "code", 241 | "execution_count": 63, 242 | "metadata": {}, 243 | "outputs": [], 244 | "source": [ 245 | "points_list=[]\n", 246 | "for i in range(n):\n", 247 | " points= APoint(file['Easting'][i],file['Northing'][i],file['Elevation'][i])\n", 248 | " #print(\"Points no {} : x = {} , y = {} \".format(i+1,points[0],points[1]))\n", 249 | " #print(points)\n", 250 | " InsertionPnt=points\n", 251 | " pointblock=acad.model.InsertBlock(InsertionPnt,'pointblck',7.5,7.5,7.5,0)\n", 252 | " pointblock.layer = 'Pnt'\n", 253 | " points_list.append(points)\n", 254 | " \n", 255 | " points_loc=APoint(points[0]-1,points[1]+3)\n", 256 | " text_length=acad.model.AddText('%s'%(file['Remarks'][i]),points_loc,5)\n", 257 | " text_length.layer='text'\n", 258 | " text_with_coordinates=acad.model.AddText(' (%s mE, %s mN)'%(points[0],points[1]),points_loc,5)\n", 259 | " text_with_coordinates.layer='text'" 260 | ] 261 | }, 262 | { 263 | "cell_type": "markdown", 264 | "metadata": {}, 265 | "source": [ 266 | " 9.This code cell will draw lines between points on autocad modelspace." 267 | ] 268 | }, 269 | { 270 | "cell_type": "code", 271 | "execution_count": 62, 272 | "metadata": {}, 273 | "outputs": [], 274 | "source": [ 275 | "for i in range(n):\n", 276 | " if i< n-1:\n", 277 | " line1=acad.model.AddLine(points_list[i],points_list[i+1])\n", 278 | " line1.layer='ln'\n", 279 | " else:\n", 280 | " line1=acad.model.AddLine(points_list[-1],points_list[0])\n", 281 | " line1.layer='ln'" 282 | ] 283 | }, 284 | { 285 | "cell_type": "code", 286 | "execution_count": null, 287 | "metadata": {}, 288 | "outputs": [], 289 | "source": [] 290 | } 291 | ], 292 | "metadata": { 293 | "kernelspec": { 294 | "display_name": "Python 3", 295 | "language": "python", 296 | "name": "python3" 297 | }, 298 | "language_info": { 299 | "codemirror_mode": { 300 | "name": "ipython", 301 | "version": 3 302 | }, 303 | "file_extension": ".py", 304 | "mimetype": "text/x-python", 305 | "name": "python", 306 | "nbconvert_exporter": "python", 307 | "pygments_lexer": "ipython3", 308 | "version": "3.7.6" 309 | } 310 | }, 311 | "nbformat": 4, 312 | "nbformat_minor": 4 313 | } 314 | -------------------------------------------------------------------------------- /traverse_drawing_automation/Traverse_drawing.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/traverse_drawing_automation/Traverse_drawing.dwg -------------------------------------------------------------------------------- /traverse_drawing_automation/pointblck.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/traverse_drawing_automation/pointblck.dwg -------------------------------------------------------------------------------- /traverse_drawing_automation/traverse_points.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shya123/Autocad_Automation_learning/1e6545268acf8bf62e92550f0d28fb2ed92683c3/traverse_drawing_automation/traverse_points.xlsx --------------------------------------------------------------------------------