Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax for elements derived from the footprint (detected patterns, elements defined on a footprint node) #10

Open
vvoovv opened this issue Jun 16, 2021 · 1 comment

Comments

@vvoovv
Copy link
Member

vvoovv commented Jun 16, 2021

WORK IN PROGRESS, NOT YET READY FOR THE REVIEW

An example of the element defined on a footprint node is a building entrance (OpenStreetMap tag: entrance)

facade[@apply_footprint_data](..condtion..) {
    // generate a div for a pattern
    generateFor: pattern, entrance;
    generate: div;
    markup: [
           
        div(item.edge.pattern is rectangle and not item.edge.hasEntrance()) {
            markup: [
                level {
                    markup: [
                        balcony {
                            class: myclass;
                        }
                    ]
                }
            ]
        }

        div(item.edge.pattern is rectangle and item.edge.hasEntrance()) {
            markup: [
                extrude_original {
                    markup: [
                        face(item.front) {
                            markup: [
                                level[0] {
                                    generateFor: entrance;
                                    generate: door;
                                    markup: [
                                        door{
                                            class: entrance_door
                                        }
                                    ]
                                }
                            ]        
                        }
                    ]
                }
            ]
        }

       div(item.center) {
           fromPattern: rectangle;
           level {
               markup: [
                 balcony {
                     class: myclass;
                 }
               ]
           }
       }

    ]
}
@vvoovv
Copy link
Member Author

vvoovv commented Jun 17, 2021

How to deal with a curvy part in PML.

A PML style is applied to the whole curvy facade generated from the curvy sequence.

Suppose a curvy part is formed by the segments S1, S2, S3, S4, S5. A PML style is applied to the flat area created after unwrapping the polygons generated from the segments S1, S2, S3, S4, S5.

The attribute curvy can be used in the style block condition:

facade(item.curvy) {
    ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant