Looks goodJoel_graff wrote: ↑Sat Sep 07, 2019 9:58 pm Another update on the horizontal alignment design tool I'm working on.
Civil engineering feature implementation (Transportation Engineering)
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Thanks.
So I still think about your floating point issue with survey data. I can't reproduce it on my own - not sure how you generated the data that was causing the problem.
If you can set up a macro or something in Geomatics that produces the condition, it'd make it easier for me to try to sort it out.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Civil engineering feature implementation (Transportation Engineering)
Awesome work on the scenegraph stuff. How resource heavy is it ?Joel_graff wrote: ↑Sat Sep 07, 2019 9:58 pm Another update on the horizontal alignment design tool I'm working on.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
The actual rendering is done at the scenegraph level, of course, which is always highly-optimized. Another thing to keep in mind is that this needs to be rendered at the speed of the user - which tends to be pretty slow (we don't click and drag as fast as a computer can multiply ).
That provides a lot of computational room for running calculations in Python. I've also taken pains to utilize the scenegraph to transform existing points (rather than recalculate them in python) wherever I can. The result is that the operations are pretty responsive. I've probably used up most of the "computational equity" that I've gained by pushing transformations to the scenegraph wherever I can, but I don't generally see frame drops unless I'm dumping massive quantities of data to the console / report view for debugging.
Overall, I doubt there's to be much gained by porting anything to C++ (which I've considered), apart from the curve recalculations which are done entirely in Python. That said, my test case, here, is pretty small. A larger / more complex one will, undoubtedly, reveal deficiencies.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Civil engineering feature implementation (Transportation Engineering)
Fantastic work! Make Coin3D/Pivy Great Again!Joel_graff wrote: ↑Sun Sep 08, 2019 12:32 pm The actual rendering is done at the scenegraph level, of course, which is always highly-optimized. Another thing to keep in mind is that this needs to be rendered at the speed of the user - which tends to be pretty slow (we don't click and drag as fast as a computer can multiply ).
That provides a lot of computational room for running calculations in Python. I've also taken pains to utilize the scenegraph to transform existing points (rather than recalculate them in python) wherever I can. The result is that the operations are pretty responsive. I've probably used up most of the "computational equity" that I've gained by pushing transformations to the scenegraph wherever I can, but I don't generally see frame drops unless I'm dumping massive quantities of data to the console / report view for debugging.
Overall, I doubt there's to be much gained by porting anything to C++ (which I've considered), apart from the curve recalculations which are done entirely in Python. That said, my test case, here, is pretty small. A larger / more complex one will, undoubtedly, reveal deficiencies.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
You can create a point group by using this macro.Joel_graff wrote: ↑Sun Sep 08, 2019 11:34 am So I still think about your floating point issue with survey data. I can't reproduce it on my own - not sure how you generated the data that was causing the problem.
If you can set up a macro or something in Geomatics that produces the condition, it'd make it easier for me to try to sort it out.
Code: Select all
PointList = [[508418.1541,4274310.4065,96.3869
],[508418.4689,4274310.2952,96.6810
],[508424.2043,4274321.5715,97.2028
],[508429.0279,4274333.4529,97.7579
],[508429.1179,4274333.4706,97.9469
],[508433.9609,4274347.4975,99.0325
],[508433.5031,4274347.6467,98.7445
],[508436.2031,4274359.7003,99.1780
],[508436.7604,4274359.6776,99.8893
],[508438.5011,4274372.7364,100.4918
],[508437.9820,4274372.7410,99.6402
],[508439.3878,4274382.3762,100.6167
],[508438.5926,4274382.4601,100.0453
],[508434.1325,4274383.2338,99.8333
],[508427.0634,4274384.3345,99.6887
],[508426.7489,4274396.6027,98.9212
],[508425.5646,4274405.4507,99.5209
],[508424.8071,4274418.3559,100.6344
],[508421.4451,4274430.5715,100.5478
],[508417.9485,4274441.5909,100.3776
],[508416.2154,4274447.7898,100.4541
],[508423.9059,4274321.8134,96.9945
],[508424.8292,4274335.2727,97.5755
],[508413.3275,4274312.9355,96.2053
],[508431.2621,4274360.9833,99.0336
],[508427.7518,4274348.6647,98.7395
],[508432.3246,4274373.3730,99.5452
],[508426.6428,4274374.0966,99.7070
],[508426.8805,4274388.5032,99.5767
],[508425.6529,4274402.6797,99.1519
],[508425.1743,4274411.2798,99.9236
],[508416.7185,4274416.0849,92.5969
],[508410.0999,4274437.8440,91.8833
],[508417.8127,4274441.9196,100.3706
],[508413.0769,4274453.3804,100.1261
],[508417.9763,4274324.6349,96.7350
],[508421.9868,4274350.0427,98.8447
],[508420.4416,4274384.6411,93.4232
],[508426.8699,4274388.7458,99.5702
],[508426.2491,4274394.8037,98.9694
],[508425.4619,4274406.1119,99.4599
],[508414.5238,4274423.7111,92.2785
],[508411.7231,4274453.5627,98.6085
],[508415.6469,4274447.7163,100.2547
],[508413.4209,4274452.5480,100.1439
],[508408.4648,4274459.9841,98.7198
],[508406.9329,4274315.3884,96.3061
],[508417.5183,4274337.7648,97.6121
],[508424.8991,4274361.9426,99.2638
],[508419.9343,4274372.0066,93.3906
],[508419.8399,4274399.6485,93.2753
],[508417.7751,4274411.3638,92.6722
],[508405.3444,4274449.1070,91.3685
],[508405.7710,4274435.0840,92.0064
],[508412.6286,4274327.1611,96.8320
],[508418.9211,4274361.3427,93.6658
],[508416.5219,4274348.1656,94.0178
],[508419.9569,4274374.0067,93.2515
],[508412.9479,4274410.2127,92.7285
],[508400.8530,4274446.9245,91.5441
],[508409.7585,4274423.3014,92.3834
],[508399.8552,4274459.2729,91.2310
],[508401.2923,4274308.3939,94.7666
],[508400.8279,4274307.6948,94.8022
],[508409.2948,4274324.9512,94.4981
],[508412.9930,4274334.9452,94.2701
],[508419.3578,4274364.9056,93.4560
],[508414.7998,4274340.6341,94.1363
],[508420.2157,4274385.9325,93.1509
],[508419.7566,4274397.2937,92.9393
],[508414.7162,4274397.8807,92.9968
],[508395.6593,4274433.3810,81.9531
],[508398.9575,4274423.2666,82.2359
],[508402.4676,4274310.3953,94.7789
],[508405.4878,4274316.4309,94.6742
],[508410.0844,4274342.5248,94.2266
],[508415.2960,4274374.6723,93.4748
],[508415.4924,4274384.8178,93.2612
],[508404.1951,4274397.6100,82.8014
],[508402.4896,4274409.7083,82.7088
],[508395.6604,4274457.3129,91.2413
],[508391.2793,4274443.5433,81.5312
],[508386.0409,4274322.3986,85.0324
],[508396.4200,4274309.8013,94.9717
],[508412.7259,4274334.8349,94.2516
],[508401.2182,4274318.8170,94.8863
],[508417.5996,4274355.3426,93.6602
],[508411.8685,4274349.6990,94.0648
],[508414.6608,4274364.7047,93.7057
],[508387.3263,4274450.9201,81.2544
],[508386.9912,4274441.0954,81.7888
],[508391.6242,4274430.1391,82.1577
],[508394.6937,4274421.2087,82.4475
],[508380.9075,4274334.4499,74.8484
],[508398.5140,4274313.1877,94.8710
],[508408.1038,4274335.4584,94.4521
],[508404.9490,4274327.4272,94.6351
],[508401.1682,4274348.9332,84.0348
],[508405.1204,4274382.3316,83.3220
],[508404.9313,4274370.7460,83.6081
],[508398.8219,4274403.0723,82.8932
],[508381.6766,4274461.0042,80.9004
],[508395.8779,4274416.3851,82.5629
],[508391.5558,4274322.3523,84.7960
],[508389.2309,4274328.9395,84.8319
],[508394.1364,4274328.1091,84.5877
],[508394.7115,4274329.4133,84.5950
],[508413.2782,4274356.5314,93.8770
],[508402.9086,4274358.4700,83.7534
],[508397.7084,4274337.7276,84.4556
],[508399.6307,4274396.2617,83.0824
],[508381.2089,4274452.1649,81.3599
],[508381.6549,4274427.8616,72.1723
],[508387.0571,4274352.3748,74.5895
],[508389.9552,4274330.8507,84.8025
],[508397.0855,4274353.4721,84.1436
],[508396.0877,4274349.0690,84.2808
],[508400.2133,4274377.4789,83.6132
],[508399.2084,4274364.9916,83.8761
],[508400.0980,4274389.0150,83.2368
],[508387.6992,4274407.3314,72.8631
],[508375.9275,4274461.1085,80.8912
],[508394.5588,4274343.1934,84.4900
],[508388.9866,4274364.2913,74.1602
],[508391.7402,4274335.5091,84.7431
],[508389.8505,4274394.5826,73.3415
],[508390.6597,4274376.7727,74.0126
],[508311.5730,4274363.1651,85.4692
],[508319.7908,4274356.0848,83.5974
],[508324.1549,4274367.4932,82.9540
],[508287.1396,4274442.4447,81.8422
],[508315.0788,4274356.8683,83.4637
],[508317.7155,4274363.3502,83.1308
],[508278.9098,4274452.5931,80.1306
],[508293.0084,4274435.0480,82.8526
],[508312.5171,4274355.4987,85.2172
],[508319.8727,4274370.0800,82.6277
],[508272.6611,4274460.0426,78.7139
],[508285.9816,4274446.6696,78.6581
],[508294.4995,4274432.9020,83.1816
],[508293.7846,4274438.1306,79.0931
],[508315.6760,4274363.5947,85.5601
],[508326.0376,4274379.9863,82.3121
],[508321.2769,4274377.0577,82.2357
],[508270.1849,4274463.1325,78.0862
],[508273.0509,4274460.5843,77.8876
],[508280.8853,4274452.1081,78.3751
],[508312.8524,4274391.6250,85.6448
],[508293.1395,4274434.8687,82.8759
],[508298.9666,4274432.1515,79.3600
],[508317.9930,4274373.9311,86.1642
],[508296.3206,4274442.4741,79.1210
],[508289.1604,4274450.3027,78.9104
],[508313.0194,4274370.4391,85.6484
],[508300.4375,4274424.7733,84.1245
],[508301.1855,4274423.8630,84.3044
],[508325.2655,4274390.8780,81.7290
],[508321.5159,4274383.8817,81.8165
],[508317.9865,4274384.9023,85.8799
],[508282.0310,4274458.0783,78.4850
],[508313.9137,4274382.7302,85.8453
],[508305.5513,4274417.7409,84.8328
],[508305.7874,4274431.1765,79.7985
],[508317.9855,4274386.5549,85.8371
],[508317.6172,4274388.1820,85.8111
],[508312.4745,4274400.8010,85.5486
],[508303.7005,4274425.9148,79.6917
],[508322.9595,4274400.8680,81.1501
],[508320.8808,4274391.6212,81.3261
],[508315.3826,4274398.0557,85.6530
],[508307.4066,4274420.9596,79.9811
],[508305.6822,4274417.5573,84.8486
],[508315.2690,4274398.4805,85.6417
],[508319.7289,4274397.6718,80.9908
],[508308.4205,4274413.2932,85.0728
],[508312.0265,4274406.7552,85.1518
],[508316.2004,4274415.8127,80.4782
],[508316.0926,4274406.6768,80.6060
],[508315.3102,4274398.3754,85.6479
],[508307.3592,4274415.2057,85.0516
],[508310.5487,4274409.4582,85.1153
],[508312.6998,4274412.8396,80.3474
],[508311.8230,4274407.1618,85.1408
],[508311.9733,4274406.8909,85.1438
],[508310.1033,4274356.7547,85.0314
],[508310.4527,4274356.5623,85.0624
],[508312.0854,4274355.6632,85.1822
],[508312.4873,4274355.4419,85.2117
],[508345.3444,4274459.1959,70.1227
],[508346.2831,4274461.1897,70.8661
],[508339.3549,4274458.1658,70.2488
],[508328.4844,4274453.1103,69.5800
],[508316.9193,4274448.3629,69.7021
],[508307.8738,4274461.8190,69.1458
],[508299.2193,4274456.3161,68.8998
],[508317.6118,4274440.9621,69.7554
],[508311.4855,4274438.1391,69.7357
],[508342.3407,4274438.4641,70.5133
],[508336.7852,4274433.3991,70.4462
],[508343.9164,4274439.9042,69.4450
],[508337.5865,4274417.8182,71.0324
],[508330.4890,4274427.6641,70.4734
],[508328.6854,4274427.8175,70.9924
],[508323.6957,4274423.1441,70.6113
],[508245.8623,4274483.9947,72.9197
],[508236.4081,4274488.7556,71.2572
],[508241.3178,4274486.5879,71.4171
],[508236.7878,4274488.5981,71.2822
],[508236.4462,4274488.7497,71.2720
],[508244.3515,4274485.2183,71.7342
],[508249.2722,4274498.6236,67.6258
],[508250.2297,4274492.2694,71.1671
],[508248.9621,4274484.8956,72.2813
],[508248.9149,4274497.0196,67.5847
],[508251.8223,4274501.2434,67.7382
],[508248.3324,4274483.0132,73.6742
],[508249.8830,4274489.9312,71.5965
],[508247.8857,4274483.3005,73.1378
],[508249.9798,4274497.8943,67.6509
],[508256.1187,4274504.8455,67.7389
],[508249.9520,4274482.1516,74.4418
],[508253.6758,4274492.1566,73.0890
],[508255.8398,4274488.2320,74.4907
],[508249.5643,4274482.5237,74.0505
],[508257.0808,4274515.5840,61.2433
],[508252.6087,4274500.8663,67.6530
],[508251.8852,4274481.8084,75.1325
],[508255.4233,4274489.1337,74.2076
],[508254.7804,4274483.2919,74.9524
],[508251.4975,4274481.9279,74.9517
],[508262.0134,4274480.5631,76.3146
],[508256.7475,4274511.4048,62.1486
],[508252.0957,4274499.3152,66.6599
],[508257.6833,4274481.1509,75.2448
],[508253.2786,4274481.4586,75.1012
],[508257.3216,4274485.5080,75.5990
],[508259.2497,4274483.7107,75.9254
],[508261.0834,4274480.9133,75.3557
],[508257.0829,4274515.5927,61.2367
],[508257.0763,4274515.5865,61.2384
],[508255.6232,4274514.2266,60.2695
],[508255.1603,4274513.7933,60.4229
],[508254.1495,4274512.8475,60.1475
],[508251.3176,4274510.1972,61.6793
],[508250.0151,4274508.9783,61.0913
],[508247.6147,4274506.7318,61.2590
],[508244.0290,4274503.3762,59.3337
],[508242.7331,4274502.1635,59.1824
],[508236.6471,4274496.4679,62.1265
],[508236.6261,4274496.4483,62.1457
],[508229.5482,4274489.8244,65.3666
],[508229.5196,4274489.7977,65.2467
],[508229.2827,4274489.5759,64.3006
],[508229.0976,4274489.4027,64.0139
],[508252.1454,4274499.0755,66.6937
],[508253.7585,4274501.4400,66.7065
],[508258.8151,4274516.4840,61.4224
],[508256.6402,4274512.3299,61.8311
],[508257.5038,4274504.9310,66.6393
],[508258.6429,4274517.0526,61.1225
],[508261.7661,4274509.0558,61.8318
],[508404.3805,4274468.2069,98.9203
],[508389.5671,4274467.3359,90.8485
],[508269.5056,4274464.8581,77.6333
],[508272.5491,4274468.2609,77.6797
],[508274.1243,4274466.4218,77.8771
],[508269.5834,4274466.9297,77.5738
],[508269.1375,4274467.4309,77.8144
],[508406.4116,4274489.5375,100.5566
],[508401.0074,4274497.1430,100.2450
],[508395.8666,4274503.3375,99.8614
],[508386.6090,4274512.9840,98.5648
],[508396.6911,4274494.2098,98.0027
],[508391.9027,4274499.9255,97.8257
],[508403.9151,4274485.9325,98.4436
],[508383.0764,4274510.3370,96.7727
],[508377.2428,4274522.6964,97.5702
],[508401.2956,4274483.3651,98.4072
],[508390.4502,4274489.7788,98.1537
],[508386.0338,4274494.9090,97.7733
],[508374.6370,4274518.7788,95.8823
],[508367.6383,4274531.5875,96.1377
],[508346.7034,4274547.8950,91.7505
],[508376.7090,4274505.7223,96.6394
],[508365.7114,4274528.1113,94.3047
],[508357.2204,4274540.6208,93.9867
],[508394.1142,4274469.7487,90.8138
],[508397.3091,4274479.1229,98.3867
],[508380.2141,4274488.8676,89.7904
],[508372.8051,4274498.0444,89.5078
],[508368.8186,4274513.8785,95.8748
],[508355.5348,4274536.1410,92.3102
],[508344.8119,4274545.4511,90.4335
],[508387.3134,4274479.5863,90.3805
],[508366.6253,4274505.1139,89.2318
],[508359.6560,4274521.8725,94.2048
],[508333.1242,4274543.6515,88.7406
],[508369.7974,4274494.6421,89.6052
],[508376.4102,4274486.3598,89.9612
],[508363.0757,4274502.1711,89.2427
],[508359.2005,4274513.3952,88.7770
],[508350.8448,4274529.5642,92.7117
],[508339.2854,4274539.1903,90.2549
],[508324.9406,4274549.7715,86.6372
],[508330.7381,4274544.4856,87.0492
],[508383.6261,4274476.3756,90.4458
],[508350.5495,4274522.9801,88.2565
],[508332.4586,4274542.6355,87.1461
],[508312.5005,4274355.4346,85.1941
],[508313.6787,4274354.7858,83.5900
],[508315.5471,4274353.7569,83.6945
],[508317.6300,4274352.6100,83.7597
],[508323.4972,4274349.3791,74.6312
],[508374.0397,4274321.5471,75.1867
],[508378.4385,4274319.1248,80.1109
],[508382.8811,4274316.6784,85.2032
],[508386.6910,4274314.5804,85.1985
],[508387.2366,4274314.2800,85.1825
],[508395.0507,4274309.9770,93.8258
],[508395.3772,4274309.7972,94.2187
],[508396.1155,4274309.3907,94.9471
],[508396.1457,4274309.3741,94.9726
],[508397.0714,4274308.8643,94.9464
],[508400.3904,4274307.0367,94.8187
],[508400.4806,4274306.9870,94.7905
],[508400.6155,4274306.9127,95.0662
],[508400.7466,4274306.8405,95.2006
],[508401.1702,4274306.6072,95.8205
],[508405.8639,4274304.0226,95.9999
],[508406.5042,4274303.6700,95.9869
],[508411.9781,4274300.6557,95.9917
],[508412.4031,4274300.4217,96.0075
],[508412.6075,4274300.3091,96.1884
],[508412.6324,4274300.2954,96.2136
],[508296.4904,4274452.5906,68.7478
],[508309.7805,4274437.2859,69.6252
],[508321.1024,4274420.6022,70.4583
],[508378.4124,4274331.6221,74.8248
],[508326.5980,4274410.5508,70.8621
],[508384.6950,4274344.8913,74.5911
],[508388.8694,4274364.9020,73.7873
],[508332.6701,4274386.8164,71.9886
],[508331.9731,4274372.8353,72.8844
],[508389.8577,4274384.3436,73.2809
],[508331.4908,4274395.9023,71.4626
],[508327.4625,4274355.6171,73.4690
],[508389.2784,4274396.7807,73.1069
],[508387.3503,4274407.8345,72.7930
],[508378.1668,4274437.6429,71.8249
],[508364.6666,4274461.5987,71.1895
],[508371.9191,4274450.8959,71.3750
],[508373.2593,4274321.9768,75.1297
],[508323.6076,4274349.3183,73.7731
],[508340.7969,4274371.7565,72.6358
],[508334.9446,4274351.7943,74.1547
],[508342.5284,4274384.0051,71.9857
],[508343.7084,4274383.7489,72.4188
],[508345.2527,4274371.2032,72.2708
],[508337.4718,4274348.7570,74.3261
],[508348.8311,4274402.6322,71.2788
],[508354.4739,4274423.7431,71.1404
],[508345.6265,4274419.4566,71.2429
],[508362.0021,4274403.5699,71.8275
],[508351.3886,4274400.1519,71.3224
],[508338.3064,4274397.9592,71.1912
],[508338.1554,4274414.0951,71.4670
],[508339.3315,4274415.2323,71.1178
],[508346.2597,4274387.7237,71.2898
],[508336.8931,4274397.4503,71.5643
],[508331.1646,4274411.5818,71.2074
],[508351.2426,4274391.0826,71.2799
],[508346.8422,4274377.9731,70.7378
],[508346.3510,4274367.4149,70.7563
],[508345.7713,4274359.6058,70.9469
],[508344.0049,4274351.0983,71.5050
],[508341.2521,4274343.5970,70.8220
],[508330.9579,4274337.7701,74.6556
],[508346.7002,4274334.1319,70.5569
],[508349.7481,4274347.4388,70.9193
],[508344.5409,4274350.9766,70.7589
],[508353.9358,4274370.9735,70.8098
],[508351.2349,4274358.8630,71.0304
],[508356.0490,4274384.9070,71.2997
],[508357.0507,4274395.2967,71.3186
],[508356.3000,4274385.7238,71.3761
],[508355.8947,4274399.1076,71.3597
],[508362.7156,4274395.2504,71.5845
],[508355.6320,4274369.2513,71.6206
],[508362.5667,4274369.8313,71.3464
],[508362.9173,4274384.6640,71.2521
],[508353.1835,4274358.9082,71.9076
],[508351.2258,4274342.2826,72.1526
],[508348.7471,4274333.3955,71.9986
],[508356.0759,4274328.4204,71.9783
],[508366.8148,4274339.2355,76.2696
],[508359.9201,4274339.3963,72.2562
],[508364.3305,4274353.7808,72.0388
],[508375.5549,4274372.1129,75.3022
],[508370.9093,4274350.0158,75.6678
],[508374.3047,4274388.8740,71.4272
],[508365.1764,4274395.7067,71.4266
],[508366.7999,4274404.2018,71.9562
],[508376.9098,4274399.3889,72.7156
],[508375.9776,4274394.7908,72.4491
],[508361.4271,4274425.8628,71.2911
],[508376.9436,4274406.0250,73.1231
],[508380.8318,4274406.7871,72.8868
],[508377.2132,4274405.2842,72.1921
],[508378.6231,4274395.8041,73.0812
],[508376.7075,4274382.1946,73.7955
],[508366.2055,4274320.6608,75.5354
],[508374.6736,4274333.6511,75.0523
],[508379.2846,4274347.1034,74.7045
],[508383.4218,4274367.6247,74.1173
],[508382.8080,4274383.2815,73.6449
],[508383.5995,4274395.2666,73.1784
],[508369.9258,4274432.6964,71.8480
],[508351.4991,4274426.7297,71.1562
],[508354.1421,4274424.8254,71.1592
],[508358.3922,4274427.3062,71.2873
],[508362.3610,4274429.3368,71.4518
],[508361.3621,4274429.7965,70.4519
],[508354.1681,4274426.4386,69.9574
],[508355.9189,4274442.8178,71.3540
],[508361.9562,4274447.0121,71.4654
],[508351.6461,4274450.0936,71.4390
],[508359.5272,4274455.1552,71.3370
],[508351.2312,4274446.6578,69.8989
],[508375.6276,4274470.4434,80.5880
],[508357.4748,4274492.9417,79.2055
],[508362.3302,4274487.4406,79.4426
],[508368.3604,4274480.3199,80.0522
],[508355.6663,4274510.5276,88.7649
],[508341.8082,4274532.0708,87.7547
],[508323.5362,4274550.9776,86.4962
],[508323.5088,4274544.8321,86.8886
],[508335.0801,4274539.8165,87.2938
],[508327.2775,4274540.7568,87.0457
],[508351.8435,4274499.4672,78.7288
],[508338.5736,4274528.9284,87.7282
],[508347.0147,4274519.6998,88.2665
],[508322.5424,4274548.8026,86.5026
],[508305.3807,4274557.8024,81.9464
],[508365.1160,4274476.2954,80.0784
],[508369.8518,4274469.9837,80.4783
],[508351.8872,4274492.5389,79.4319
],[508359.4046,4274485.5730,79.6824
],[508344.2197,4274507.4856,78.2970
],[508331.6872,4274536.0721,87.3137
],[508315.5873,4274550.5984,84.7574
],[508320.8565,4274546.6374,86.2279
],[508321.6049,4274532.1195,77.0546
],[508312.6274,4274552.8189,84.0053
],[508341.0410,4274504.2962,78.7308
],[508328.1229,4274524.7710,77.4639
],[508336.3536,4274516.0472,77.9920
],[508313.2931,4274540.7892,76.7649
],[508307.9916,4274555.3973,82.2712
],[508359.2625,4274483.5521,79.8130
],[508335.6592,4274494.9526,68.7137
],[508307.5587,4274546.9243,76.5581
],[508318.7410,4274528.1256,77.4097
],[508301.9168,4274553.3026,76.1879
],[508326.0546,4274505.0825,68.1306
],[508330.5240,4274515.4725,78.0685
],[508308.3449,4274539.3262,76.8033
],[508298.8782,4274550.8195,76.3145
],[508316.3616,4274515.7015,67.7006
],[508297.7120,4274550.5293,76.3479
],[508289.8721,4274544.0066,66.3447
],[508265.3510,4274476.7440,76.7773
],[508269.6490,4274468.6759,77.5236
],[508269.7557,4274471.5175,77.4420
],[508269.6930,4274469.8489,77.4899
],[508266.5130,4274475.3473,76.9278
],[508264.8760,4274477.3029,76.7178
],[508303.7569,4274559.2723,81.4565
],[508302.2444,4274557.8568,79.4137
],[508299.9634,4274555.7221,76.1597
],[508298.5299,4274554.3806,76.2241
],[508297.9209,4274553.8107,76.2530
],[508296.2043,4274552.2042,76.3116
],[508294.6254,4274550.7266,74.1813
],[508266.5394,4274484.6962,67.2759
],[508278.2345,4274472.0695,67.9226
],[508307.2800,4274525.3978,67.3352
],[508300.4559,4274532.8900,67.0020
],[508290.4313,4274543.3490,66.2735
],[508315.9280,4274515.9566,67.5978
],[508322.9369,4274508.4558,67.9290
],[508324.4233,4274506.5976,67.9781
],[508338.9128,4274491.4996,68.7249
],[508348.6962,4274480.8976,69.5451
],[508357.2992,4274470.9847,70.3694
],[508288.7948,4274545.2700,66.2574
],[508352.9794,4274466.9207,70.8322
],[508343.5954,4274474.9021,69.6363
],[508339.3266,4274470.4425,69.8298
],[508316.7225,4274470.5797,68.5189
],[508329.4197,4274482.3170,69.3496
],[508334.3705,4274486.2586,69.3769
],[508321.9043,4274503.2438,68.1395
],[508314.7434,4274495.4959,68.4803
],[508299.3769,4274507.7378,62.7989
],[508308.4573,4274481.7574,67.1594
],[508309.1829,4274513.2021,67.7172
],[508303.1775,4274519.9385,67.4623
],[508288.6338,4274526.4152,65.9639
],[508290.9710,4274517.8552,62.2769
],[508294.8921,4274529.9089,66.7082
],[508295.2694,4274512.2644,62.6027
],[508287.3694,4274539.2766,66.4456
],[508287.6450,4274537.3733,65.6970
],[508277.3793,4274539.4188,65.5874
],[508279.8882,4274527.1419,65.8914
],[508280.9918,4274537.0847,65.5146
],[508271.6853,4274533.6949,65.2265
],[508272.0956,4274525.3903,62.2720
],[508267.4263,4274527.1472,61.2400
],[508285.1182,4274523.1979,62.1457
],[508282.5362,4274523.3315,62.0910
],[508278.1101,4274523.0008,62.0765
],[508287.3852,4274520.4259,62.3542
],[508270.4762,4274523.8448,59.4708
],[508277.0818,4274521.0598,60.7241
],[508263.1431,4274516.9614,59.0853
],[508271.0748,4274513.0477,60.3655
],[508264.7992,4274513.6934,61.8625
],[508271.9546,4274510.3757,60.9117
],[508279.0050,4274514.1790,61.2537
],[508282.4676,4274518.2307,62.1631
],[508282.8829,4274516.1478,61.4369
],[508271.7840,4274510.7847,61.0065
],[508268.8252,4274510.1238,62.1342
],[508270.0213,4274505.4884,61.8482
],[508276.6515,4274504.3235,62.1841
],[508269.9332,4274502.4707,62.2719
],[508266.6131,4274503.8344,62.3457
],[508270.3021,4274495.0337,67.2064
],[508274.4190,4274499.7955,62.6372
],[508281.5223,4274499.0130,62.8622
],[508280.8310,4274492.5677,63.3511
],[508285.3357,4274487.3150,65.4778
],[508291.7725,4274499.1009,62.9469
],[508286.7180,4274506.6581,62.2483
],[508285.1909,4274511.4959,61.6294
],[508286.0769,4274513.4048,62.2588
],[508290.2123,4274508.8513,62.2372
],[508295.3805,4274504.2988,62.6434
],[508295.3612,4274492.1901,65.3444
],[508294.3426,4274479.0566,66.4869
],[508287.8066,4274480.2700,67.9668
],[508302.2617,4274465.2272,68.9072
],[508311.8884,4274466.5022,68.8236
],[508281.5876,4274474.1434,67.8505
],[508268.3374,4274490.2378,67.4936
]]
PointGroup = FreeCAD.ActiveDocument.addObject('Points::Feature', "Point_Group")
List = []
Base = PointList[0]
for Point in PointList:
Point = (Point[0]-Base[0], Point[1]-Base[1], Point[2]-Base[2])
List.append(Point)
PointObject = PointGroup.Points.copy()
PointObject.addPoints(List)
PointGroup.Points = PointObject
PointGroup.Placement.Base = Base
FreeCAD.ActiveDocument.recompute()
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Ok, so you offset the points and use a placement to position them. The range of the points is pretty small, too...
I assume those coordinates supposed to represent meters? FreeCAD's internal unit is millimeters, of course...
Also, how can you verify that they aren't being placed accurately? What were you comparing against that I can also use for a reference?
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Civil engineering feature implementation (Transportation Engineering)
I forgot to convert them to milimeter When I create a surface from points, triangles corners dont overlap to points. there are a gap between them about 3cm-30cm.Joel_graff wrote: ↑Mon Sep 09, 2019 11:50 pm Ok, so you offset the points and use a placement to position them. The range of the points is pretty small, too...
I assume those coordinates supposed to represent meters? FreeCAD's internal unit is millimeters, of course...
Also, how can you verify that they aren't being placed accurately? What were you comparing against that I can also use for a reference?
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Ok, I'm up to speed, now.HakanSeven12 wrote: ↑Tue Sep 10, 2019 5:59 am I forgot to convert them to milimeter When I create a surface from points, triangles corners dont overlap to points. there are a gap between them about 3cm-30cm.
I tested it with the points normalized about the origin vs. transformed to their actual position using Placement.Base. I can reproduce the issue - at the origin, the points rest on the surface exactly as they should. However, after transformed by the placement, the error you report appears to be there.
I noticed something interesting, though.
When inspecting the points of the surface mesh, their positions were the transformed (actual) position, rather than the normalized position about the origin. That suggests to me that the Surface generation transforms the points by the applied Placement *before* creating the surface.
So it seems to me that in order to make this work, you need to normalize your points about the origin as you have been, generate your surface, and then apply the Placement transformation separately to both objects. That should prevent the Surface from transforming the points before generating the faces.
EDIT:
Incidentally, when normalizing your points, I suggest computing a geometric mean of the data set as your origin. This will help center the coordinates around (0.0, 0.0, 0.0). The reason is because you can maintain precision using the negative coordinate space as well as the positive. Starting at one end / corner effectively reduces the total size of your mesh (for purposes of floating point precision / accuracy) by half.
To put it another way, a 32-bit float has 23 bits it can dedicate to the actual number. The sign is a separate bit, which effectively doubles the size of the float (-x to +x)
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
Just a footnote for the file:
I've created a new workbench for the swept path analysis (turning analysis) tool @microelly2 created last year. Been wanting to write a UI and see if it could be made functional.
I've dubbed it the "Turns" workbench.
https://github.com/joelgraff/freecad.turns
I've created a new workbench for the swept path analysis (turning analysis) tool @microelly2 created last year. Been wanting to write a UI and see if it could be made functional.
I've dubbed it the "Turns" workbench.
https://github.com/joelgraff/freecad.turns
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers