I am trying to place smoke detector in rooms. Suppose if room is greater than 80 sq m, than place a smoke detector in Centroid of a room. If room area is greater than 80 then place a smoke detectors accordingly that covers all the room area, It can be multiple smoke detector and room may be irregular as well.
Sounds like a version of bin packing maybe? The first step is easy enough, get all the rooms and their area, if > 80, find center and place at center.
Generally, if you are asking for the full solution for a complicated procedure without showing any work yet, nothing will happen for you. Try reading this: How to get help on the Dynamo forums
Yeah, As you suggested, The first part is already solved but the issue I am facing with the larger room than 80. Any approach to solve that?
What have you tried so far? I can help if you have a plan already or at least different ways that didn’t work out.
One approach might be to split the room in half if its too big, and then if each half is under 80, put it in center, otherwise split in half again, etc. til all parts are less than 80. Might end up with more than you need but it would be a start.
In the Dynamo file, The upper part is working and placing the smoke detector in the smaller room, But for larger its I am not getting the clear solution approach to place multiple smoke detectors for irregular rooms.
I thought for the same, But splitting a rooms directly from Dynamo, How should I do that?
That’s where you have to try it out and see what works best. You can get the perimeter of a room and try to split the lines, maybe using the center of the room as a point on the line. It would be a bit of geometry work to get it to work.
Maybe an easier solution could be to find the area, and use it to determine how many smoke detectors you would need, and then make a list of points using a surface’s UV coordinates to create smoke detectors. So for example a room with area 120 would need 2 detectors, so using coordinates of U = [0.5, 0.5] and V = [0.25, 0.75] as points on surface to create the detectors.
I can’t do much more for you. Making a dynamo graph to split the rooms, etc. would be more like the work from a paying job.
Thanks @kennyb6. No problem, I will try this approach !!