Well, I think you have a problem with using the same code to generate the staircase twice, and getting 2 different GROUPS. This is how it works:
grp="run01"
GOUSB "CreateRun
TRANS x,y,z
ROTZ 90
grp="Run02"
GOUSB "CreateRun
res=GROUP_UNION("Lauf01","Lauf02")
GROUP_PLACE res
END
"CreateRun":
Create run with PRISM and GROUP_UNION here
....
res=GROUP_UNION(stairs,carrier)
GROUP grp
GROUP_PLACE res
GROUP_END
RETURN
Regards.
Jörg
Hi Nemo, I send you the my code schematic for stair like 3d attached. The problem of merge is indicated with red arrows. Can you tell me where is the problem in the code? Thank you.
ROTX 90
ROTY 90
GOSUB "str_r1"
GOSUB "str_pie_1"
GOSUB "str_pie_2"
GOSUB "str_r2"
GOSUB "str_pie_3"
GOSUB "str_pie_4"
GOSUB "str_r3"
GOSUB "triang_arr"
END
"str_r1":
GROUP "sot_tri_r1"
TRANS …..
PRISM …..
RESTORE 1
GROUP_END
GROUP "tri_r1"
FOR n = 1 TO ped_num_r1
GOSUB "triang_r1"
TRANS ….
NEXT
RESTORE ped_num_r1
GROUP_END
res1 = ""
res1 = GROUP_UNION ( "sot_tri_r1" , "tri_r1" )
!GROUP_PLACE res1
RETURN
"triang_r1":
TRANS …..
PRISM …..
RESTORE 1
RETURN
"str_pie_1":
GROUP "pie_1"
TRANS ….
PRISM ….
RESTORE 1
GROUP_END
res1 = GROUP_UNION ( res1 , "pie_1" )
!GROUP_PLACE res1
RETURN
"str_pie_2":
GROUP "pie_2"
TRANS ….
ROTX ….
PRISM ….
RESTORE 2
GROUP_END
res1 = GROUP_UNION ( res1 , "pie_2" )
GROUP_PLACE res1
RETURN
"str_r2":
TRANS ….
ROTY ….
GROUP "sot_tri_r2"
TRANS ….
PRISM ….
PRISM ….
RESTORE 1
GROUP_END
GROUP "tri_r2"
FOR n = 1 TO ped_num_r2
GOSUB "triang_r2"
TRANS ….
NEXT
RESTORE ped_num_r2
GROUP_END
res2 = GROUP_UNION ( "sot_tri_r2" , "tri_r2" )
!GROUP_PLACE res2
RETURN
"triang_r2":
TRANS ….
PRISM ….
RESTORE 1
RETURN
"str_pie_3":
GROUP "pie_3"
TRANS ….
PRISM ….
RESTORE 1
GROUP_END
res2 = GROUP_UNION ( res2 , "pie_3" )
RETURN
"str_pie_4":
GROUP "pie_4"
TRANS ….
ROTX ….
PRISM ….
RESTORE 2
GROUP_END
res2 = GROUP_UNION ( res2 , "pie_4" )
GROUP_PLACE res2
RETURN
"str_r3":
TRANS ….
ROTY ….
GROUP "sot_tri_r3"
TRANS ….
PRISM ….
PRISM ….
RESTORE 1
GROUP_END
GROUP "tri_r3"
FOR n = 1 TO ped_num_r3 - 1
GOSUB "triang_r3"
TRANS ….
NEXT
RESTORE ped_num_r3 - 1
GROUP_END
res3 = GROUP_UNION ( "sot_tri_r3" , "tri_r3" )
!GROUP_PLACE res3
RETURN
"triang_arr":
GROUP "tri_ar_r3"
TRANS ….
PRISM ….
RESTORE 5
GROUP_END
res3 = GROUP_UNION ( res3 , "tri_ar_r3" )
GROUP_PLACE res3
RETURN