############################## ### DM2_w24 hu_03_setUp ### ### _diag / 2024 10 24 ### ############################## import rhinoscriptsyntax as rs import random, time, sys ### ### add path where "DM_lib.py" can be found !!! sys.path.append("P:/WWW/archicak") ### add path where "DM_lib.py" can be found !!! ### add path where "DM_lib.py" can be found !!! import DM_lib as dm ### reload(dm) ############################## rs.EnableRedraw(0) dm.eA() #dm.setUp_hu_03( if 0: allCoords = dm.setUp_hu_03(anzahl=11) #print allCoords[0] rs.AddPoints( allCoords[0] ) coordsCir = allCoords[0] cen = dm.pntCentroid(coordsCir) rs.AddCurve( [ cen, coordsCir[0] ] ) rs.AddCurve( allCoords[1], 1 ) dm.textDots( coordsCir ) dm.textDots( allCoords[1] ) #### Hauptkuppel #rs.AddPoint( vec ) anz = 5000 rad = 1.0 center = [5.55,5.55,10] deltaAngle = 360/anz vec = [1, 0, 0] for i in range(anz): angX = deltaAngle*i #print angX vecX = rs.VectorRotate( vec, angX , [random.uniform(-1,1),random.uniform(-1,1),random.uniform(-1,1)] ) #vector, angle_degrees, axis) vecX = rs.VectorScale( vecX, random.uniform( 5,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) #### Seitenkupppeln #### Seitenkuppel 1 #rs.AddPoint( vec ) anz = 5000 rad = 1.0 center = [5.55,0,5.55] deltaAngle = 360/anz vec = [1, 0, 0] for i in range(anz): angX = deltaAngle*i #print angX vecX = rs.VectorRotate( vec, angX , [random.uniform(-1,1),random.uniform(-1,1),random.uniform(-1,1)] ) #vector, angle_degrees, axis) vecX = rs.VectorScale( vecX, random.uniform( 5,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) #### Seitenkuppel 2 #rs.AddPoint( vec ) anz = 5000 rad = 1.0 center = [0,5.55,5.55] deltaAngle = 360/anz vec = [1, 0, 0] for i in range(anz): angX = deltaAngle*i #print angX vecX = rs.VectorRotate( vec, angX , [random.uniform(-1,1),random.uniform(-1,1),random.uniform(-1,1)] ) #vector, angle_degrees, axis) vecX = rs.VectorScale( vecX, random.uniform( 5,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) #### Seitenkuppel 3 #rs.AddPoint( vec ) anz = 5000 rad = 1.0 center = [5.55,11.11,5.55] deltaAngle = 360/anz vec = [1, 0, 0] for i in range(anz): angX = deltaAngle*i #print angX vecX = rs.VectorRotate( vec, angX , [random.uniform(-1,1),random.uniform(-1,1),random.uniform(-1,1)] ) #vector, angle_degrees, axis) vecX = rs.VectorScale( vecX, random.uniform( 5,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) #### Seitenkuppel 4 #rs.AddPoint( vec ) anz = 5000 rad = 1.0 center = [11.11,5.55,5.55] deltaAngle = 360/anz vec = [1, 0, 0] for i in range(anz): angX = deltaAngle*i #print angX vecX = rs.VectorRotate( vec, angX , [random.uniform(-1,1),random.uniform(-1,1),random.uniform(-1,1)] ) #vector, angle_degrees, axis) vecX = rs.VectorScale( vecX, random.uniform( 5,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) ### Hauptschiff coords = [] anzahl = 12 xVal = 1 yVal = 1 zVal = 1 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal y = b*yVal z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) dm.PointRadius(displayModeX=1,rad=5, styl=2,verbose=0) rs.ObjectColor(points, [200,50,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [0,200,0]) ### Seitenschiff 1 coords = [] anzahl = 12 xVal = 0.5 yVal = 1 zVal = 0.55 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -5.0 y = b*yVal z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,0,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ### Seitenschiff 2 coords = [] anzahl = 12 xVal = 1 yVal = 0.5 zVal = 0.55 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal y = b*yVal -5.0 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,0,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ### Seitenschiff 3 coords = [] anzahl = 12 xVal = 1 yVal = 0.5 zVal = 0.55 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal y = b*yVal +11.11 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,0,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ### Seitenschiff 4 coords = [] anzahl = 12 xVal = 0.5 yVal = 1 zVal = 0.55 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +11.11 y = b*yVal z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,0,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ### Portikus ## Portikus 1 #Decke coords = [] anzahl = 12 xVal = 0.25 yVal = 1 zVal = 0.08 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -7.5 y = b*yVal z = c*zVal +5.15 cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [100,50,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) # Saeule 1 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -7.5 y = b*yVal z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 2 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -7.5 y = b*yVal +2.4 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 3 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -7.5 y = b*yVal +4.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 4 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -7.5 y = b*yVal +6.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 5 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -7.5 y = b*yVal +8.75 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 6 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal -7.5 y = b*yVal +10.75 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ## Portikus 2 #Decke coords = [] anzahl = 12 xVal = 1 yVal = 0.25 zVal = 0.08 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal y = b*yVal -7.5 z = c*zVal +5.15 cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [100,50,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) # Saeule 1 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal y = b*yVal -7.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 2 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +2.4 y = b*yVal -7.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 3 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +4.5 y = b*yVal -7.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 4 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +6.5 y = b*yVal -7.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 5 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +8.75 y = b*yVal -7.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 6 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +10.75 y = b*yVal -7.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ## Portikus 3 #Decke coords = [] anzahl = 12 xVal = 1 yVal = 0.25 zVal = 0.08 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal y = b*yVal +16.75 z = c*zVal +5.15 cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [100,50,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) # Saeule 1 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal y = b*yVal +19.25 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 2 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +2.4 y = b*yVal +19.25 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 3 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +4.5 y = b*yVal +19.25 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 4 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +6.5 y = b*yVal +19.25 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 5 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +8.75 y = b*yVal +19.25 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 6 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +10.75 y = b*yVal +19.25 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ## Portikus 3 #Decke coords = [] anzahl = 12 xVal = 0.25 yVal = 1 zVal = 0.08 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +16.75 y = b*yVal z = c*zVal +5.15 cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [100,50,100]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) # Saeule 1 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +19.25 y = b*yVal z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 2 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +19.25 y = b*yVal +2.4 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 3 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +19.25 y = b*yVal +4.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 4 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +19.25 y = b*yVal +6.5 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 5 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +19.25 y = b*yVal +8.75 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) #Saeule 6 coords = [] anzahl = 12 xVal = 0.025 yVal = 0.025 zVal = 0.45 for a in range (anzahl): for b in range (anzahl): for c in range (anzahl): x = a*xVal +19.25 y = b*yVal +10.75 z = c*zVal cor = [x,y,z] coords.append(cor) points = rs.AddPoints(coords) rs.ObjectColor(points, [0,100,0]) rs.AddCurve( coords, degree=1) curves = rs.AddCurve( coords, degree=1) rs.ObjectColor(curves, [200,0,150]) ##################### curves between points if 1: curves = 5000 #anzahl der Vektoren all_points = rs.ObjectsByType(1) if len(all_points) < 2: print("Not enough points to connect.") else: for i in range(curves): pt1 = rs.coerce3dpoint(all_points[random.randint(0, len(all_points) - 1)]) pt2 = rs.coerce3dpoint(all_points[random.randint(0, len(all_points) - 1)]) if pt1 and pt2: rs.AddCurve([pt1, pt2])