aalavandhaann / blueprint-js

The Javascript es6 version of the original furnishup/blueprint3d. Need some royalty free low poly models for the inventory. Can someone help me with this?
MIT License
493 stars 156 forks source link

Clean wall joins #64

Closed technbuzz closed 3 years ago

technbuzz commented 3 years ago

Describe the bug I have modified the original project based on my needs. When we change the thickness then the wall edges are not clean as you can see in the image below. The room area is also not properly created. There is an empty space.

image

To Reproduce Steps to reproduce the behavior: We need to modify the wall styles in order to properly see the difference

  1. Go to WallView2d.js
  2. Comment this line
    update () {
      // this.__drawDimensionLine()
      this.__updateDimensionText()
    }
  3. Update the following function as

    __drawPolygon(color = 0xDDDDDD, alpha = 1.0) {
        let points = this.__getPolygonCoordinates();
        this.clear();
        // this.beginFill(color, alpha);
        this.beginFill(color, 0.05); //
        for (let i = 0; i < points.length; i++) {
            let pt = points[i];
            if (i === 0) {
                this.moveTo(pt.x, pt.y);
            } else {
                this.lineTo(pt.x, pt.y);
            }
        }
        this.endFill();
    
        // let cornerLine = this.__getCornerCoordinates();
        // this.lineStyle(Dimensioning.cmToPixel(this.__wall.thickness), color, alpha, 0.5);
        // this.moveTo(cornerLine[0].x, cornerLine[0].y);
        // this.lineTo(cornerLine[1].x, cornerLine[1].y);
    
        // this.lineStyle(1, 0xFFFFFF);
        // this.moveTo(cornerLine[0].x, cornerLine[0].y);
        // this.lineTo(cornerLine[1].x, cornerLine[1].y);
    }
  4. See the effect

Expected behavior

Something like the following would be nice. Here the corner angle is proper. You can try it on this website https://www.wanaplan.com/try_plan

image (1)

aalavandhaann commented 3 years ago

This is done now. Closing the issue

Regards,

0K