topologicpy 0.7.67__py3-none-any.whl → 0.7.69__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- topologicpy/Cell.py +6 -4
- topologicpy/CellComplex.py +2 -20
- topologicpy/Cluster.py +41 -66
- topologicpy/Edge.py +1 -1
- topologicpy/EnergyModel.py +4 -4
- topologicpy/Face.py +28 -36
- topologicpy/Graph.py +82 -18
- topologicpy/Grid.py +2 -3
- topologicpy/Honeybee.py +6 -9
- topologicpy/Plotly.py +31 -6
- topologicpy/Shell.py +10 -13
- topologicpy/Topology.py +103 -107
- topologicpy/Vertex.py +3 -6
- topologicpy/Wire.py +16 -15
- topologicpy/version.py +1 -1
- {topologicpy-0.7.67.dist-info → topologicpy-0.7.69.dist-info}/METADATA +1 -1
- topologicpy-0.7.69.dist-info/RECORD +36 -0
- topologicpy-0.7.67.dist-info/RECORD +0 -36
- {topologicpy-0.7.67.dist-info → topologicpy-0.7.69.dist-info}/LICENSE +0 -0
- {topologicpy-0.7.67.dist-info → topologicpy-0.7.69.dist-info}/WHEEL +0 -0
- {topologicpy-0.7.67.dist-info → topologicpy-0.7.69.dist-info}/top_level.txt +0 -0
topologicpy/Topology.py
CHANGED
@@ -442,362 +442,362 @@ class Topology():
|
|
442
442
|
if Topology.IsInstance(topology, "Vertex"):
|
443
443
|
if topologyType.lower() == "vertex":
|
444
444
|
try:
|
445
|
-
_ = topology.AdjacentVertices(hostTopology, adjacentTopologies)
|
445
|
+
_ = topology.AdjacentVertices(hostTopology, adjacentTopologies) # Hook to Core
|
446
446
|
except:
|
447
447
|
try:
|
448
|
-
_ = topology.Vertices(hostTopology, adjacentTopologies)
|
448
|
+
_ = topology.Vertices(hostTopology, adjacentTopologies) # Hook to Core
|
449
449
|
except:
|
450
450
|
error = True
|
451
451
|
elif topologyType.lower() == "edge":
|
452
452
|
try:
|
453
|
-
_ = topologic.VertexUtility.AdjacentEdges(topology, hostTopology, adjacentTopologies)
|
453
|
+
_ = topologic.VertexUtility.AdjacentEdges(topology, hostTopology, adjacentTopologies) # Hook to Core
|
454
454
|
except:
|
455
455
|
try:
|
456
|
-
_ = topology.Edges(hostTopology, adjacentTopologies)
|
456
|
+
_ = topology.Edges(hostTopology, adjacentTopologies) # Hook to Core
|
457
457
|
except:
|
458
458
|
error = True
|
459
459
|
elif topologyType.lower() == "wire":
|
460
460
|
try:
|
461
|
-
_ = topologic.VertexUtility.AdjacentWires(topology, hostTopology, adjacentTopologies)
|
461
|
+
_ = topologic.VertexUtility.AdjacentWires(topology, hostTopology, adjacentTopologies) # Hook to Core
|
462
462
|
except:
|
463
463
|
try:
|
464
|
-
_ = topology.Wires(hostTopology, adjacentTopologies)
|
464
|
+
_ = topology.Wires(hostTopology, adjacentTopologies) # Hook to Core
|
465
465
|
except:
|
466
466
|
error = True
|
467
467
|
elif topologyType.lower() == "face":
|
468
468
|
try:
|
469
|
-
_ = topologic.VertexUtility.AdjacentFaces(topology, hostTopology, adjacentTopologies)
|
469
|
+
_ = topologic.VertexUtility.AdjacentFaces(topology, hostTopology, adjacentTopologies) # Hook to Core
|
470
470
|
except:
|
471
471
|
try:
|
472
|
-
_ = topology.Faces(hostTopology, adjacentTopologies)
|
472
|
+
_ = topology.Faces(hostTopology, adjacentTopologies) # Hook to Core
|
473
473
|
except:
|
474
474
|
error = True
|
475
475
|
elif topologyType.lower() == "shell":
|
476
476
|
try:
|
477
|
-
_ = topologic.VertexUtility.AdjacentShells(topology, hostTopology, adjacentTopologies)
|
477
|
+
_ = topologic.VertexUtility.AdjacentShells(topology, hostTopology, adjacentTopologies) # Hook to Core
|
478
478
|
except:
|
479
479
|
try:
|
480
|
-
_ = topology.Shells(hostTopology, adjacentTopologies)
|
480
|
+
_ = topology.Shells(hostTopology, adjacentTopologies) # Hook to Core
|
481
481
|
except:
|
482
482
|
error = True
|
483
483
|
elif topologyType.lower() == "cell":
|
484
484
|
try:
|
485
|
-
_ = topologic.VertexUtility.AdjacentCells(topology, hostTopology, adjacentTopologies)
|
485
|
+
_ = topologic.VertexUtility.AdjacentCells(topology, hostTopology, adjacentTopologies) # Hook to Core
|
486
486
|
except:
|
487
487
|
try:
|
488
|
-
_ = topology.Cells(hostTopology, adjacentTopologies)
|
488
|
+
_ = topology.Cells(hostTopology, adjacentTopologies) # Hook to Core
|
489
489
|
except:
|
490
490
|
error = True
|
491
491
|
elif topologyType.lower() == "cellcomplex":
|
492
492
|
try:
|
493
|
-
_ = topologic.VertexUtility.AdjacentCellComplexes(topology, hostTopology, adjacentTopologies)
|
493
|
+
_ = topologic.VertexUtility.AdjacentCellComplexes(topology, hostTopology, adjacentTopologies) # Hook to Core
|
494
494
|
except:
|
495
495
|
try:
|
496
|
-
_ = topology.CellComplexes(hostTopology, adjacentTopologies)
|
496
|
+
_ = topology.CellComplexes(hostTopology, adjacentTopologies) # Hook to Core
|
497
497
|
except:
|
498
498
|
error = True
|
499
499
|
elif Topology.IsInstance(topology, "Edge"):
|
500
500
|
if topologyType.lower() == "vertex":
|
501
501
|
try:
|
502
|
-
_ = topology.Vertices(hostTopology, adjacentTopologies)
|
502
|
+
_ = topology.Vertices(hostTopology, adjacentTopologies) # Hook to Core
|
503
503
|
except:
|
504
504
|
error = True
|
505
505
|
elif topologyType.lower() == "edge":
|
506
506
|
try:
|
507
|
-
_ = topology.AdjacentEdges(hostTopology, adjacentTopologies)
|
507
|
+
_ = topology.AdjacentEdges(hostTopology, adjacentTopologies) # Hook to Core
|
508
508
|
except:
|
509
509
|
error = True
|
510
510
|
elif topologyType.lower() == "wire":
|
511
511
|
try:
|
512
|
-
_ = topologic.EdgeUtility.AdjacentWires(topology, adjacentTopologies)
|
512
|
+
_ = topologic.EdgeUtility.AdjacentWires(topology, adjacentTopologies) # Hook to Core
|
513
513
|
except:
|
514
514
|
try:
|
515
|
-
_ = topology.Wires(hostTopology, adjacentTopologies)
|
515
|
+
_ = topology.Wires(hostTopology, adjacentTopologies) # Hook to Core
|
516
516
|
except:
|
517
517
|
error = True
|
518
518
|
elif topologyType.lower() == "face":
|
519
519
|
try:
|
520
|
-
_ = topologic.EdgeUtility.AdjacentFaces(topology, adjacentTopologies)
|
520
|
+
_ = topologic.EdgeUtility.AdjacentFaces(topology, adjacentTopologies) # Hook to Core
|
521
521
|
except:
|
522
522
|
try:
|
523
|
-
_ = topology.Faces(hostTopology, adjacentTopologies)
|
523
|
+
_ = topology.Faces(hostTopology, adjacentTopologies) # Hook to Core
|
524
524
|
except:
|
525
525
|
error = True
|
526
526
|
elif topologyType.lower() == "shell":
|
527
527
|
try:
|
528
|
-
_ = topologic.EdgeUtility.AdjacentShells(adjacentTopologies)
|
528
|
+
_ = topologic.EdgeUtility.AdjacentShells(adjacentTopologies) # Hook to Core
|
529
529
|
except:
|
530
530
|
try:
|
531
|
-
_ = topology.Shells(hostTopology, adjacentTopologies)
|
531
|
+
_ = topology.Shells(hostTopology, adjacentTopologies) # Hook to Core
|
532
532
|
except:
|
533
533
|
error = True
|
534
534
|
elif topologyType.lower() == "cell":
|
535
535
|
try:
|
536
|
-
_ = topologic.EdgeUtility.AdjacentCells(adjacentTopologies)
|
536
|
+
_ = topologic.EdgeUtility.AdjacentCells(adjacentTopologies) # Hook to Core
|
537
537
|
except:
|
538
538
|
try:
|
539
|
-
_ = topology.Cells(hostTopology, adjacentTopologies)
|
539
|
+
_ = topology.Cells(hostTopology, adjacentTopologies) # Hook to Core
|
540
540
|
except:
|
541
541
|
error = True
|
542
542
|
elif topologyType.lower() == "cellcomplex":
|
543
543
|
try:
|
544
|
-
_ = topologic.EdgeUtility.AdjacentCellComplexes(adjacentTopologies)
|
544
|
+
_ = topologic.EdgeUtility.AdjacentCellComplexes(adjacentTopologies) # Hook to Core
|
545
545
|
except:
|
546
546
|
try:
|
547
|
-
_ = topology.CellComplexes(hostTopology, adjacentTopologies)
|
547
|
+
_ = topology.CellComplexes(hostTopology, adjacentTopologies) # Hook to Core
|
548
548
|
except:
|
549
549
|
error = True
|
550
550
|
elif Topology.IsInstance(topology, "Wire"):
|
551
551
|
if topologyType.lower() == "vertex":
|
552
552
|
try:
|
553
|
-
_ = topologic.WireUtility.AdjacentVertices(topology, adjacentTopologies)
|
553
|
+
_ = topologic.WireUtility.AdjacentVertices(topology, adjacentTopologies) # Hook to Core
|
554
554
|
except:
|
555
555
|
try:
|
556
|
-
_ = topology.Vertices(hostTopology, adjacentTopologies)
|
556
|
+
_ = topology.Vertices(hostTopology, adjacentTopologies) # Hook to Core
|
557
557
|
except:
|
558
558
|
error = True
|
559
559
|
elif topologyType.lower() == "edge":
|
560
560
|
try:
|
561
|
-
_ = topologic.WireUtility.AdjacentEdges(topology, adjacentTopologies)
|
561
|
+
_ = topologic.WireUtility.AdjacentEdges(topology, adjacentTopologies) # Hook to Core
|
562
562
|
except:
|
563
563
|
try:
|
564
|
-
_ = topology.Edges(hostTopology, adjacentTopologies)
|
564
|
+
_ = topology.Edges(hostTopology, adjacentTopologies) # Hook to Core
|
565
565
|
except:
|
566
566
|
error = True
|
567
567
|
elif topologyType.lower() == "wire":
|
568
568
|
try:
|
569
|
-
_ = topologic.WireUtility.AdjacentWires(topology, adjacentTopologies)
|
569
|
+
_ = topologic.WireUtility.AdjacentWires(topology, adjacentTopologies) # Hook to Core
|
570
570
|
except:
|
571
571
|
try:
|
572
|
-
_ = topology.Wires(hostTopology, adjacentTopologies)
|
572
|
+
_ = topology.Wires(hostTopology, adjacentTopologies) # Hook to Core
|
573
573
|
except:
|
574
574
|
error = True
|
575
575
|
elif topologyType.lower() == "face":
|
576
576
|
try:
|
577
|
-
_ = topologic.WireUtility.AdjacentFaces(topology, adjacentTopologies)
|
577
|
+
_ = topologic.WireUtility.AdjacentFaces(topology, adjacentTopologies) # Hook to Core
|
578
578
|
except:
|
579
579
|
try:
|
580
|
-
_ = topology.Faces(hostTopology, adjacentTopologies)
|
580
|
+
_ = topology.Faces(hostTopology, adjacentTopologies) # Hook to Core
|
581
581
|
except:
|
582
582
|
error = True
|
583
583
|
elif topologyType.lower() == "shell":
|
584
584
|
try:
|
585
|
-
_ = topologic.WireUtility.AdjacentShells(adjacentTopologies)
|
585
|
+
_ = topologic.WireUtility.AdjacentShells(adjacentTopologies) # Hook to Core
|
586
586
|
except:
|
587
587
|
try:
|
588
|
-
_ = topology.Shells(hostTopology, adjacentTopologies)
|
588
|
+
_ = topology.Shells(hostTopology, adjacentTopologies) # Hook to Core
|
589
589
|
except:
|
590
590
|
error = True
|
591
591
|
elif topologyType.lower() == "cell":
|
592
592
|
try:
|
593
|
-
_ = topologic.WireUtility.AdjacentCells(adjacentTopologies)
|
593
|
+
_ = topologic.WireUtility.AdjacentCells(adjacentTopologies) # Hook to Core
|
594
594
|
except:
|
595
595
|
try:
|
596
|
-
_ = topology.Cells(hostTopology, adjacentTopologies)
|
596
|
+
_ = topology.Cells(hostTopology, adjacentTopologies) # Hook to Core
|
597
597
|
except:
|
598
598
|
error = True
|
599
599
|
elif topologyType.lower() == "cellcomplex":
|
600
600
|
try:
|
601
|
-
_ = topologic.WireUtility.AdjacentCellComplexes(adjacentTopologies)
|
601
|
+
_ = topologic.WireUtility.AdjacentCellComplexes(adjacentTopologies) # Hook to Core
|
602
602
|
except:
|
603
603
|
try:
|
604
|
-
_ = topology.CellComplexes(hostTopology, adjacentTopologies)
|
604
|
+
_ = topology.CellComplexes(hostTopology, adjacentTopologies) # Hook to Core
|
605
605
|
except:
|
606
606
|
error = True
|
607
607
|
elif Topology.IsInstance(topology, "Face"):
|
608
608
|
if topologyType.lower() == "vertex":
|
609
609
|
try:
|
610
|
-
_ = topologic.FaceUtility.AdjacentVertices(topology, adjacentTopologies)
|
610
|
+
_ = topologic.FaceUtility.AdjacentVertices(topology, adjacentTopologies) # Hook to Core
|
611
611
|
except:
|
612
612
|
try:
|
613
|
-
_ = topology.Vertices(hostTopology, adjacentTopologies)
|
613
|
+
_ = topology.Vertices(hostTopology, adjacentTopologies) # Hook to Core
|
614
614
|
except:
|
615
615
|
error = True
|
616
616
|
elif topologyType.lower() == "edge":
|
617
617
|
try:
|
618
|
-
_ = topologic.FaceUtility.AdjacentEdges(topology, adjacentTopologies)
|
618
|
+
_ = topologic.FaceUtility.AdjacentEdges(topology, adjacentTopologies) # Hook to Core
|
619
619
|
except:
|
620
620
|
try:
|
621
|
-
_ = topology.Edges(hostTopology, adjacentTopologies)
|
621
|
+
_ = topology.Edges(hostTopology, adjacentTopologies) # Hook to Core
|
622
622
|
except:
|
623
623
|
error = True
|
624
624
|
elif topologyType.lower() == "wire":
|
625
625
|
try:
|
626
|
-
_ = topologic.FaceUtility.AdjacentWires(topology, adjacentTopologies)
|
626
|
+
_ = topologic.FaceUtility.AdjacentWires(topology, adjacentTopologies) # Hook to Core
|
627
627
|
except:
|
628
628
|
try:
|
629
|
-
_ = topology.Wires(hostTopology, adjacentTopologies)
|
629
|
+
_ = topology.Wires(hostTopology, adjacentTopologies) # Hook to Core
|
630
630
|
except:
|
631
631
|
error = True
|
632
632
|
elif topologyType.lower() == "face":
|
633
|
-
_ = topology.AdjacentFaces(hostTopology, adjacentTopologies)
|
633
|
+
_ = topology.AdjacentFaces(hostTopology, adjacentTopologies) # Hook to Core
|
634
634
|
elif topologyType.lower() == "shell":
|
635
635
|
try:
|
636
|
-
_ = topologic.FaceUtility.AdjacentShells(adjacentTopologies)
|
636
|
+
_ = topologic.FaceUtility.AdjacentShells(adjacentTopologies) # Hook to Core
|
637
637
|
except:
|
638
638
|
try:
|
639
|
-
_ = topology.Shells(hostTopology, adjacentTopologies)
|
639
|
+
_ = topology.Shells(hostTopology, adjacentTopologies) # Hook to Core
|
640
640
|
except:
|
641
641
|
error = True
|
642
642
|
elif topologyType.lower() == "cell":
|
643
643
|
try:
|
644
|
-
_ = topologic.FaceUtility.AdjacentCells(adjacentTopologies)
|
644
|
+
_ = topologic.FaceUtility.AdjacentCells(adjacentTopologies) # Hook to Core
|
645
645
|
except:
|
646
646
|
try:
|
647
|
-
_ = topology.Cells(hostTopology, adjacentTopologies)
|
647
|
+
_ = topology.Cells(hostTopology, adjacentTopologies) # Hook to Core
|
648
648
|
except:
|
649
649
|
error = True
|
650
650
|
elif topologyType.lower() == "cellcomplex":
|
651
651
|
try:
|
652
|
-
_ = topologic.FaceUtility.AdjacentCellComplexes(adjacentTopologies)
|
652
|
+
_ = topologic.FaceUtility.AdjacentCellComplexes(adjacentTopologies) # Hook to Core
|
653
653
|
except:
|
654
654
|
try:
|
655
|
-
_ = topology.CellComplexes(hostTopology, adjacentTopologies)
|
655
|
+
_ = topology.CellComplexes(hostTopology, adjacentTopologies) # Hook to Core
|
656
656
|
except:
|
657
657
|
error = True
|
658
658
|
elif Topology.IsInstance(topology, "Shell"):
|
659
659
|
if topologyType.lower() == "vertex":
|
660
660
|
try:
|
661
|
-
_ = topologic.ShellUtility.AdjacentVertices(topology, adjacentTopologies)
|
661
|
+
_ = topologic.ShellUtility.AdjacentVertices(topology, adjacentTopologies) # Hook to Core
|
662
662
|
except:
|
663
663
|
try:
|
664
|
-
_ = topology.Vertices(hostTopology, adjacentTopologies)
|
664
|
+
_ = topology.Vertices(hostTopology, adjacentTopologies) # Hook to Core
|
665
665
|
except:
|
666
666
|
error = True
|
667
667
|
elif topologyType.lower() == "edge":
|
668
668
|
try:
|
669
|
-
_ = topologic.ShellUtility.AdjacentEdges(topology, adjacentTopologies)
|
669
|
+
_ = topologic.ShellUtility.AdjacentEdges(topology, adjacentTopologies) # Hook to Core
|
670
670
|
except:
|
671
671
|
try:
|
672
|
-
_ = topology.Edges(hostTopology, adjacentTopologies)
|
672
|
+
_ = topology.Edges(hostTopology, adjacentTopologies) # Hook to Core
|
673
673
|
except:
|
674
674
|
error = True
|
675
675
|
elif topologyType.lower() == "wire":
|
676
676
|
try:
|
677
|
-
_ = topologic.ShellUtility.AdjacentWires(topology, adjacentTopologies)
|
677
|
+
_ = topologic.ShellUtility.AdjacentWires(topology, adjacentTopologies) # Hook to Core
|
678
678
|
except:
|
679
679
|
try:
|
680
|
-
_ = topology.Wires(hostTopology, adjacentTopologies)
|
680
|
+
_ = topology.Wires(hostTopology, adjacentTopologies) # Hook to Core
|
681
681
|
except:
|
682
682
|
error = True
|
683
683
|
elif topologyType.lower() == "face":
|
684
684
|
try:
|
685
|
-
_ = topologic.ShellUtility.AdjacentFaces(topology, adjacentTopologies)
|
685
|
+
_ = topologic.ShellUtility.AdjacentFaces(topology, adjacentTopologies) # Hook to Core
|
686
686
|
except:
|
687
687
|
try:
|
688
|
-
_ = topology.Faces(hostTopology, adjacentTopologies)
|
688
|
+
_ = topology.Faces(hostTopology, adjacentTopologies) # Hook to Core
|
689
689
|
except:
|
690
690
|
error = True
|
691
691
|
elif topologyType.lower() == "shell":
|
692
692
|
try:
|
693
|
-
_ = topologic.ShellUtility.AdjacentShells(adjacentTopologies)
|
693
|
+
_ = topologic.ShellUtility.AdjacentShells(adjacentTopologies) # Hook to Core
|
694
694
|
except:
|
695
695
|
try:
|
696
|
-
_ = topology.Shells(hostTopology, adjacentTopologies)
|
696
|
+
_ = topology.Shells(hostTopology, adjacentTopologies) # Hook to Core
|
697
697
|
except:
|
698
698
|
error = True
|
699
699
|
elif topologyType.lower() == "cell":
|
700
700
|
try:
|
701
|
-
_ = topologic.ShellUtility.AdjacentCells(adjacentTopologies)
|
701
|
+
_ = topologic.ShellUtility.AdjacentCells(adjacentTopologies) # Hook to Core
|
702
702
|
except:
|
703
703
|
try:
|
704
|
-
_ = topology.Cells(hostTopology, adjacentTopologies)
|
704
|
+
_ = topology.Cells(hostTopology, adjacentTopologies) # Hook to Core
|
705
705
|
except:
|
706
706
|
error = True
|
707
707
|
elif topologyType.lower() == "cellcomplex":
|
708
708
|
try:
|
709
|
-
_ = topologic.ShellUtility.AdjacentCellComplexes(adjacentTopologies)
|
709
|
+
_ = topologic.ShellUtility.AdjacentCellComplexes(adjacentTopologies) # Hook to Core
|
710
710
|
except:
|
711
711
|
try:
|
712
|
-
_ = topology.CellComplexes(hostTopology, adjacentTopologies)
|
712
|
+
_ = topology.CellComplexes(hostTopology, adjacentTopologies) # Hook to Core
|
713
713
|
except:
|
714
714
|
error = True
|
715
715
|
elif Topology.IsInstance(topology, "Cell"):
|
716
716
|
if topologyType.lower() == "vertex":
|
717
717
|
try:
|
718
|
-
_ = topologic.CellUtility.AdjacentVertices(topology, adjacentTopologies)
|
718
|
+
_ = topologic.CellUtility.AdjacentVertices(topology, adjacentTopologies) # Hook to Core
|
719
719
|
except:
|
720
720
|
try:
|
721
|
-
_ = topology.Vertices(hostTopology, adjacentTopologies)
|
721
|
+
_ = topology.Vertices(hostTopology, adjacentTopologies) # Hook to Core
|
722
722
|
except:
|
723
723
|
error = True
|
724
724
|
elif topologyType.lower() == "edge":
|
725
725
|
try:
|
726
|
-
_ = topologic.CellUtility.AdjacentEdges(topology, adjacentTopologies)
|
726
|
+
_ = topologic.CellUtility.AdjacentEdges(topology, adjacentTopologies) # Hook to Core
|
727
727
|
except:
|
728
728
|
try:
|
729
|
-
_ = topology.Edges(hostTopology, adjacentTopologies)
|
729
|
+
_ = topology.Edges(hostTopology, adjacentTopologies) # Hook to Core
|
730
730
|
except:
|
731
731
|
error = True
|
732
732
|
elif topologyType.lower() == "wire":
|
733
733
|
try:
|
734
|
-
_ = topologic.CellUtility.AdjacentWires(topology, adjacentTopologies)
|
734
|
+
_ = topologic.CellUtility.AdjacentWires(topology, adjacentTopologies) # Hook to Core
|
735
735
|
except:
|
736
736
|
try:
|
737
|
-
_ = topology.Wires(hostTopology, adjacentTopologies)
|
737
|
+
_ = topology.Wires(hostTopology, adjacentTopologies) # Hook to Core
|
738
738
|
except:
|
739
739
|
error = True
|
740
740
|
elif topologyType.lower() == "face":
|
741
741
|
try:
|
742
|
-
_ = topologic.CellUtility.AdjacentFaces(topology, adjacentTopologies)
|
742
|
+
_ = topologic.CellUtility.AdjacentFaces(topology, adjacentTopologies) # Hook to Core
|
743
743
|
except:
|
744
744
|
try:
|
745
|
-
_ = topology.Faces(hostTopology, adjacentTopologies)
|
745
|
+
_ = topology.Faces(hostTopology, adjacentTopologies) # Hook to Core
|
746
746
|
except:
|
747
747
|
error = True
|
748
748
|
elif topologyType.lower() == "shell":
|
749
749
|
try:
|
750
|
-
_ = topologic.CellUtility.AdjacentShells(adjacentTopologies)
|
750
|
+
_ = topologic.CellUtility.AdjacentShells(adjacentTopologies) # Hook to Core
|
751
751
|
except:
|
752
752
|
try:
|
753
|
-
_ = topology.Shells(hostTopology, adjacentTopologies)
|
753
|
+
_ = topology.Shells(hostTopology, adjacentTopologies) # Hook to Core
|
754
754
|
except:
|
755
755
|
error = True
|
756
756
|
elif topologyType.lower() == "cell":
|
757
757
|
try:
|
758
|
-
_ = topology.AdjacentCells(hostTopology, adjacentTopologies)
|
758
|
+
_ = topology.AdjacentCells(hostTopology, adjacentTopologies) # Hook to Core
|
759
759
|
except:
|
760
760
|
try:
|
761
|
-
_ = topology.Cells(hostTopology, adjacentTopologies)
|
761
|
+
_ = topology.Cells(hostTopology, adjacentTopologies) # Hook to Core
|
762
762
|
except:
|
763
763
|
error = True
|
764
764
|
elif topologyType.lower() == "cellcomplex":
|
765
765
|
try:
|
766
|
-
_ = topologic.CellUtility.AdjacentCellComplexes(adjacentTopologies)
|
766
|
+
_ = topologic.CellUtility.AdjacentCellComplexes(adjacentTopologies) # Hook to Core
|
767
767
|
except:
|
768
768
|
try:
|
769
|
-
_ = topology.CellComplexes(hostTopology, adjacentTopologies)
|
769
|
+
_ = topology.CellComplexes(hostTopology, adjacentTopologies) # Hook to Core
|
770
770
|
except:
|
771
771
|
error = True
|
772
772
|
elif Topology.IsInstance(topology, "CellComplex"):
|
773
773
|
if topologyType.lower() == "vertex":
|
774
774
|
try:
|
775
|
-
_ = topology.Vertices(hostTopology, adjacentTopologies)
|
775
|
+
_ = topology.Vertices(hostTopology, adjacentTopologies) # Hook to Core
|
776
776
|
except:
|
777
777
|
error = True
|
778
778
|
elif topologyType.lower() == "edge":
|
779
779
|
try:
|
780
|
-
_ = topology.Edges(hostTopology, adjacentTopologies)
|
780
|
+
_ = topology.Edges(hostTopology, adjacentTopologies) # Hook to Core
|
781
781
|
except:
|
782
782
|
error = True
|
783
783
|
elif topologyType.lower() == "wire":
|
784
784
|
try:
|
785
|
-
_ = topology.Wires(hostTopology, adjacentTopologies)
|
785
|
+
_ = topology.Wires(hostTopology, adjacentTopologies) # Hook to Core
|
786
786
|
except:
|
787
787
|
error = True
|
788
788
|
elif topologyType.lower() == "face":
|
789
789
|
try:
|
790
|
-
_ = topology.Faces(hostTopology, adjacentTopologies)
|
790
|
+
_ = topology.Faces(hostTopology, adjacentTopologies) # Hook to Core
|
791
791
|
except:
|
792
792
|
error = True
|
793
793
|
elif topologyType.lower() == "shell":
|
794
794
|
try:
|
795
|
-
_ = topology.Shells(hostTopology, adjacentTopologies)
|
795
|
+
_ = topology.Shells(hostTopology, adjacentTopologies) # Hook to Core
|
796
796
|
except:
|
797
797
|
error = True
|
798
798
|
elif topologyType.lower() == "cell":
|
799
799
|
try:
|
800
|
-
_ = topology.Cells(hostTopology, adjacentTopologies)
|
800
|
+
_ = topology.Cells(hostTopology, adjacentTopologies) # Hook to Core
|
801
801
|
except:
|
802
802
|
error = True
|
803
803
|
elif topologyType.lower() == "cellcomplex":
|
@@ -1314,8 +1314,7 @@ class Topology():
|
|
1314
1314
|
from topologicpy.Dictionary import Dictionary
|
1315
1315
|
|
1316
1316
|
def bb(topology):
|
1317
|
-
vertices =
|
1318
|
-
_ = topology.Vertices(None, vertices)
|
1317
|
+
vertices = Topology.Vertices(topology)
|
1319
1318
|
x = []
|
1320
1319
|
y = []
|
1321
1320
|
z = []
|
@@ -4096,8 +4095,7 @@ class Topology():
|
|
4096
4095
|
|
4097
4096
|
def convexHull3D(item, tolerance, option):
|
4098
4097
|
if item:
|
4099
|
-
vertices =
|
4100
|
-
_ = item.Vertices(None, vertices)
|
4098
|
+
vertices = Topology.Vertices(item)
|
4101
4099
|
pointList = []
|
4102
4100
|
for v in vertices:
|
4103
4101
|
pointList.append(Vertex.Coordinates(v, mantissa=mantissa))
|
@@ -5060,7 +5058,6 @@ class Topology():
|
|
5060
5058
|
from topologicpy.Face import Face
|
5061
5059
|
from topologicpy.Cell import Cell
|
5062
5060
|
from topologicpy.Dictionary import Dictionary
|
5063
|
-
from topologicpy.Aperture import Aperture
|
5064
5061
|
|
5065
5062
|
def getUUID(topology, uuidKey="uuid"):
|
5066
5063
|
d = Topology.Dictionary(topology)
|
@@ -5086,8 +5083,7 @@ class Topology():
|
|
5086
5083
|
uuidOne = getUUID(topology, uuidKey=uuidKey)
|
5087
5084
|
returnDict['type'] = "Edge"
|
5088
5085
|
returnDict['uuid'] = uuidOne
|
5089
|
-
|
5090
|
-
returnDict['vertices'] = [getUUID(v, uuidKey=uuidKey) for v in Edge.Vertices(topology)]
|
5086
|
+
returnDict['vertices'] = [getUUID(v, uuidKey=uuidKey) for v in Topology.Vertices(topology)]
|
5091
5087
|
returnDict['dictionary'] = Dictionary.PythonDictionary(Topology.Dictionary(topology))
|
5092
5088
|
return returnDict
|
5093
5089
|
|
@@ -5711,7 +5707,7 @@ class Topology():
|
|
5711
5707
|
if Topology.Type(topology) == Topology.TypeID("Vertex"): #input is a vertex, just add it and process it
|
5712
5708
|
topVerts.append(topology)
|
5713
5709
|
else:
|
5714
|
-
|
5710
|
+
topVerts = Topology.Vertices(topology)
|
5715
5711
|
for aVertex in topVerts:
|
5716
5712
|
try:
|
5717
5713
|
vertices.index(Vertex.Coordinates(aVertex, mantissa=mantissa)) # Vertex already in list
|
@@ -6385,7 +6381,7 @@ class Topology():
|
|
6385
6381
|
return topology
|
6386
6382
|
|
6387
6383
|
def faces_on_same_plane(face1, face2, epsilon=1e-6):
|
6388
|
-
vertices =
|
6384
|
+
vertices = Topology.Vertices(face1)
|
6389
6385
|
distances = []
|
6390
6386
|
for v in vertices:
|
6391
6387
|
distances.append(Vertex.PerpendicularDistance(v, face=face2, mantissa=6))
|
@@ -7791,7 +7787,7 @@ class Topology():
|
|
7791
7787
|
try:
|
7792
7788
|
returnTopology = CellComplex.ByWires(topologies, tolerance)
|
7793
7789
|
try:
|
7794
|
-
returnTopology =
|
7790
|
+
returnTopology = CellComplex.ExternalBoundary(returnTopology)
|
7795
7791
|
except:
|
7796
7792
|
pass
|
7797
7793
|
except:
|
@@ -8189,23 +8185,23 @@ class Topology():
|
|
8189
8185
|
return [topology]
|
8190
8186
|
subTopologies = []
|
8191
8187
|
if subTopologyType.lower() == "vertex":
|
8192
|
-
_ = topology.Vertices(None, subTopologies)
|
8188
|
+
_ = topology.Vertices(None, subTopologies) # Hook to Core
|
8193
8189
|
elif subTopologyType.lower() == "edge":
|
8194
|
-
_ = topology.Edges(None, subTopologies)
|
8190
|
+
_ = topology.Edges(None, subTopologies) # Hook to Core
|
8195
8191
|
elif subTopologyType.lower() == "wire":
|
8196
|
-
_ = topology.Wires(None, subTopologies)
|
8192
|
+
_ = topology.Wires(None, subTopologies) # Hook to Core
|
8197
8193
|
elif subTopologyType.lower() == "face":
|
8198
|
-
_ = topology.Faces(None, subTopologies)
|
8194
|
+
_ = topology.Faces(None, subTopologies) # Hook to Core
|
8199
8195
|
elif subTopologyType.lower() == "shell":
|
8200
|
-
_ = topology.Shells(None, subTopologies)
|
8196
|
+
_ = topology.Shells(None, subTopologies) # Hook to Core
|
8201
8197
|
elif subTopologyType.lower() == "cell":
|
8202
|
-
_ = topology.Cells(None, subTopologies)
|
8198
|
+
_ = topology.Cells(None, subTopologies) # Hook to Core
|
8203
8199
|
elif subTopologyType.lower() == "cellcomplex":
|
8204
|
-
_ = topology.CellComplexes(None, subTopologies)
|
8200
|
+
_ = topology.CellComplexes(None, subTopologies) # Hook to Core
|
8205
8201
|
elif subTopologyType.lower() == "cluster":
|
8206
|
-
_ = topology.Clusters(None, subTopologies)
|
8202
|
+
_ = topology.Clusters(None, subTopologies) # Hook to Core
|
8207
8203
|
elif subTopologyType.lower() == "aperture":
|
8208
|
-
|
8204
|
+
_ = topology.Apertures(None, subTopologies) # Hook to Core
|
8209
8205
|
if not subTopologies:
|
8210
8206
|
return [] # Make sure to return an empty list instead of None
|
8211
8207
|
return subTopologies
|
@@ -8427,7 +8423,7 @@ class Topology():
|
|
8427
8423
|
if Topology.Type(topology) == Topology.TypeID("Vertex"):
|
8428
8424
|
sinkVertices.append(topology)
|
8429
8425
|
elif hidimSink >= Topology.TypeID("Vertex"):
|
8430
|
-
|
8426
|
+
sinkVertices = Topology.Vertices(topology)
|
8431
8427
|
_ = Topology.TransferDictionaries(selectors, sinkVertices, tolerance=tolerance, numWorkers=numWorkers)
|
8432
8428
|
if tranEdges == True:
|
8433
8429
|
sinkEdges = []
|
topologicpy/Vertex.py
CHANGED
@@ -644,8 +644,7 @@ class Vertex():
|
|
644
644
|
from topologicpy.Topology import Topology
|
645
645
|
|
646
646
|
def boundingBox(cell):
|
647
|
-
vertices =
|
648
|
-
_ = cell.Vertices(None, vertices)
|
647
|
+
vertices = Topology.Vertices(cell)
|
649
648
|
x = []
|
650
649
|
y = []
|
651
650
|
z = []
|
@@ -1302,8 +1301,7 @@ class Vertex():
|
|
1302
1301
|
|
1303
1302
|
def kdtree(topology):
|
1304
1303
|
assert Topology.IsInstance(topology, "Topology"), "Vertex.NearestVertex: The input is not a Topology."
|
1305
|
-
vertices =
|
1306
|
-
_ = topology.Vertices(None, vertices)
|
1304
|
+
vertices = Topology.Vertices(topology)
|
1307
1305
|
assert (len(vertices) > 0), "Vertex.NearestVertex: Could not find any vertices in the input Topology"
|
1308
1306
|
|
1309
1307
|
"""Construct a k-d tree from an iterable of vertices.
|
@@ -1378,8 +1376,7 @@ class Vertex():
|
|
1378
1376
|
tree = kdtree(topology)
|
1379
1377
|
return find_nearest_neighbor(tree=tree, vertex=vertex)
|
1380
1378
|
else:
|
1381
|
-
vertices =
|
1382
|
-
_ = topology.Vertices(None, vertices)
|
1379
|
+
vertices = Topology.Vertices(topology)
|
1383
1380
|
distances = []
|
1384
1381
|
indices = []
|
1385
1382
|
for i in range(len(vertices)):
|