×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# 2D Zone Merge, need help finding a library

## 2D Zone Merge, need help finding a library

(OP)
Hey Coders/Engineers,

I have worked out a method to determine different zones for diaphragm strength independently in two directions.
Now I want to attempt to combine the results from each direction to develop a complete diaphragm zone plan.

1) I am pretty confident this can be done. I've seem some of the stuff @Agent666 does with python and I'm certain there is a way.
2) I am decent at python and pandas already.

I'd like to see if there is a good geometry library where I could first generate the regions from the data I have already calculated, then merge them together to make the graph.

Anyone know of a library that might simplify this task???

I have data sufficient to define the domain (in black) and I have coordinates of the transition regions between each color for each direction (A & B) from the image below. Just need an efficient way to merge the geometries that are similar to get figure C. I don't just want the graphical, I'd like to maintain the data of the solution as well.

### RE: 2D Zone Merge, need help finding a library

I'm making a thing: www.thestructuraltoolbox.com
(It's no Kootware and it will probably break but it's alive!)

### RE: 2D Zone Merge, need help finding a library

Thinking over some coffee this morning your two data set boundaries are horizontal and vertical lines so by inspection you know all of the intersection points, corner coords of C, it will just be the combinations of (x,y) pairs of each line value. Take all of the those (x,y) intersection points and process into regions. A simple approach would be sweeping along the y axis and building the boxes of each segment in a bottom up order.

I'm making a thing: www.thestructuraltoolbox.com
(It's no Kootware and it will probably break but it's alive!)

### RE: 2D Zone Merge, need help finding a library

(OP)
Thanks for the reply Celt I'm gonna poke around with this and where it takes me. I think a tool that integrates diaphragm analysis and design could be a big time saver. So far the user I puts the ordinates of the diaphragm shear diagram and they input what they want as a diaphragm (nailing) schedule then solvea the locations indicates on A & B above. It's already saved me wuote a bit of time :)

### RE: 2D Zone Merge, need help finding a library

Use shapely, if each one of the colour bands is a polygon with the exterior edge (or you can make it a polygon), then look a the union command in shapely, it will return the combined commom area, then just take off the prior smaller area defined as a hole (if you work centre outwards)?

I guess ultimately it depends on what you want to do with the data next but that will get you the coordinates of the donut shape (shapely describes it as a list of coordinates for the exterior and interior hole(s). But I'm guessing it won't always be that type of shape.

https://engineervsheep.com

### RE: 2D Zone Merge, need help finding a library

(OP)
Thanks both for the input. I am going to keep pushing to develop these zones, I think my end goal is going to be to export a .dwg or something similar. This could either be used directly on the drawings, or used in combination with CAD to make the process of drawing this diagram on the sheet much faster.

I will post back here any progress. Cheers!

### RE: 2D Zone Merge, need help finding a library

If you want a reference for a DXF export I did a crude implementation for my old snow drift script, starts on line 591 here Link

I'm making a thing: www.thestructuraltoolbox.com
(It's no Kootware and it will probably break but it's alive!)

### RE: 2D Zone Merge, need help finding a library

Good stuff, I was thinking of developing something similar with shear density requirements in two-way flat slabs

### RE: 2D Zone Merge, need help finding a library

Can't help too much with Python, but I figured out a way to do it in VBA a while back :) Had to share because nobody in the office thinks it's nearly as cool as I do...

Too bad RISA3d has removed this design tool in the current version though.

### RE: 2D Zone Merge, need help finding a library

(OP)
Unfortunately I haven't had a chance to dive back into this recently. Thanks all for the interest and replies so far.

@dold Nice!. what tool are you talking about that Risa3d used to have?

### RE: 2D Zone Merge, need help finding a library

@drift
risafloor > risa3d (v14 & v16 I think) used to have the ability to design flexible wood diaphragms. I.e., diaphragms and wood diaphragm regions would be defined in risafloor and then when analyzed in risa3d the program would report max design shears/chord forces/etc for the user defined diaphragm regions. It would select sheathing/nailing patterns/etc for you as well. Apparently this will be added back in...."eventually".
I never really used it in production but it seemed pretty slick. You can probably find some info about it in the old r3d manuals if you're so inclined.

### RE: 2D Zone Merge, need help finding a library

(OP)
Yes I remember this feature. I recall struggling to get it to work well. Would be a great tool if it could figure out the more complex diaphragm topics (ie Malone).

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!