copy to side of a poly, issues with 3/5 sides [SOLVED]

   2549   4   2
User Avatar
Member
31 posts
Joined: March 2011
Offline
hi guys

have attached an example of what i am trying to accomplish, basically i have created a dynamic wall (i have simplified the wall in the attached project by removing the staggering), i want to copy the wall to the four sides of a circle primitive (currently set to 4 sided but i used a circle so that i could have as many sides as required), however when i copy to the circle i have two issues:-

- how do i rotate the wall so that it is facing the right way
or is it rotate the normals and then the wall face the right way
- how do i center the wall to the side of the circle, rather than the corner


the object is to have a four walled house, but with the option to increase the number of walls dynamically,

your thoughts please, all help appreciated
Edited by - Dec. 14, 2012 09:34:47

Attachments:
test.hipnc (64.7 KB)

User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Just check this file

Attachments:
test_Improve.hipnc (63.6 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
31 posts
Joined: March 2011
Offline
thanks for spending the time on this joker, neat solution, very minimal, especially like the way you have reduced

the double copy sop to a line stacked

to

single copy to grid

i had it that way so that i could stagger the bricks in the wall,
again thanks for getting back as i was pretty much stuck on how to get the walls to face the right way round

keep it real
r;0)b




hi joker,
i have applied your much simpler wall method, setup the stagger, works perfectly but ONLY if the building has 4 sides, if i change the sides to 3, 5,6 etc then the sides dont join together, they overlap, see attached.

I appreciate that this is a math problem, but am not sure what the formula would be, could you have a look? all help appreciated

Attachments:
lego.hipnc (87.4 KB)

User Avatar
Member
31 posts
Joined: March 2011
Offline
well have done some digging into polygon circle math and NEARLY fixed this by setting:

- shift_wall_right_by_half_brick_width/sizex = ch(“../wall/cols”)/(2*tan(180/ch(“divs”)))
- room_sides/radx & y = ch(“../wall/cols”)/(2*tan(180/ch(“divs”)))

as per this formula at http://www.mathopenref.com/polygonincircle.html [mathopenref.com]


thanks to all for looking
;0)



after more testing i can see that this works ONLY if the bricks have no depth, the more z added the more wrong it looks

Attachments:
lego_142.hipnc (86.4 KB)

User Avatar
Member
31 posts
Joined: March 2011
Offline
fixed it up, though looks a little weird with low wall numbers

Attachments:
lego_142_387.hipnc (86.3 KB)

  • Quick Links