JWock82 / PyNite

A 3D structural engineering finite element library for Python.
MIT License
421 stars 86 forks source link

Add fix for 3D cylinder mesh: #169

Closed SoundsSerious closed 11 months ago

SoundsSerious commented 11 months ago

allow origin reading for input on coordinate do not adjust number of node spacing in loop as that can result in unpredictable behavior ensure at least one mesh element will be made

SoundsSerious commented 11 months ago

I ran into an issue where mesh elements weren't being added when the mesh size was larger than the height, so I added some protection to ensure at least one ring of mesh is made. I was a bit confused by the name "mesh size" i thought that meant the number of elements so I adjusted the description to mean the size of the element edge as I think was intended.

I also noticed an issue where the discretization change dynamically as the cylinder mesh was progressively made as y changed so I moved this before the loop.

I see there are some "conflicts" but our code is exactly the same so I've removed my duplication for selection of y-origin per axis selection.

SoundsSerious commented 11 months ago

Absolutely this makes sense. I didn't really think about control points as an option but makes perfect sense. I am currently breaking up the mesh to meet with some lateral beams and that would absolutely make my life a bit easier.

I have made the changes you requested.

I thought about adding a #TODO note for a control point feature but didn't see that convention anywhere else in the lib so I left it out. You might like this add in for vscode to track bugs, fixes, and todos which helps me keep my head bolted on :) https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree