You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

466 lines
26 KiB

#pragma once
#include <chrono>
#include "organizer/blobtree.hpp"
#include "organizer/loader.hpp"
#include "organizer/timer.hpp"
void loaderPolyTilted()
{
Loader loader;
Timer timer("loading and blob construction");
std::vector<Point3D> pointsA = {
{11748.40944836227, -4325.95442631630, 21549.59021205360},
{11748.40944836227, -4325.95442631630, 21688.15427665911},
{12484.47483358811, -3577.50000026381, 21256.03391230463},
{12484.47483358811, -3577.50000026381, 21117.46984769912},
{13547.89202684581, -6100.00000002560, 20666.46170041069},
{13395.74126433313, -5950.00000002583, 20614.28430405553},
{13395.74126433326, -5950.00000002584, 20663.98975519961},
{13547.89202684630, -6100.00000002596, 20663.99725169609},
{14896.90742621000, -5950.00000002583, 19886.27039878878},
{13547.89202684630, -5950.00000002583, 20665.01632032316},
{14896.90742621000, -5950.00000002583, 19747.70633418327},
{13547.89202684630, -5950.00000002583, 20526.45225571764},
{13547.89202684630, -5950.00000002583, 20663.99725169609},
{19320.12419289630, -10425.00000002583, 17237.43714661155},
{17934.90567930174, -10425.00000002583, 18037.08203458280},
{17934.90567930176, -10425.00000002583, 18174.44161578225},
{19320.12419289630, -10425.00000002583, 17374.79672781102},
{19322.21070997919, -10425.00000002583, 17374.79672780697},
{19447.22812297115, -10425.00000002583, 17302.62794416358},
{19447.22812297115, -10425.00000002583, 17164.06387955807},
{20849.99999998906, -13298.88732652532, 16381.97836082562},
{20849.99999998906, -11804.55202899014, 16367.57914427394},
{20849.99999998906, -11952.06910409846, 16369.00059922656},
{21124.99999998917, -13570.00000002583, 16225.84155693102},
{21124.99999998917, -13570.00000002583, 16364.40562153653},
{17808.11337720760, -10300.00000002579, 18247.63498939708},
{20849.99999998906, -13298.88732652532, 16433.95194745345},
{20998.20769789509, -13445.00000002584, 16435.35986977861},
{20998.20769789509, -13445.00000002584, 16423.72661838442},
{20999.99999998906, -13446.76696661644, 16423.72670669148},
{20999.99999998906, -13446.76696661645, 16296.81283142860},
{21124.99999998918, -13445.00000002584, 16363.20113813048},
{21124.99999998918, -13445.00000002584, 16224.63707352497},
{20999.99999998706, -11952.06910409846, 16420.97418585554},
{20849.99999998906, -11804.55202899014, 16506.14320887944},
{19320.12419289630, -10300.00000002807, 17374.79672781104},
{20999.99999998906, -13445.00000002584, 16435.35986977861},
{20849.99999998906, -11952.06910409846, 16420.97418585438},
{20999.99999998906, -13445.00000002584, 16296.79580517310},
{20999.99999998906, -13445.00000002584, 16423.72670669148},
{15049.43214230555, -6250.00000002583, 19662.54917389031},
{13700.04278935896, -6250.00000002583, 20441.51096755456},
{13700.04278935883, -6250.00000002583, 20578.62965207288},
{15049.43214230555, -6250.00000002583, 19799.66785840855},
{15051.93596280547, -6250.00000002583, 19799.66785840341},
{15201.95685839510, -6250.00000002583, 19713.06531803178},
{15201.95685839510, -6250.00000002583, 19574.50125342627},
{17374.99999998906, -9873.00899774759, 18354.97979185655},
{17499.99999998647, -8510.00401819123, 18269.68732516803},
{17374.99999998905, -8510.00401819123, 18341.84605681460},
{17499.99999998906, -9996.24203115686, 18422.57258196454},
{17374.99999998906, -9873.00899774759, 18421.38512481399},
{17499.99999998647, -8510.00401819123, 18408.25138977354},
{15049.43214230555, -6100.00000002878, 19799.66785840858},
{17374.99999998905, -8510.00401819123, 18408.25138977205},
{17681.32107511346, -10175.00000002584, 18239.32978475061},
{17681.32107511355, -10175.00000002583, 18181.05981500027},
{17808.11337720775, -10175.00000002583, 18107.86644138542},
{17808.11337720775, -10175.00000002583, 18239.33603183102},
{17499.99999998894, -9996.24203115674, 18414.69559548384},
{17624.99999998906, -10119.47506456613, 18343.54697073095},
{17624.99999998905, -10119.47506456613, 18213.03724286152},
{17808.11337720775, -10300.00000002602, 18239.33603183102},
{19193.02026281690, -10175.00000002583, 17446.96551146108},
{17624.99999998905, -8632.93491411901, 18337.27720391787},
{17624.99999998906, -9996.24203115674, 18350.41385031648},
{17624.99999998906, -10105.75355350319, 18351.46908880798},
{17513.64524135624, -9996.24203115674, 18414.69559548384},
{17808.11337720776, -10175.00000002583, 18246.43050599092},
{19193.02026281690, -10175.00000002583, 17308.40144685557},
{17624.99999998905, -8632.93491411901, 18198.71313931236},
{17624.99999998906, -9996.24203115674, 18211.84978571097},
{11748.40944836227, -4325.95442631630, 21549.59021205360},
{11748.40944836227, -4325.95442631630, 21688.15427665911},
{12484.47483358811, -3577.50000026381, 21256.03391230463},
{12484.47483358811, -3577.50000026381, 21117.46984769912},
{13547.89202684581, -6100.00000002560, 20666.46170041069},
{13395.74126433313, -5950.00000002583, 20614.28430405553},
{13395.74126433326, -5950.00000002584, 20663.98975519961},
{13547.89202684630, -6100.00000002596, 20663.99725169609},
{14896.90742621000, -5950.00000002583, 19886.27039878878},
{13547.89202684630, -5950.00000002583, 20665.01632032316},
{14896.90742621000, -5950.00000002583, 19747.70633418327},
{13547.89202684630, -5950.00000002583, 20526.45225571764},
{13547.89202684630, -5950.00000002583, 20663.99725169609},
{19320.12419289630, -10425.00000002583, 17237.43714661155},
{17934.90567930174, -10425.00000002583, 18037.08203458280},
{17934.90567930176, -10425.00000002583, 18174.44161578225},
{19320.12419289630, -10425.00000002583, 17374.79672781102},
{19322.21070997919, -10425.00000002583, 17374.79672780697},
{19447.22812297115, -10425.00000002583, 17302.62794416358},
{19447.22812297115, -10425.00000002583, 17164.06387955807},
{20849.99999998906, -13298.88732652532, 16381.97836082562},
{20849.99999998906, -11804.55202899014, 16367.57914427394},
{20849.99999998906, -11952.06910409846, 16369.00059922656},
{21124.99999998917, -13570.00000002583, 16225.84155693102},
{21124.99999998917, -13570.00000002583, 16364.40562153653},
{17808.11337720760, -10300.00000002579, 18247.63498939708},
{20849.99999998906, -13298.88732652532, 16433.95194745345},
{20998.20769789509, -13445.00000002584, 16435.35986977861},
{20998.20769789509, -13445.00000002584, 16423.72661838442},
{20999.99999998906, -13446.76696661644, 16423.72670669148},
{20999.99999998906, -13446.76696661645, 16296.81283142860},
{21124.99999998918, -13445.00000002584, 16363.20113813048},
{21124.99999998918, -13445.00000002584, 16224.63707352497},
{20999.99999998706, -11952.06910409846, 16420.97418585554},
{20849.99999998906, -11804.55202899014, 16506.14320887944},
{19320.12419289630, -10300.00000002807, 17374.79672781104},
{20999.99999998906, -13445.00000002584, 16435.35986977861},
{20849.99999998906, -11952.06910409846, 16420.97418585438},
{20999.99999998906, -13445.00000002584, 16296.79580517310},
{20999.99999998906, -13445.00000002584, 16423.72670669148},
{15049.43214230555, -6250.00000002583, 19662.54917389031},
{13700.04278935896, -6250.00000002583, 20441.51096755456},
{13700.04278935883, -6250.00000002583, 20578.62965207288},
{15049.43214230555, -6250.00000002583, 19799.66785840855},
{15051.93596280547, -6250.00000002583, 19799.66785840341},
{15201.95685839510, -6250.00000002583, 19713.06531803178},
{15201.95685839510, -6250.00000002583, 19574.50125342627},
{17374.99999998906, -9873.00899774759, 18354.97979185655},
{17499.99999998647, -8510.00401819123, 18269.68732516803},
{17374.99999998905, -8510.00401819123, 18341.84605681460},
{17499.99999998906, -9996.24203115686, 18422.57258196454},
{17374.99999998906, -9873.00899774759, 18421.38512481399},
{17499.99999998647, -8510.00401819123, 18408.25138977354},
{15049.43214230555, -6100.00000002878, 19799.66785840858},
{17374.99999998905, -8510.00401819123, 18408.25138977205},
{17681.32107511346, -10175.00000002584, 18239.32978475061},
{17681.32107511355, -10175.00000002583, 18181.05981500027},
{17808.11337720775, -10175.00000002583, 18107.86644138542},
{17808.11337720775, -10175.00000002583, 18239.33603183102},
{17499.99999998894, -9996.24203115674, 18414.69559548384},
{17624.99999998906, -10119.47506456613, 18343.54697073095},
{17624.99999998905, -10119.47506456613, 18213.03724286152},
{17808.11337720775, -10300.00000002602, 18239.33603183102},
{19193.02026281690, -10175.00000002583, 17446.96551146108},
{17624.99999998905, -8632.93491411901, 18337.27720391787},
{17624.99999998906, -9996.24203115674, 18350.41385031648},
{17624.99999998906, -10105.75355350319, 18351.46908880798},
{17513.64524135624, -9996.24203115674, 18414.69559548384},
{17808.11337720776, -10175.00000002583, 18246.43050599092},
{19193.02026281690, -10175.00000002583, 17308.40144685557},
{17624.99999998905, -8632.93491411901, 18198.71313931236},
{17624.99999998906, -9996.24203115674, 18211.84978571097},
{11748.40944836227, -4325.95442631630, 21549.59021205360},
{11748.40944836227, -4325.95442631630, 21688.15427665911},
{12484.47483358811, -3577.50000026381, 21256.03391230463},
{12484.47483358811, -3577.50000026381, 21117.46984769912},
{13547.89202684581, -6100.00000002560, 20666.46170041069},
{13395.74126433313, -5950.00000002583, 20614.28430405553},
{13395.74126433326, -5950.00000002584, 20663.98975519961},
{13547.89202684630, -6100.00000002596, 20663.99725169609},
{14896.90742621000, -5950.00000002583, 19886.27039878878},
{13547.89202684630, -5950.00000002583, 20665.01632032316},
{14896.90742621000, -5950.00000002583, 19747.70633418327},
{13547.89202684630, -5950.00000002583, 20526.45225571764},
{13547.89202684630, -5950.00000002583, 20663.99725169609},
{19320.12419289630, -10425.00000002583, 17237.43714661155},
{17934.90567930174, -10425.00000002583, 18037.08203458280},
{17934.90567930176, -10425.00000002583, 18174.44161578225},
{19320.12419289630, -10425.00000002583, 17374.79672781102},
{19322.21070997919, -10425.00000002583, 17374.79672780697},
{19447.22812297115, -10425.00000002583, 17302.62794416358},
{19447.22812297115, -10425.00000002583, 17164.06387955807},
{20849.99999998906, -13298.88732652532, 16381.97836082562},
{20849.99999998906, -11804.55202899014, 16367.57914427394},
{20849.99999998906, -11952.06910409846, 16369.00059922656},
{21124.99999998917, -13570.00000002583, 16225.84155693102},
{21124.99999998917, -13570.00000002583, 16364.40562153653},
{17808.11337720760, -10300.00000002579, 18247.63498939708},
{20849.99999998906, -13298.88732652532, 16433.95194745345},
{20998.20769789509, -13445.00000002584, 16435.35986977861},
{20998.20769789509, -13445.00000002584, 16423.72661838442},
{20999.99999998906, -13446.76696661644, 16423.72670669148},
{20999.99999998906, -13446.76696661645, 16296.81283142860},
{21124.99999998918, -13445.00000002584, 16363.20113813048},
{21124.99999998918, -13445.00000002584, 16224.63707352497},
{20999.99999998706, -11952.06910409846, 16420.97418585554},
{20849.99999998906, -11804.55202899014, 16506.14320887944},
{19320.12419289630, -10300.00000002807, 17374.79672781104},
{20999.99999998906, -13445.00000002584, 16435.35986977861},
{20849.99999998906, -11952.06910409846, 16420.97418585438},
{20999.99999998906, -13445.00000002584, 16296.79580517310},
{20999.99999998906, -13445.00000002584, 16423.72670669148},
{15049.43214230555, -6250.00000002583, 19662.54917389031},
{13700.04278935896, -6250.00000002583, 20441.51096755456},
{13700.04278935883, -6250.00000002583, 20578.62965207288},
{15049.43214230555, -6250.00000002583, 19799.66785840855},
{15051.93596280547, -6250.00000002583, 19799.66785840341},
{15201.95685839510, -6250.00000002583, 19713.06531803178},
{15201.95685839510, -6250.00000002583, 19574.50125342627},
{17374.99999998906, -9873.00899774759, 18354.97979185655},
{17499.99999998647, -8510.00401819123, 18269.68732516803},
{17374.99999998905, -8510.00401819123, 18341.84605681460},
{17499.99999998906, -9996.24203115686, 18422.57258196454},
{17374.99999998906, -9873.00899774759, 18421.38512481399},
{17499.99999998647, -8510.00401819123, 18408.25138977354},
{15049.43214230555, -6100.00000002878, 19799.66785840858},
{17374.99999998905, -8510.00401819123, 18408.25138977205},
{17681.32107511346, -10175.00000002584, 18239.32978475061},
{17681.32107511355, -10175.00000002583, 18181.05981500027},
{17808.11337720775, -10175.00000002583, 18107.86644138542},
{17808.11337720775, -10175.00000002583, 18239.33603183102},
{17499.99999998894, -9996.24203115674, 18414.69559548384},
{17624.99999998906, -10119.47506456613, 18343.54697073095},
{17624.99999998905, -10119.47506456613, 18213.03724286152},
{17808.11337720775, -10300.00000002602, 18239.33603183102},
{19193.02026281690, -10175.00000002583, 17446.96551146108},
{17624.99999998905, -8632.93491411901, 18337.27720391787},
{17624.99999998906, -9996.24203115674, 18350.41385031648},
{17624.99999998906, -10105.75355350319, 18351.46908880798},
{17513.64524135624, -9996.24203115674, 18414.69559548384},
{17808.11337720776, -10175.00000002583, 18246.43050599092},
{19193.02026281690, -10175.00000002583, 17308.40144685557},
{17624.99999998905, -8632.93491411901, 18198.71313931236},
{17624.99999998906, -9996.24203115674, 18211.84978571097},
{11748.40944836227, -4325.95442631630, 21549.59021205360},
{11748.40944836227, -4325.95442631630, 21688.15427665911},
{12484.47483358811, -3577.50000026381, 21256.03391230463},
{12484.47483358811, -3577.50000026381, 21117.46984769912},
{13547.89202684581, -6100.00000002560, 20666.46170041069},
{13395.74126433313, -5950.00000002583, 20614.28430405553},
{13395.74126433326, -5950.00000002584, 20663.98975519961},
{13547.89202684630, -6100.00000002596, 20663.99725169609},
{14896.90742621000, -5950.00000002583, 19886.27039878878},
{13547.89202684630, -5950.00000002583, 20665.01632032316},
{14896.90742621000, -5950.00000002583, 19747.70633418327},
{13547.89202684630, -5950.00000002583, 20526.45225571764},
{13547.89202684630, -5950.00000002583, 20663.99725169609},
{19320.12419289630, -10425.00000002583, 17237.43714661155},
{17934.90567930174, -10425.00000002583, 18037.08203458280},
{17934.90567930176, -10425.00000002583, 18174.44161578225},
{19320.12419289630, -10425.00000002583, 17374.79672781102},
{19322.21070997919, -10425.00000002583, 17374.79672780697},
{19447.22812297115, -10425.00000002583, 17302.62794416358},
{19447.22812297115, -10425.00000002583, 17164.06387955807},
{20849.99999998906, -13298.88732652532, 16381.97836082562},
{20849.99999998906, -11804.55202899014, 16367.57914427394},
{20849.99999998906, -11952.06910409846, 16369.00059922656},
{21124.99999998917, -13570.00000002583, 16225.84155693102},
{21124.99999998917, -13570.00000002583, 16364.40562153653},
{17808.11337720760, -10300.00000002579, 18247.63498939708},
{20849.99999998906, -13298.88732652532, 16433.95194745345},
{20998.20769789509, -13445.00000002584, 16435.35986977861},
{20998.20769789509, -13445.00000002584, 16423.72661838442},
{20999.99999998906, -13446.76696661644, 16423.72670669148},
{20999.99999998906, -13446.76696661645, 16296.81283142860},
{21124.99999998918, -13445.00000002584, 16363.20113813048},
{21124.99999998918, -13445.00000002584, 16224.63707352497},
{20999.99999998706, -11952.06910409846, 16420.97418585554},
{20849.99999998906, -11804.55202899014, 16506.14320887944},
{19320.12419289630, -10300.00000002807, 17374.79672781104},
{20999.99999998906, -13445.00000002584, 16435.35986977861},
{20849.99999998906, -11952.06910409846, 16420.97418585438},
{20999.99999998906, -13445.00000002584, 16296.79580517310},
{20999.99999998906, -13445.00000002584, 16423.72670669148},
{15049.43214230555, -6250.00000002583, 19662.54917389031},
{13700.04278935896, -6250.00000002583, 20441.51096755456},
{13700.04278935883, -6250.00000002583, 20578.62965207288},
{15049.43214230555, -6250.00000002583, 19799.66785840855},
{15051.93596280547, -6250.00000002583, 19799.66785840341},
{15201.95685839510, -6250.00000002583, 19713.06531803178},
{15201.95685839510, -6250.00000002583, 19574.50125342627},
{17374.99999998906, -9873.00899774759, 18354.97979185655},
{17499.99999998647, -8510.00401819123, 18269.68732516803},
{17374.99999998905, -8510.00401819123, 18341.84605681460},
{17499.99999998906, -9996.24203115686, 18422.57258196454},
{17374.99999998906, -9873.00899774759, 18421.38512481399},
{17499.99999998647, -8510.00401819123, 18408.25138977354},
{15049.43214230555, -6100.00000002878, 19799.66785840858},
{17374.99999998905, -8510.00401819123, 18408.25138977205},
{17681.32107511346, -10175.00000002584, 18239.32978475061},
{17681.32107511355, -10175.00000002583, 18181.05981500027},
{17808.11337720775, -10175.00000002583, 18107.86644138542},
{17808.11337720775, -10175.00000002583, 18239.33603183102},
{17499.99999998894, -9996.24203115674, 18414.69559548384},
{17624.99999998906, -10119.47506456613, 18343.54697073095},
{17624.99999998905, -10119.47506456613, 18213.03724286152},
{17808.11337720775, -10300.00000002602, 18239.33603183102},
{19193.02026281690, -10175.00000002583, 17446.96551146108},
{17624.99999998905, -8632.93491411901, 18337.27720391787},
{17624.99999998906, -9996.24203115674, 18350.41385031648},
{17624.99999998906, -10105.75355350319, 18351.46908880798},
{17513.64524135624, -9996.24203115674, 18414.69559548384},
{17808.11337720776, -10175.00000002583, 18246.43050599092},
{19193.02026281690, -10175.00000002583, 17308.40144685557},
{17624.99999998905, -8632.93491411901, 18198.71313931236},
{17624.99999998906, -9996.24203115674, 18211.84978571097}
};
std::vector<int> indicesA = {
0, 1, 2, 3, 4, 1, 0, 5, 6, 7, 8, 2, 1, 4, 9, 3, 2, 8, 10, 11, 10, 8, 9,
12, 6, 5, 11, 12, 11, 5, 0, 3, 10, 7, 6, 12, 9, 4, 7, 12, 85, 86, 87, 88, 89, 90,
91, 92, 86, 85, 91, 93, 94, 95, 96, 97, 87, 86, 92, 98, 99, 100, 101, 102, 103, 96, 95, 104, 105,
106, 90, 89, 107, 97, 96, 103, 108, 109, 106, 105, 99, 98, 109, 105, 108, 98, 92, 94, 93, 106, 109, 90,
106, 93, 91, 108, 103, 104, 110, 111, 100, 99, 95, 102, 110, 104, 110, 102, 101, 111, 101, 100, 111, 107, 89,
88, 87, 97, 107, 88, 184, 185, 186, 187, 188, 189, 190, 191, 185, 184, 190, 192, 193, 194, 148, 186, 185, 191,
195, 196, 189, 188, 197, 148, 194, 189, 196, 192, 190, 193, 192, 196, 198, 195, 191, 193, 198, 196, 194, 195, 198,
197, 188, 187, 186, 148, 197, 187, 271, 272, 273, 274, 241, 266, 275, 276, 277, 272, 271, 278, 279, 280, 281, 282,
283, 266, 241, 284, 280, 279, 285, 286, 273, 285, 279, 284, 274, 273, 272, 277, 287, 286, 285, 287, 277, 276, 282,
281, 280, 286, 276, 275, 283, 282, 266, 283, 275, 284, 241, 278, 274, 278, 271, 274};
std::vector<std::pair<int, int>> facesA = {
{0, 4 },
{4, 6 },
{10, 5 },
{15, 4 },
{19, 5 },
{24, 4 },
{28, 5 },
{33, 3 },
{36, 4 },
{40, 7 },
{47, 6 },
{53, 11},
{64, 4 },
{68, 9 },
{77, 3 },
{80, 5 },
{85, 6 },
{91, 4 },
{95, 7 },
{102, 4 },
{106, 4 },
{110, 3 },
{113, 3 },
{116, 4 },
{120, 7 },
{127, 6 },
{133, 6 },
{139, 6 },
{145, 4 },
{149, 4 },
{153, 4 },
{157, 4 },
{161, 3 },
{164, 4 },
{168, 4 },
{172, 8 },
{180, 8 },
{188, 4 },
{192, 5 },
{197, 6 },
{203, 7 },
{210, 4 },
{214, 3 },
{217, 4 },
{221, 3 }
};
std::vector<int> objExclusiveScan = {0, 9, 24, 34};
std::vector<std::vector<std::pair<int, int>>> objFaces(objExclusiveScan.size());
for (int i = 0; i < objExclusiveScan.size(); i++) {
objFaces[i].assign(facesA.begin() + objExclusiveScan[i],
i == objExclusiveScan.size() - 1 ? facesA.end() : facesA.begin() + objExclusiveScan[i + 1]);
}
// debug strange face
std::vector<Point3D> strangeFace;
for (int index = facesA[13].first; index < facesA[13].first + facesA[13].second; index++) {
strangeFace.push_back(pointsA[indicesA[index]]);
}
// std::cout << "Des volume:" << std::endl;
// loader.getAreaAndVolume(tag1);
std::vector<Point3D> pointsB = {
{17624.99999998905, -8510.00401819123, 17830.90112057791},
{17374.99999998905, -8510.00401819123, 17830.90112057791},
{17374.99999998905, -8510.00401819123, 18408.25138976753},
{17624.99999998905, -8510.00401819123, 18408.25138976753},
{17624.99999998906, -3577.50000024273, 20678.68364311939},
{17374.99999998906, -3577.50000024273, 20678.68364311939},
{17374.99999998906, -3577.50000024273, 21256.03391230901},
{17624.99999998906, -3577.50000024273, 21256.03391230901}
};
std::vector<int> indicesB = {0, 1, 2, 3, 0, 1, 5, 4, 1, 2, 6, 5, 2, 3, 7, 6, 3, 0, 4, 7, 4, 5, 6, 7};
std::vector<std::pair<int, int>> facesB = {
{0, 4},
{4, 4},
{8, 4},
{12, 4},
{16, 4},
{20, 4}
};
const std::array<std::array<double, 3>, 3> rotationMatrix = {-0.6402, 0.6868, 0.3440, 0.6713, 0.7180,
-0.1840, 0.3734, -0.1131, 0.9208};
// for (auto& point : pointsA) { point.rotation(rotationMatrix); }
auto tag1 = loader.addMesh(pointsA, indicesA, objFaces[0]);
for (int i = 1; i < objFaces.size(); i++) {
auto tmpTag = loader.addMesh(pointsA, indicesA, objFaces[i]);
loader.unionNode(tag1, tmpTag);
}
auto tag2 = loader.addMesh(pointsB, indicesB, facesB);
// loader.getAreaAndVolume(tag2);
loader.differentNode(tag1, tag2);
timer.stop();
loader.getAreaAndVolume(tag1);
}
void loaderPolyThickPlane()
{
Loader loader;
Timer timer("loading and blob construction");
auto tag1 = loader.addMesh(
{
{2629.82969004962, 6801.21455575771, 49030.00000000000},
{2869.82968877607, 6801.18983125328, 49030.00000000000},
{2869.82968877607, 6801.18983125328, 52180.00000000000},
{2629.82969004962, 6801.21455575771, 52180.00000000000},
{2870.01294237553, 8580.02684557581, 49030.00000000000},
{2629.98821659743, 8340.02684557581, 49030.00000000000},
{1939.99863941572, 8340.02684557581, 49030.00000000000},
{1939.99863941572, 8580.02684557581, 49030.00000000000},
{2629.98821659743, 8340.02684557581, 52180.00000000000},
{1939.99863941572, 8340.02684557581, 52180.00000000000},
{2870.01294237553, 8580.02684557581, 52180.00000000000},
{1939.99863941572, 8580.02684557581, 52180.00000000000}
},
{0, 1, 2, 3, 4, 1, 0, 5, 6, 7, 6, 5, 8, 9, 5, 0, 3, 8, 8, 3, 2, 10, 11, 9, 1, 4, 10, 2, 4, 7, 11, 10, 7, 6, 9, 11},
{{0, 4}, {4, 6}, {10, 4}, {14, 4}, {18, 6}, {24, 4}, {28, 4}, {32, 4}});
/**** 处理凹多面体 */
auto& rep = loader.getVisible(tag1);
rep.subBlobTree.structure[5].nodeOp = algoim::organizer::OP_UNION;
// std::cout << "Des volume:" << std::endl;
// loader.getAreaAndVolume(tag1);
auto tag2 = loader.addMesh(
{
{2629.99453728099, 8340.01156816906, 52180.00000000000},
{2869.99453728099, 8340.01156816906, 52180.00000000000},
{2869.99453728099, 8401.36916293070, 52180.00000000000},
{2869.99453728099, 8580.01156816906, 52180.00000000000},
{2629.99453728099, 8580.01156816906, 52180.00000000000},
{2629.99453728099, 8340.02684557581, 52180.00000000000},
{2629.99453728099, 8340.01156816906, 49030.00000000000},
{2869.99453728099, 8340.01156816906, 49030.00000000000},
{2869.99453728099, 8401.36916293070, 49030.00000000000},
{2869.99453728099, 8580.01156816906, 49030.00000000000},
{2629.99453728099, 8580.01156816906, 49030.00000000000}
},
{0, 1, 2, 3, 4, 5, 6, 7, 1, 0, 7, 8, 9, 3, 2, 1, 9, 10, 4, 3, 10, 6, 0, 5, 4, 6, 10, 9, 8, 7},
{{0, 6}, {6, 4}, {10, 6}, {16, 4}, {20, 5}, {25, 5}});
loader.differentNode(tag1, tag2);
timer.stop();
loader.getAreaAndVolume(tag1);
}