| Hallo, Gast |
Du musst dich registrieren bevor du auf unserer Seite Beiträge schreiben kannst.
|
|
|
| Ruby Script: Datentyp Integer verwenden |
|
Geschrieben von: Racer - 07.09.2021 - 18:52 - Forum: Erweiterungen
- Antworten (3)
|
 |
Hallo,
ich habe hier ein Ruby Script welches soweit auch tadellos funktioniert. Dieses Script fragt Korpusmaße ab und die Anzahl der Fronten die übereinander bzw. nebeneinander angeordnet werden sollen und wie breit die Fugen dazwischen sein sollen, bzw. ob die Fronten links oder rechts überstehen sollen.
Dabei ist die Front, wenn nicht "Sonderanfertigung" allseitig 2 mm kleiner als der Korpus, bzw. wenn die Fuge oberhalb der Front 30 mm beträgt, bekommt der Korpus eine Ausklinkung. Alles soweit gut und es funktioniert.
Ich weiß, dass der Korpus 810 mm hoch wird, wenn ich den Wert in der Abfrage nicht ändere. Wenn ich in der Korpusabfrage nun sage, dass ich zwei Fronten übereinander haben möchte, dann werden nacheinander die Fronten und Fugen abgefragt.
Ergo müsste es möglich sein bei der zweiten Front zu sagen, dass er die Korpushöhe minus der Frontfuge oben (der ersten Front) minus der Höhe der ersten Front und minus der Frontfuge unten (der ersten Front) errechnen soll und anstelle des im Script fettmarkierten Fronthöhenwertes bei der Abfrage der zweiten Front zumindest vorschlägt.
Wenn ich nun bei dem Vorschlagswert der zweiten Front anstelle der rot markierten 158 mm dort reinschreiben würde “zz(korpushöhe)-fso1(Frontspalt oben erste Front)-fh1(Frontteilhöhe erste Front)-fsu1(Frontspalte unten erste Front)“ bekomme ich einen Fließkommazahl in der Abfrage angezeigt. Wenn ich die bestätige bekomme ich zwar das gewünschte Ergebnis aber wenn ich den Wert wieder mit 158 überschreibe, dann wird die zweite Front halt nicht mehr 158 mm hoch sondern um ein x-faches höher (undefiniert und unberechenbar).
Lange Rede kurzer Sinn, wie bekomme ich es hin, dass er mit ganzen Zahlen rechnet und keine Fließkommazahlen auswirft, die nicht zuzuordnen sind?
jemand eine Idee?
Hier das Script...
Code: #-------------------------------------------------------------------------------
require 'sketchup.rb'
require 'new2/nmat1.rb'
def new2_xu
prompts = [hs, os, us, breite, hoehe, tiefe, fanzahlv, fanzahlh, rwstaerke]
values = [0, 0, 1, 600.mm, 810.mm, 625.mm, 1, 1, 8.mm]
results = inputbox prompts, values, nav120
return if not results
hs, os, us, xx, zz, yy, fav, fah, r1 = results
d1 = 19.mm
z1 = 19.mm
fah = 2 if fah>2
if yy<=525.mm
rws = 25.mm
else rws = 48.mm
end
if fav>=1
prompts = [spaltoben1, fhoehe1, spaltunten1, fbreite1, fstaerke1, fabstand1, fueberstandl1, fueberstandr1, fueberstandu1]
values = [30.mm, 158.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav111
return if not results
fso1, fh1, fsu1, fbr1, fst1, fab1, ful1, fur1, fuu1 = results
model = Sketchup.active_model
model.start_operation "1.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful1, 0.mm-fst1-fab1, zz-fso1-fh1]
pts[1] = [0.mm-ful1, 0.mm-fab1, zz-fso1-fh1]
pts[2] = [0.mm-ful1, 0.mm-fab1, zz-fso1]
pts[3] = [0.mm-ful1, 0.mm-fst1-fab1, zz-fso1]
base = entities.add_face pts
base.pushpull fbr1+ful1+fur1
model.commit_operation
group.name = "Front1"
if fso1>29.mm
tra = 49.mm
end
if fso1<29.mm
tra = 0.mm
end
end
if fav>=2
prompts = [spaltoben2, fhoehe2, spaltunten2, fbreite2, fstaerke2, fabstand2, fueberstandl2, fueberstandr2, fueberstandu2]
values = [fsu1, [color=#C14700][b]158.mm[/b][/color], 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav112
return if not results
fso2, fh2, fsu2, fbr2, fst2, fab2, ful2, fur2, fuu2 = results
model = Sketchup.active_model
model.start_operation "2.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful2, 0.mm-fst2-fab2, zz-fso1-fh1-fso2-fh2]
pts[1] = [0.mm-ful2, 0.mm-fab2, zz-fso1-fh1-fso2-fh2]
pts[2] = [0.mm-ful2, 0.mm-fab2, zz-fso1-fh1-fso2]
pts[3] = [0.mm-ful2, 0.mm-fst2-fab2, zz-fso1-fh1-fso2]
base = entities.add_face pts
base.pushpull fbr2+ful2+fur2, true
model.commit_operation
group.name = "Front2"
else
fso2=0
end
if fav>=3
prompts = [fhoehe3, spaltoben3, fbreite3, fstaerke3, fabstand3, fueberstandl3, fueberstandr3, fueberstandu3]
values = [158.mm, fsu2, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav113
return if not results
fh3, fso3, fbr3, fst3, fab3, ful3, fur3, fuu3 = results
model = Sketchup.active_model
model.start_operation "3.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful3, 0.mm-fst3-fab3, zz-fso1-fh1-fso2-fh2-fso3-fh3]
pts[1] = [0.mm-ful3, 0.mm-fab3, zz-fso1-fh1-fso2-fh2-fso3-fh3]
pts[2] = [0.mm-ful3, 0.mm-fab3, zz-fso1-fh1-fso2-fh2-fso3]
pts[3] = [0.mm-ful3, 0.mm-fst3-fab3, zz-fso1-fh1-fso2-fh2-fso3]
base = entities.add_face pts
base.pushpull fbr3+ful3+fur3
model.commit_operation
group.name = "Front3"
else
fso3=0
end
if fav>=4
prompts = [fhoehe4, spaltoben4, fbreite4, fstaerke4, fabstand4, fueberstandl4, fueberstandr4, fueberstandu4]
values = [778.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav114
return if not results
fh4, fso4, fbr4, fst4, fab4, ful4, fur4, fuu4 = results
model = Sketchup.active_model
model.start_operation "4.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful4, 0.mm-fst4-fab4, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4]
pts[1] = [0.mm-ful4, 0.mm-fab4, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4]
pts[2] = [0.mm-ful4, 0.mm-fab4, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4]
pts[3] = [0.mm-ful4, 0.mm-fst4-fab4, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4]
base = entities.add_face pts
base.pushpull fbr4+ful4+fur4
model.commit_operation
group.name = "Front4"
else
fso4=0
end
if fav>=5
prompts = [fhoehe5, spaltoben5, fbreite5, fstaerke5, fabstand5, fueberstandl5, fueberstandr5, fueberstandu5]
values = [778.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav115
return if not results
fh5, fso5, fbr5, fst5, fab5, ful5, fur5, fuu5 = results
model = Sketchup.active_model
model.start_operation "5.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful5, 0.mm-fst5-fab5, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5]
pts[1] = [0.mm-ful5, 0.mm-fab5, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5]
pts[2] = [0.mm-ful5, 0.mm-fab5, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5]
pts[3] = [0.mm-ful5, 0.mm-fst5-fab5, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5]
base = entities.add_face pts
base.pushpull fbr5+ful5+fur5
model.commit_operation
group.name = "Front5"
else
fso5=0
end
if fav>=6
prompts = [fhoehe6, spaltoben6, fbreite6, fstaerke6, fabstand6, fueberstandl6, fueberstandr6, fueberstandu6]
values = [778.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav116
return if not results
fh6, fso6, fbr6, fst6, fab6, ful6, fur6, fuu6 = results
model = Sketchup.active_model
model.start_operation "6.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful6, 0.mm-fst6-fab6, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6]
pts[1] = [0.mm-ful6, 0.mm-fab6, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6]
pts[2] = [0.mm-ful6, 0.mm-fab6, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6]
pts[3] = [0.mm-ful6, 0.mm-fst6-fab6, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6]
base = entities.add_face pts
base.pushpull fbr6+ful6+fur6
model.commit_operation
group.name = "Front6"
else
fso6=0
end
if fav>=7
prompts = [fhoehe7, spaltoben7, fbreite7, fstaerke7, fabstand7, fueberstandl7, fueberstandr7, fueberstandu7]
values = [778.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav117
return if not results
fh7, fso7, fbr7, fst7, fab7, ful7, fur7, fuu7 = results
model = Sketchup.active_model
model.start_operation "7.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful7, 0.mm-fst7-fab7, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7]
pts[1] = [0.mm-ful7, 0.mm-fab7, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7]
pts[2] = [0.mm-ful7, 0.mm-fab7, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7]
pts[3] = [0.mm-ful7, 0.mm-fst7-fab7, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7]
base = entities.add_face pts
base.pushpull fbr7+ful7+fur7
model.commit_operation
group.name = "Front7"
else
fso7=0
end
if fav>=8
prompts = [fhoehe8, spaltoben8, fbreite8, fstaerke8, fabstand8, fueberstandl8, fueberstandr8, fueberstandu8]
values = [778.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav118
return if not results
fh8, fso8, fbr8, fst8, fab8, ful8, fur8, fuu8 = results
model = Sketchup.active_model
model.start_operation "8.Front"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [0.mm-ful8, 0.mm-fst8-fab8, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-fso8-fh8]
pts[1] = [0.mm-ful8, 0.mm-fab8, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-fso8-fh8]
pts[2] = [0.mm-ful8, 0.mm-fab8, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-fso8]
pts[3] = [0.mm-ful8, 0.mm-fst8-fab8, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-fso8]
base = entities.add_face pts
base.pushpull fbr8+ful8+fur8
model.commit_operation
group.name = "Front8"
else
fso8=0
end
if fah>=2
if fav>=1
prompts = [fhoehe9, spaltoben9, fbreite9, fstaerke9, fabstand9, fueberstandl9, fueberstandr9, fueberstandu9]
values = [778.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav119
return if not results
fh9, fso9, fbr9, fst9, fab9, ful9, fur9, fuu9 = results
model = Sketchup.active_model
model.start_operation "1.Frontrechts"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [fbr1-ful9, -fab9, zz-fso9]
pts[1] = [fbr1+fbr9+fur9, -fab9, zz-fso9]
pts[2] = [fbr1+fbr9+fur9, -fst9-fab9, zz-fso9]
pts[3] = [fbr1-ful9, -fst9-fab9, zz-fso9]
base = entities.add_face pts
base.pushpull fh9
model.commit_operation
group.name = "Frontrechts1"
end
if fav>=2
prompts = [fhoehe10, spaltoben10, fbreite10, fstaerke10, fabstand10, fueberstandl10, fueberstandr10, fueberstandu10]
values = [778.mm, 30.mm, xx, 19.mm, 3.mm, -2.mm, -2.mm, 0.mm]
results = inputbox prompts, values, nav121
return if not results
fh10, fso10, fbr10, fst10, fab10, ful10, fur10, fuu10 = results
model = Sketchup.active_model
model.start_operation "2.Frontrechts"
entities = model.active_entities
group = entities.add_group
entities = group.entities
pts = []
pts[0] = [fbr2-ful10, 0.mm-fst10-fab10, zz-fso9-fh9-fso10-fh10]
pts[1] = [fbr2-ful10, 0.mm-fab10, zz-fso1-fh9-fso10-fh10]
pts[2] = [fbr2-ful10, 0.mm-fab10, zz-fso1-fh9-fso10]
pts[3] = [fbr2-ful10, 0.mm-fst10-fab10, zz-fso9-fh9-fso10]
base = entities.add_face pts
base.pushpull fbr10+ful10+fur10, true
model.commit_operation
group.name = "Frontrechts2"
end
end
##
model = Sketchup.active_model
model.start_operation "korpus"
entities = model.active_entities
group = entities.add_group
entities = group.entities
#seite links
pts = []
pts[0] = [0.mm, 0.mm, 0.mm]
pts[1] = [0.mm, 0.mm, zz]
pts[2] = [0.mm, yy, zz]
pts[3] = [0.mm, yy, 0.mm]
face = entities.add_face pts
status = face.pushpull -d1, true
if fso1>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-64.mm]
pts[1] = [0.mm, 0.mm, zz]
pts[2] = [0.mm, +49.mm, zz]
pts[3] = [0.mm, +49.mm, zz-64.mm]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso2>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-fso1-fh1+fuu1]
pts[1] = [0.mm, 0.mm, zz-fso1-fh1-64.mm]
pts[2] = [0.mm, +49.mm, zz-fso1-fh1-64.mm]
pts[3] = [0.mm, +49.mm, zz-fso1-fh1+fuu1]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso3>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2+fuu2]
pts[1] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-64.mm]
pts[2] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-64.mm]
pts[3] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2+fuu2]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso4>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3+fuu3]
pts[1] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-64.mm]
pts[2] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-64.mm]
pts[3] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3+fuu3]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso5>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4+fuu4]
pts[1] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-64.mm]
pts[2] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-64.mm]
pts[3] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4+fuu4]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso6>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5+fuu5]
pts[1] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-64.mm]
pts[2] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-64.mm]
pts[3] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5+fuu5]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso7>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6+fuu6]
pts[1] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-64.mm]
pts[2] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-64.mm]
pts[3] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6+fuu6]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso8>29.mm
pts = []
pts[0] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7+fuu7]
pts[1] = [0.mm, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-64.mm]
pts[2] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-64.mm]
pts[3] = [0.mm, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7+fuu7]
face = entities.add_face pts
status = face.pushpull +d1, false
end
#seite rechts
pts = []
pts[0] = [xx-d1, 0.mm, 0.mm]
pts[1] = [xx-d1, 0.mm, zz]
pts[2] = [xx-d1, yy, zz]
pts[3] = [xx-d1, yy, 0.mm]
face = entities.add_face pts
status = face.pushpull -d1, true
if fso1>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-64.mm]
pts[1] = [xx-d1, 0.mm, zz]
pts[2] = [xx-d1, +49.mm, zz]
pts[3] = [xx-d1, +49.mm, zz-64.mm]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso2>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-fso1-fh1+fuu1]
pts[1] = [xx-d1, 0.mm, zz-fso1-fh1-64.mm]
pts[2] = [xx-d1, +49.mm, zz-fso1-fh1-64.mm]
pts[3] = [xx-d1, +49.mm, zz-fso1-fh1+fuu1]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso3>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2+fuu2]
pts[1] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-64.mm]
pts[2] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-64.mm]
pts[3] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2+fuu2]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso4>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3+fuu3]
pts[1] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-64.mm]
pts[2] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-64.mm]
pts[3] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3+fuu3]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso5>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4+fuu4]
pts[1] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-64.mm]
pts[2] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-64.mm]
pts[3] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4+fuu4]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso6>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5+fuu5]
pts[1] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-64.mm]
pts[2] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-64.mm]
pts[3] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5+fuu5]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso7>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6+fuu6]
pts[1] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-64.mm]
pts[2] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-64.mm]
pts[3] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6+fuu6]
face = entities.add_face pts
status = face.pushpull +d1, false
end
if fso8>29.mm
pts = []
pts[0] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7+fuu7]
pts[1] = [xx-d1, 0.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-64.mm]
pts[2] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7-64.mm]
pts[3] = [xx-d1, +49.mm, zz-fso1-fh1-fso2-fh2-fso3-fh3-fso4-fh4-fso5-fh5-fso6-fh6-fso7-fh7+fuu7]
face = entities.add_face pts
status = face.pushpull +d1, false
end
#boden
if us > 0
pts = []
pts[0] = [0.mm+d1, 0.mm, 0.mm]
pts[1] = [xx-d1, 0.mm, 0.mm]
pts[2] = [xx-d1, yy-rws, 0.mm]
pts[3] = [0.mm+d1, yy-rws, 0.mm]
face = entities.add_face pts
status = face.pushpull -z1, true
end
if os > 0
pts = []
pts[0] = [0.mm+d1, 0.mm, 0.mm]
pts[1] = [xx-d1, 0.mm, 0.mm]
pts[2] = [xx-d1, yy, 0.mm]
pts[3] = [0.mm+d1, yy, 0.mm]
face = entities.add_face pts
status = face.pushpull -z1, true
end
if hs > 0
pts = []
pts[0] = [0.mm+d1, 0.mm, 0.mm]
pts[1] = [xx-d1, 0.mm, 0.mm]
pts[2] = [xx-d1, yy-rws, 0.mm]
pts[3] = [0.mm+d1, yy-rws, 0.mm]
face = entities.add_face pts
status = face.pushpull -z1, true
end
#traverse1
if us > 0
#
# pts = []
# pts[0] = [0.mm+d1, 0.mm+yy-48.mm-56.mm, 0.mm+zz]
# pts[1] = [0.mm+xx-d1, 0.mm+yy-48.mm-56.mm, 0.mm+zz]
# pts[2] = [0.mm+xx-d1, yy-48.mm, 0.mm+zz]
# pts[3] = [0.mm+d1, yy-48.mm, 0.mm+zz]
#
# face = entities.add_face pts
# status = face.pushpull -z1, true
#traverse2
# pts = []
# pts[0] = [0.mm+d1, tra, 0.mm+zz]
# pts[1] = [0.mm+xx-d1, tra, 0.mm+zz]
# pts[2] = [0.mm+xx-d1, yy-48.mm, 0.mm+zz]
# pts[3] = [0.mm+d1, yy-48.mm, 0.mm+zz]
#
# face = entities.add_face pts
# status = face.pushpull -z1, true
end
#boden2
if us > 0
pts = []
pts[0] = [0.mm+d1, tra, 0.mm+zz]
pts[1] = [0.mm+xx-d1, tra, 0.mm+zz]
pts[2] = [0.mm+xx-d1, yy-rws, 0.mm+zz]
pts[3] = [0.mm+d1, yy-rws, 0.mm+zz]
face = entities.add_face pts
status = face.pushpull -z1, true
end
if hs > 0
pts = []
pts[0] = [0.mm+d1, tra, 0.mm+zz]
pts[1] = [0.mm+xx-d1, tra, 0.mm+zz]
pts[2] = [0.mm+xx-d1, yy-rws, 0.mm+zz]
pts[3] = [0.mm+d1, yy-rws, 0.mm+zz]
face = entities.add_face pts
status = face.pushpull -z1, true
end
if os > 0
pts = []
pts[0] = [0.mm+d1, 0.mm, 0.mm+zz]
pts[1] = [0.mm+xx-d1, 0.mm, 0.mm+zz]
pts[2] = [0.mm+xx-d1, yy, 0.mm+zz]
pts[3] = [0.mm+d1, yy, 0.mm+zz]
face = entities.add_face pts
status = face.pushpull -z1, true
end
#ruecken
if us > 0
pts = []
pts[0] = [d1, 0.mm+yy-rws, zz]
pts[1] = [xx-d1, 0.mm+yy-rws, zz]
pts[2] = [xx-d1, 0.mm+yy+r1-rws, zz]
pts[3] = [d1, 0.mm+yy+r1-rws, zz]
base = entities.add_face pts
base.pushpull +zz, true
end
if os > 0
pts = []
pts[0] = [d1, 0.mm+yy-rws, zz-19.mm]
pts[1] = [xx-d1, 0.mm+yy-rws, zz-19.mm]
pts[2] = [xx-d1, 0.mm+yy+r1-rws, zz-19.mm]
pts[3] = [d1, 0.mm+yy+r1-rws, zz-19.mm]
base = entities.add_face pts
base.pushpull +zz-38.mm, true
end
if hs > 0
pts = []
pts[0] = [d1, 0.mm+yy-rws, zz]
pts[1] = [xx-d1, 0.mm+yy-rws, zz]
pts[2] = [xx-d1, 0.mm+yy+r1-rws, zz]
pts[3] = [d1, 0.mm+yy+r1-rws, zz]
base = entities.add_face pts
base.pushpull +zz, true
end
model.commit_operation
group.name = "korpus"
##
end
if( not file_loaded?("new2_xu.rb") )
end
#-----------------------------------------------------------------------------
file_loaded("new2_xu.rb")
|
|
|
| Verschiedene Fragen zum Arbeiten in Sketchup |
|
Geschrieben von: visionsurfer - 04.09.2021 - 10:43 - Forum: Bedienung & Oberfläche
- Keine Antworten
|
 |
Hallo,
ich bin noch neu in Sketchup und mache erste Schritte. Ich möchte hauptsächlich damit Lagerhallen gestalten und zeichnen.
Dazu habe ich ein paar Fragen:
1. Säulen verschieben
Ich zeichne in den Grundriss z.B. eine Säule ein. 15 x 15 cm. Diese ziehe ich dann nach oben. Soweit so gut. Wie kann ich so eine Säule verschieben ?
Wenn ich mit dem Verschiebewerkzeug arbeite, dann ziehe ich quasi eine Wand. Also ich kann nicht einfach die Säule markieren um diese dann z.B. auf der Fläche ein paar cm zu verschieben. Geht das überhaupt ?
2. Objekte in einer Höhe zeichnen
In meiner Lagerhalle möchte ich quasi eine Lagerbühne einzeichnen. Die ist freistehend im Raum. Wie zeichne ich quasi einen Boden der in 3 Meter Höhe ist. Freistehend ?
Da ich bisher keinen anderen Weg gefunden habe, würde ich wie folgt vorgehen. Ich würde erst auf der Fläche die Säulen zeichnen. Diese würde ich dann 3 Meter noch oben ziehen. Dann würde ich in der Höhe alle Punkte mit weiteren Linien verbinden um so neue Flächen zu bilden. Dann hab ich hoffentlich irgendwann den Boden und kann diesen wieder 5 cm nach oben ziehen um quasi ein Art "Boden" zu haben ? Ist das der richtige Weg ?
Wie verhält sich das, wenn der Boden ja z.B. nicht 100% genau auf den Ecken von den Säulen aufliegt. Sondern jeweils rechts und links 20 cm "überschaut". Zieht man sich dann erst mal Linien, die man dann später wieder löscht ? Gibt es für sowas eventuell ein Tutorial ?
3. Fertige Objekte bearbeiten
Es gibt ja im Warehouse3D auch fertige Lagerbühnen. Ein paar sind ganz gut. Nur passen die natürlich nicht 100% von den Maße. Wenn ich es skalieren will, wird alles irgendwie komisch. Also würde ich quasi vorhandene Objekte einfach weiter bearbeiten wollen. Ich habe schon ausgefunden, dass ich es in Einzelteile teilen kann. Dann kann ich ja einzelne Elemente markieren, duplizieren und so das Objekt weiter bauen. Kann ich alles danach auch irgendwie wieder zusammen fügen, dass ich dann das ganze Objekt verschieben kann ?
4. Maße von einem Modell sehen und passend skalieren ?
Ich nutze z.B. gerne dieses Regal: https://3dwarehouse.sketchup.com/model/u...ros-de-270
Das passt aber nicht immer. Ich weiß das ich es skalieren kann. Kann man irgendwo in Sketchup die Maße von dem Modell sehen und direkt durch eine feste Eingabe, dass Modell auf seine gewünschte Größe ändern ? Ich brauche es z.B. ein einer Länge von 200 cm. Mit dem skalieren taste ich mich immer ran. Geht das irgendwie genauer ?
Ich würde mich freuen, wenn mir vielleicht jemand dazu was sagen kann oder auf Hilfe verweisen könnte ?
Grüße,
M.
|
|
|
| Wie bleibt Sketchup smooth ? |
|
Geschrieben von: visionsurfer - 30.08.2021 - 11:42 - Forum: Bedienung & Oberfläche
- Antworten (10)
|
 |
Hallo,
ich bin noch ganz neu in der Welt von Sketchup. Bei mir geht es darum, dass ich unsere Lagerhallen visualisieren und planen möchte.
Mit Sketchup gibt es ja gigantische Möglichkeiten.
Nur wie kriege ich es hin, dass Sketchup bedienbar wird?
Ich habe nicht gerade einen schwachen Rechner. Aktuell habe ich erste Schritte in Sketchup gemacht und eine Halle gezeichnet. Diese will ich nun ausstatten. Unter anderem mit einem Hochregal, welches ich aus dem 3DWarehouse geholt habe, das Teil hat 3 MB. Ich habe es nun in meinem Projekt 100 mal dupliziert (viele Regale hintereinander) und da merke ich schon, wie alles träge wird und sich nicht mehr ohne weiteres flüssig bearbeiten lässt.
Ist das normal? Gibt es da einen Trick? Klar es gibt noch andere Modelle die man runterladen kann. Diese sind deutlich kleiner aber auch nicht so schön.
Kann man eventuell auch so ein 3 MB Modell noch von der Dateigröße kleiner machen? Oder gibt es da sonstiges Möglichkeiten und Tricks?
Vielen Dank,
M.
|
|
|
| 3-D Artist gesucht (m/w/d) |
|
Geschrieben von: Maywald - 25.08.2021 - 09:00 - Forum: Jobs
- Keine Antworten
|
 |
Hallo Zusammen,
wir, die maywald live.kommunikation gmbh sind führender Anbieter in der Kosmetikindustrie für temporäre Shopinstallationen in Deutschland.
Wir arbeiten seit Jahren mit SketchUp und V-Ray als Rendermodul.
Wir sind ein kleines Team von 12 Leuten, die Erstellung von 3-D Modellen ist unser größtes Kommunikationstool, sowohl
mit unseren Kunden als auch intern. Die Besonderheit unserer Arbeit liegt darin, dass wir nicht nur die Bilder erstellen,
sondern auch die Umsetzung in unserer angeschlossenen Tischlerei selbst durchführen.
Unser Firmensitz ist in Mönchengladbach, die Anwesenheit vor Ort wäre wichtig!
Wenn du ein SketchUp Nerd bist sowie wie wir, freuen wir uns über eine aussagekräftige Bewerbung.
E-Mail: tm@agentur-maywald.de
Viele Grüße
Tom Maywald
|
|
|
| Follow Me Tool |
|
Geschrieben von: stef - 25.08.2021 - 08:40 - Forum: Bedienung & Oberfläche
- Antworten (6)
|
 |
Hallo Zusammen,
Ich weiss nicht ob das hier schon mal besprochen wurde, gefunden hab ich jedenfalls nichts, dewegen frage ich mal nach.
Gibt's eine Möglichkeit, nachdem ich etwas mit dem Follow Me Tool erstellt habe, dieses in seine Einzelteile zu zerlegen?
Also z.b. ein Bilderrahmen. Rechteck, schönes Profil mit Falz, das wird dann schön auf Gehrung erstellt.
Jetzt wäre es super, wenn es eine Möglichkeit gäbe die 4 einzelnen Leisten da raus zu bekommen.
|
|
|
| Der Hamburger Hafen |
|
Geschrieben von: Bluemarlin - 23.08.2021 - 12:31 - Forum: Galerie
- Antworten (13)
|
 |
Dies ist ein Szenerie-Video des kompletten Hamburger Hafens.
Die Szenerie wurde (mit allen Vorarbeiten) innerhalb von 18 Monaten komplett in SketchUp erstellt und wird im Oktober für den Microsoft Flugsimulator 2020 als Freeware veröffentlicht.
|
|
|
|