Hello everyone,
I’m currently working on a project in Three.js where I need to generate 2D elevation plans from a 3D GLTF model of a house. My goal is to create a projection of the house’s front (or any other side) into a 2D plane, including accurate heights and measurements, which I will later use to draw on a PDF using libraries like jsPDF.
Here’s what I’ve managed so far:
- I can generate a floor plan by using a clipping plane to get a section of the house.
- By taking the intersections of each mesh with the clipping plane, I can draw the edges on a PDF and extract measurement information like lengths.
However, for creating an elevation plan, the clipping plane method doesn’t suffice because it only gives intersections, whereas I need the full projection of the house’s front view into 2D.
What I’m Looking For:
- Projection of the Model into 2D: How to project the entire front of the house (or any specified side) into a 2D plane.
- Measurement Extraction: How to accurately extract height and other measurements from this 2D projection.
- Integration with jsPDF: Any advice or best practices on integrating the extracted measurements and projection into jsPDF for generating the final PDF.
Additional Context:
- I’m using Three.js for rendering the GLTF model.
- I have experience with clipping planes and extracting intersections for floor plans, but this approach doesn’t work for my current needs.
- The final output needs to be a 2D elevation plan with accurate measurements that can be rendered on a PDF.
something like this but with heights, and measurments:
Any guidance, code snippets, or references to relevant resources would be greatly appreciated!
Thank you in advance for your help!