2
$\begingroup$

I am looking to use geometry nodes to generate -semi- accurate layouts for timber frame buildings.

This should be achieved by simply placing an edge where you want the wall to be generated.

Illustration how i want the studs to be placed

I made this illustration in auto cad of how I need the walls to be generated. The rectangles with the crosses are the tops of the studs as if we are looking down the Z axis in an orthographic view. The line through the centre is the edge and the two circles are the vertices. The green stud is the start of the frame and the blue one is the end of the frame. (the arrow is to illustrate the direction of the frame.

The length of the edge will be variable and I'm looking for the number of studs and the distance between the centres to adapt to the variations.

the distance from the start of the frame stud and the first stud in the centre can be any distance as long as it doesnt exceed 600mm. subsequent studs need to be exactly 600mm apart and the final two studs can be the remainder as long as it doesn't execeed 600mm as well.

Could someone please help me with which path I need to go down? Thank you!

New contributor
Callum Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
2
  • 1
    $\begingroup$ Are you looking for help with the mathematics to compute the number of studs, or for doing it with geometry nodes ? As it is, your problem is not closed because the length of the first AND last segments are unspecified. This means that you have two degrees of freedom, the number of studs and the first OR last segment length, assuming the total length is fixed. $\endgroup$ Commented 19 hours ago
  • $\begingroup$ Im looking to do this with geometry nodes $\endgroup$ Commented 19 hours ago

1 Answer 1

4
$\begingroup$

With geometry nodes you can do this using a "curve" and working with its length:

Result

Nodes

  • Convert the mesh edge to a curve
  • Trims this curve to remove half the width of the studs from each side
  • Gets start and end points of this curve
  • Trims the curve to remove the initial gap and the remaining last gap
    • Improvement pending: if this length is a multiple of the standard gap, you don't need the last point taken above (it will be a duplicate)
  • Resamples the remaining curve with a count compatible with the standard gap size
  • Joins the points and puts pillars on them

Nodes

File

Possible improvement

If you work with curve lines instead of mesh edges, you could have multiple individual lines and use this procedure (with little tweaks) to make multiple walls in a single object.

$\endgroup$
1
  • $\begingroup$ Thanks for the help, it works great, next up im going to try and work out how to add rails to the top and bottom and after that some textures. I am having an issue though with the first and last stud not lining up exactly with the vertexes. (probably because i wired something up wrong) I also changed the name "stud width" to "stud depth" and I also added a stud depth and a wall height to the instance transforms. $\endgroup$ Commented 16 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.