python 2.7 - Identify orthogonal and non-orthogonal Polygon and fracture them -


we using boost polygon library perform polygon operation. in latest scenario need determine following point.

  1. identify if polygon orthogonal or non orthogonal , receiving following coordinates input.

    input python list have interface

    data = [(100, 100), (100, 200), (300, 200), (600, 400), (1150, 400), (1150,300), (600,300), (300,100)](these data point create following non orthogonal polygon) enter image description here

    data = [(550 , 221), (800 , 221), (800 , 269), (1090 , 269), (1090 , 173), (1520 , 173), (1520 , 269), (1810 , 269), (1810 , 173), (2420 , 173), (2420 , 221), (2708 , 221), (2708 , 317), (550 , 317) ]

    these data point create orthogonal polygon enter image description here

  2. what should behavior if doing fracture in horizontal or vertical direction of non orthogonal polygon , orthogonal polygon need handle both polygon

  3. can vertical , horizontal rectangle non orthogonal.

could not add image not have 10 reputation.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -