We built DIYards to turn project dimensions into a materials list
DIYards is a set of calculators for people planning a fence, paver patio, or concrete slab. Enter the dimensions and the planner draws the layout and estimates the materials before you shop. A fence with a gate is a goo
DIYards is a set of calculators for people planning a fence, paver patio, or concrete slab. Enter the dimensions and the planner draws the layout and estimates the materials before you shop.
A fence with a gate is a good example of why the drawing matters. The gate takes up part of the run, and the remaining length determines the number of rail sections. The same post positions drive the drawing and the materials estimate.
Lay out a 100-foot run
Use a straight, 100 ft long, 6 ft high wood privacy fence with one 4 ft gate at the start. Use 8 ft between the centers of the regular posts. In this example, the 48 in gate leaf has 1 in of hinge clearance and ΒΎ in for the latch. That gives a 49ΒΎ in opening. Adding one post width of 3Β½ in accounts for half a post on each side, so the gate post centers are 53ΒΌ in apart.
The remaining 1,146ΒΎ in gives eleven full 96 in sections and one final 90ΒΎ in section. Treat the end of the gate as the start of the remaining run. It already has a post.
const end = 100 * 12
const gatePost = 48 + 1 + 0.75 + 3.5
const sectionLength = 96
const postCenters = [0, gatePost]
while (postCenters.at(-1) + sectionLength < end) {
postCenters.push(postCenters.at(-1) + sectionLength)
}
postCenters.push(end)
const fenceSections = postCenters.length - 2
console.log(postCenters.length) // 14 posts
console.log(fenceSections * 3) // 36 rails at three per section
console.log(end - postCenters.at(-2)) // 90.75 inches in the last section
Render the marks from postCenters and use the number of spans outside the gate to count the rails. That makes the short last section visible in the drawing and countable in the materials list. The dimensions and clearances above belong to the example. Substitute the measurements required by the gate hardware and site when estimating a real job.
This is the same worked layout used in the calculator's example. DIYards fence calculator and example
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.