JamesBremner / pipify

Code for https://stackoverflow.com/q/78943325/16582
1 stars 0 forks source link

Pipify

Design the underfloor heating of a house by laying out the pipes in a spiral in each room.

Specication of the rooms in a house

Each room is specified by a clockwise open polygon of 2D points ( Every corner is specified by one point, every door is specified by a pair of points. ) and a vector of indices in the polygon of the first point of a pair specifying a door

For example, a square room with one door is specified as:

    std::vector<cxy> wallPoints = {{0, 0}, {10, 0}, {30, 0}, {100, 0}, {100, 100}, {0, 100}};
    std::vector<int> doorPoints = {1};

which when rendered gives

image

Pipe layout in convex rooms

Shows return pipe in blue.

image

Pipe layout in a L-shaped room

image

GUI

image