converToIntermediate() {
        this.type = NODE_INTERMEDIATE;
        this.x = this.absX();
        this.y = this.absY();
        this.parent = this.scope.root;
        this.scope.nodes.push(this);
    }
function to convert a node to intermediate node