OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
topo.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 Capgemini Engineering Research and Development.
2//
3// This file is part of OCCT-Light software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Affero General Public License version 3 as published
7// by the Free Software Foundation, with an option to use any later version.
8// Consult the file LICENSE_AGPL_30.txt included in OCCT-Light distribution
9// for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of a commercial
12// license or contractual agreement.
13//
14// SPDX-License-Identifier: AGPL-3.0-or-later
15
24#ifndef OCCTL_HPP_TOPO_HPP
25#define OCCTL_HPP_TOPO_HPP
26
27#include <occtl/occtl_topo.h>
28
29#include <occtl-hpp/core.hpp>
30#include <occtl-hpp/geom.hpp>
31#include <occtl-hpp/uid.hpp>
32
34
35#include <cstdint>
36#include <exception>
37#include <string>
38#include <tuple>
39#include <type_traits>
40#include <utility>
41#include <vector>
42
43namespace occtl
44{
45
51class NodeId
52{
53public:
55 explicit NodeId(const ::occtl_node_id_t theId) noexcept
56 : myId(theId)
57 {
58 }
59
61 static NodeId invalid() noexcept { return NodeId(OCCTL_NODE_ID_INVALID); }
62
64 ::occtl_node_id_t get() const noexcept { return myId; }
65
66 bool is_valid() const noexcept
67 {
68 return myId.bits != 0;
69 }
70
71 bool operator==(const NodeId& theOther) const noexcept
72 {
73 return myId.bits == theOther.myId.bits;
74 }
75
76 bool operator!=(const NodeId& theOther) const noexcept
77 {
78 return myId.bits != theOther.myId.bits;
79 }
80
81private:
83};
84
89class RefId
90{
91public:
93 explicit RefId(const ::occtl_ref_id_t theId) noexcept
94 : myId(theId)
95 {
96 }
97
99 static RefId invalid() noexcept { return RefId(OCCTL_REF_ID_INVALID); }
100
102 ::occtl_ref_id_t get() const noexcept { return myId; }
103
104 bool is_valid() const noexcept
105 {
106 return myId.bits != 0;
107 }
108
109 bool operator==(const RefId& theOther) const noexcept
110 {
111 return myId.bits == theOther.myId.bits;
112 }
113
114 bool operator!=(const RefId& theOther) const noexcept
115 {
116 return myId.bits != theOther.myId.bits;
117 }
118
119private:
120 ::occtl_ref_id_t myId;
121};
122
126class RepId
127{
128public:
130 explicit RepId(const ::occtl_rep_id_t theId) noexcept
131 : myId(theId)
132 {
133 }
134
136 static RepId invalid() noexcept { return RepId(OCCTL_REP_ID_INVALID); }
137
139 ::occtl_rep_id_t get() const noexcept { return myId; }
140
141 bool is_valid() const noexcept
142 {
143 return myId.bits != 0;
144 }
145
146 bool operator==(const RepId& theOther) const noexcept
147 {
148 return myId.bits == theOther.myId.bits;
149 }
150
151 bool operator!=(const RepId& theOther) const noexcept
152 {
153 return myId.bits != theOther.myId.bits;
154 }
155
156private:
157 ::occtl_rep_id_t myId;
158};
159
162{
163public:
165 explicit JointId(const ::occtl_joint_id_t theId) noexcept
166 : myId(theId)
167 {
168 }
169
171 static JointId invalid() noexcept { return JointId(OCCTL_JOINT_ID_INVALID); }
172
174 ::occtl_joint_id_t get() const noexcept { return myId; }
175
176 bool is_valid() const noexcept
177 {
178 return myId.bits != 0;
179 }
180
181 bool operator==(const JointId& theOther) const noexcept
182 {
183 return myId.bits == theOther.myId.bits;
184 }
185
186 bool operator!=(const JointId& theOther) const noexcept
187 {
188 return myId.bits != theOther.myId.bits;
189 }
190
191private:
193};
194
197
200
203
206
209
212
215
218
221
224
227
230
233
236
239
242
245
248
251
254
257
260
263
266
269{
270 NodeId visible_sharp = NodeId::invalid();
271 NodeId visible_smooth = NodeId::invalid();
272 NodeId visible_seam = NodeId::invalid();
273 NodeId visible_outline = NodeId::invalid();
274 NodeId hidden_sharp = NodeId::invalid();
275 NodeId hidden_smooth = NodeId::invalid();
276 NodeId hidden_seam = NodeId::invalid();
277 NodeId hidden_outline = NodeId::invalid();
278};
279
282{
283 double length_unit_to_meter = 1.0;
284 std::string name = "m";
285};
286
289{
290 std::string name;
291 int32_t has_density = 0;
292 double density = 0.0;
293 int32_t has_diffuse_color = 0;
294 ::occtl_color_rgba_t diffuse_color = {1.0f, 1.0f, 1.0f, 1.0f};
295 ::occtl_uid_t metadata_uid = OCCTL_UID_INVALID;
296};
297
300
303
306
309
311using TopoSplitKeep = ::occtl_topo_split_keep_t;
312
315
318
321
324
327
330
333
336
339
342
345
347class Graph;
348
351{
352public:
354 {
355 public:
356 using iterator_category = std::input_iterator_tag;
357 using value_type = NodeId;
358 using difference_type = std::ptrdiff_t;
359 using pointer = const NodeId*;
360 using reference = const NodeId&;
361
362 iterator() noexcept
363 : myIter(nullptr),
364 myDone(true)
365 {
366 }
367
368 explicit iterator(::occtl_node_iter_t* theIter)
369 : myIter(theIter),
370 myDone(false)
371 {
372 advance();
373 }
374
375 iterator(const iterator&) = delete;
376 iterator& operator=(const iterator&) = delete;
377 iterator(iterator&&) = default;
378 iterator& operator=(iterator&&) = default;
379
381 const NodeId& operator*() const noexcept { return myCurrent; }
382
384 const NodeId* operator->() const noexcept { return &myCurrent; }
385
388 {
389 advance();
390 return *this;
391 }
392
394 void operator++(int) { advance(); }
395
397 bool operator==(const iterator& theOther) const noexcept
398 {
399 if (myDone && theOther.myDone)
400 {
401 return true;
402 }
403 return myIter == theOther.myIter && myDone == theOther.myDone;
404 }
405
407 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
408
409 private:
411 void advance()
412 {
413 if (myDone || myIter == nullptr)
414 {
415 myDone = true;
416 return;
417 }
419 const ::occtl_status_t aStatus = ::occtl_node_iter_next(myIter, &anId);
420 if (aStatus == OCCTL_OK)
421 {
422 myCurrent = NodeId(anId);
423 }
424 else
425 {
426 if (aStatus != OCCTL_NOT_FOUND)
427 {
428 ::occtl::check(aStatus);
429 }
430 myDone = true;
431 }
432 }
433
434 ::occtl_node_iter_t* myIter;
435 NodeId myCurrent{::occtl_node_id_t{0}};
436 bool myDone;
437 };
438
439 NodeIter() noexcept = default;
440
441 explicit NodeIter(::occtl_node_iter_t* theIter) noexcept
442 : myIter(theIter)
443 {
444 }
445
446 NodeIter(const NodeIter&) = delete;
447 NodeIter& operator=(const NodeIter&) = delete;
448
450 NodeIter(NodeIter&& theOther) noexcept
451 : myIter(theOther.myIter)
452 {
453 theOther.myIter = nullptr;
454 }
455
457 NodeIter& operator=(NodeIter&& theOther) noexcept
458 {
459 if (this != &theOther)
460 {
462 myIter = theOther.myIter;
463 theOther.myIter = nullptr;
464 }
465 return *this;
466 }
467
468 ~NodeIter() { ::occtl_node_iter_free(myIter); }
469
471 iterator begin() noexcept { return iterator(myIter); }
472
474 iterator end() noexcept { return iterator(); }
475
476private:
477 ::occtl_node_iter_t* myIter = nullptr;
478};
479
482{
483public:
485 {
486 public:
487 using iterator_category = std::input_iterator_tag;
488 using value_type = NodeId;
489 using difference_type = std::ptrdiff_t;
490 using pointer = const NodeId*;
491 using reference = const NodeId&;
492
493 iterator() noexcept
494 : myIter(nullptr),
495 myDone(true)
496 {
497 }
498
499 explicit iterator(::occtl_select_iter_t* theIter)
500 : myIter(theIter),
501 myDone(false)
502 {
503 advance();
504 }
505
506 iterator(const iterator&) = delete;
507 iterator& operator=(const iterator&) = delete;
508 iterator(iterator&&) = default;
509 iterator& operator=(iterator&&) = default;
510
511 const NodeId& operator*() const noexcept { return myCurrent; }
512
513 const NodeId* operator->() const noexcept { return &myCurrent; }
514
515 iterator& operator++()
516 {
517 advance();
518 return *this;
519 }
520
521 void operator++(int) { advance(); }
522
523 bool operator==(const iterator& theOther) const noexcept
524 {
525 if (myDone && theOther.myDone)
526 {
527 return true;
528 }
529 return myIter == theOther.myIter && myDone == theOther.myDone;
530 }
531
532 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
533
534 private:
535 void advance()
536 {
537 if (myDone || myIter == nullptr)
538 {
539 myDone = true;
540 return;
541 }
542 ::occtl_node_id_t anId{};
543 const ::occtl_status_t aStatus = ::occtl_select_iter_next(myIter, &anId);
544 if (aStatus == OCCTL_OK)
545 {
546 myCurrent = NodeId(anId);
547 }
548 else
549 {
550 if (aStatus != OCCTL_NOT_FOUND)
551 {
552 ::occtl::check(aStatus);
553 }
554 myDone = true;
555 }
556 }
557
558 ::occtl_select_iter_t* myIter;
559 NodeId myCurrent{::occtl_node_id_t{0}};
560 bool myDone;
561 };
562
563 SelectIter() noexcept = default;
564
565 explicit SelectIter(::occtl_select_iter_t* theIter) noexcept
566 : myIter(theIter)
567 {
568 }
569
570 SelectIter(const SelectIter&) = delete;
571 SelectIter& operator=(const SelectIter&) = delete;
572
573 SelectIter(SelectIter&& theOther) noexcept
574 : myIter(theOther.myIter)
575 {
576 theOther.myIter = nullptr;
577 }
578
579 SelectIter& operator=(SelectIter&& theOther) noexcept
580 {
581 if (this != &theOther)
582 {
584 myIter = theOther.myIter;
585 theOther.myIter = nullptr;
586 }
587 return *this;
588 }
589
590 ~SelectIter() { ::occtl_select_iter_free(myIter); }
591
592 iterator begin() noexcept { return iterator(myIter); }
593
594 iterator end() noexcept { return iterator(); }
595
596private:
597 ::occtl_select_iter_t* myIter = nullptr;
598};
599
602{
603public:
605 {
606 public:
607 using iterator_category = std::input_iterator_tag;
609 using difference_type = std::ptrdiff_t;
610 using pointer = const SelectGroupView*;
611 using reference = const SelectGroupView&;
612
613 iterator() noexcept
614 : myIter(nullptr),
615 myDone(true)
616 {
617 }
618
619 explicit iterator(::occtl_select_group_iter_t* theIter)
620 : myIter(theIter),
621 myDone(false)
622 {
623 advance();
624 }
625
626 iterator(const iterator&) = delete;
627 iterator& operator=(const iterator&) = delete;
628 iterator(iterator&&) = default;
629 iterator& operator=(iterator&&) = default;
630
631 const SelectGroupView& operator*() const noexcept { return myCurrent; }
632
633 const SelectGroupView* operator->() const noexcept { return &myCurrent; }
634
635 iterator& operator++()
636 {
637 advance();
638 return *this;
639 }
640
641 void operator++(int) { advance(); }
642
643 bool operator==(const iterator& theOther) const noexcept
644 {
645 if (myDone && theOther.myDone)
646 {
647 return true;
648 }
649 return myIter == theOther.myIter && myDone == theOther.myDone;
650 }
651
652 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
653
654 private:
655 void advance()
656 {
657 if (myDone || myIter == nullptr)
658 {
659 myDone = true;
660 return;
661 }
662 ::occtl_select_group_view_t aView = OCCTL_SELECT_GROUP_VIEW_INIT;
663 const ::occtl_status_t aStatus = ::occtl_select_group_iter_next(myIter, &aView);
664 if (aStatus == OCCTL_OK)
665 {
666 myCurrent = aView;
667 }
668 else
669 {
670 if (aStatus != OCCTL_NOT_FOUND)
671 {
672 ::occtl::check(aStatus);
673 }
674 myDone = true;
675 }
676 }
677
679 SelectGroupView myCurrent = OCCTL_SELECT_GROUP_VIEW_INIT;
680 bool myDone;
681 };
682
683 SelectGroupIter() noexcept = default;
684
685 explicit SelectGroupIter(::occtl_select_group_iter_t* theIter) noexcept
686 : myIter(theIter)
687 {
688 }
689
690 SelectGroupIter(const SelectGroupIter&) = delete;
691 SelectGroupIter& operator=(const SelectGroupIter&) = delete;
692
693 SelectGroupIter(SelectGroupIter&& theOther) noexcept
694 : myIter(theOther.myIter)
695 {
696 theOther.myIter = nullptr;
697 }
698
699 SelectGroupIter& operator=(SelectGroupIter&& theOther) noexcept
700 {
701 if (this != &theOther)
702 {
704 myIter = theOther.myIter;
705 theOther.myIter = nullptr;
706 }
707 return *this;
708 }
709
710 ~SelectGroupIter() { ::occtl_select_group_iter_free(myIter); }
711
712 iterator begin() noexcept { return iterator(myIter); }
713
714 iterator end() noexcept { return iterator(); }
715
716private:
717 ::occtl_select_group_iter_t* myIter = nullptr;
718};
719
722{
723public:
725 {
726 public:
727 using iterator_category = std::input_iterator_tag;
728 using value_type = AxisHit;
729 using difference_type = std::ptrdiff_t;
730 using pointer = const AxisHit*;
731 using reference = const AxisHit&;
732
733 iterator() noexcept
734 : myIter(nullptr),
735 myDone(true)
736 {
737 }
738
739 explicit iterator(::occtl_topo_axis_hit_iter_t* theIter)
740 : myIter(theIter),
741 myDone(false)
742 {
743 advance();
744 }
745
746 iterator(const iterator&) = delete;
747 iterator& operator=(const iterator&) = delete;
748 iterator(iterator&&) = default;
749 iterator& operator=(iterator&&) = default;
750
751 const AxisHit& operator*() const noexcept { return myCurrent; }
752
753 const AxisHit* operator->() const noexcept { return &myCurrent; }
754
755 iterator& operator++()
756 {
757 advance();
758 return *this;
759 }
760
761 void operator++(int) { advance(); }
762
763 bool operator==(const iterator& theOther) const noexcept
764 {
765 if (myDone && theOther.myDone)
766 {
767 return true;
768 }
769 return myIter == theOther.myIter && myDone == theOther.myDone;
770 }
771
772 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
773
774 private:
775 void advance()
776 {
777 if (myDone || myIter == nullptr)
778 {
779 myDone = true;
780 return;
781 }
783 const ::occtl_status_t aStatus = ::occtl_topo_axis_hit_iter_next(myIter, &aHit);
784 if (aStatus == OCCTL_OK)
785 {
786 myCurrent = aHit;
787 }
788 else
789 {
790 if (aStatus != OCCTL_NOT_FOUND)
791 {
792 ::occtl::check(aStatus);
793 }
794 myDone = true;
795 }
796 }
797
799 AxisHit myCurrent{};
800 bool myDone;
801 };
802
803 AxisHitIter() noexcept = default;
804
805 explicit AxisHitIter(::occtl_topo_axis_hit_iter_t* theIter) noexcept
806 : myIter(theIter)
807 {
808 }
809
810 AxisHitIter(const AxisHitIter&) = delete;
811 AxisHitIter& operator=(const AxisHitIter&) = delete;
812
813 AxisHitIter(AxisHitIter&& theOther) noexcept
814 : myIter(theOther.myIter)
815 {
816 theOther.myIter = nullptr;
817 }
818
819 AxisHitIter& operator=(AxisHitIter&& theOther) noexcept
820 {
821 if (this != &theOther)
822 {
824 myIter = theOther.myIter;
825 theOther.myIter = nullptr;
826 }
827 return *this;
828 }
829
830 ~AxisHitIter() { ::occtl_topo_axis_hit_iter_free(myIter); }
831
832 iterator begin() noexcept { return iterator(myIter); }
833
834 iterator end() noexcept { return iterator(); }
835
836private:
837 ::occtl_topo_axis_hit_iter_t* myIter = nullptr;
838};
839
842{
843public:
845 {
846 public:
847 using iterator_category = std::input_iterator_tag;
848 using value_type = TouchHit;
849 using difference_type = std::ptrdiff_t;
850 using pointer = const TouchHit*;
851 using reference = const TouchHit&;
852
853 iterator() noexcept
854 : myIter(nullptr),
855 myDone(true)
856 {
857 }
858
859 explicit iterator(::occtl_topo_touch_iter_t* theIter)
860 : myIter(theIter),
861 myDone(false)
862 {
863 advance();
864 }
865
866 iterator(const iterator&) = delete;
867 iterator& operator=(const iterator&) = delete;
868 iterator(iterator&&) = default;
869 iterator& operator=(iterator&&) = default;
870
871 const TouchHit& operator*() const noexcept { return myCurrent; }
872
873 const TouchHit* operator->() const noexcept { return &myCurrent; }
874
875 iterator& operator++()
876 {
877 advance();
878 return *this;
879 }
880
881 void operator++(int) { advance(); }
882
883 bool operator==(const iterator& theOther) const noexcept
884 {
885 if (myDone && theOther.myDone)
886 {
887 return true;
888 }
889 return myIter == theOther.myIter && myDone == theOther.myDone;
890 }
891
892 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
893
894 private:
895 void advance()
896 {
897 if (myDone || myIter == nullptr)
898 {
899 myDone = true;
900 return;
901 }
903 const ::occtl_status_t aStatus = ::occtl_topo_touch_iter_next(myIter, &aHit);
904 if (aStatus == OCCTL_OK)
905 {
906 myCurrent = aHit;
907 }
908 else
909 {
910 if (aStatus != OCCTL_NOT_FOUND)
911 {
912 ::occtl::check(aStatus);
913 }
914 myDone = true;
915 }
916 }
917
919 TouchHit myCurrent{};
920 bool myDone;
921 };
922
923 TouchIter() noexcept = default;
924
925 explicit TouchIter(::occtl_topo_touch_iter_t* theIter) noexcept
926 : myIter(theIter)
927 {
928 }
929
930 TouchIter(const TouchIter&) = delete;
931 TouchIter& operator=(const TouchIter&) = delete;
932
933 TouchIter(TouchIter&& theOther) noexcept
934 : myIter(theOther.myIter)
935 {
936 theOther.myIter = nullptr;
937 }
938
939 TouchIter& operator=(TouchIter&& theOther) noexcept
940 {
941 if (this != &theOther)
942 {
944 myIter = theOther.myIter;
945 theOther.myIter = nullptr;
946 }
947 return *this;
948 }
949
950 ~TouchIter() { ::occtl_topo_touch_iter_free(myIter); }
951
952 iterator begin() noexcept { return iterator(myIter); }
953
954 iterator end() noexcept { return iterator(); }
955
956private:
957 ::occtl_topo_touch_iter_t* myIter = nullptr;
958};
959
962{
963public:
965 {
966 public:
967 using iterator_category = std::input_iterator_tag;
968 using value_type = NodeId;
969 using difference_type = std::ptrdiff_t;
970 using pointer = const NodeId*;
971 using reference = const NodeId&;
972
973 iterator() noexcept
974 : myIter(nullptr),
975 myDone(true)
976 {
977 }
978
980 : myIter(theIter),
981 myDone(false)
982 {
983 advance();
984 }
985
986 iterator(const iterator&) = delete;
987 iterator& operator=(const iterator&) = delete;
988 iterator(iterator&&) = default;
989 iterator& operator=(iterator&&) = default;
990
991 const NodeId& operator*() const noexcept { return myCurrent; }
992
993 const NodeId* operator->() const noexcept { return &myCurrent; }
994
995 iterator& operator++()
996 {
997 advance();
998 return *this;
999 }
1000
1001 void operator++(int) { advance(); }
1002
1003 bool operator==(const iterator& theOther) const noexcept
1004 {
1005 if (myDone && theOther.myDone)
1006 {
1007 return true;
1008 }
1009 return myIter == theOther.myIter && myDone == theOther.myDone;
1010 }
1011
1012 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
1013
1014 private:
1015 void advance()
1016 {
1017 if (myDone || myIter == nullptr)
1018 {
1019 myDone = true;
1020 return;
1021 }
1023 const ::occtl_status_t aStatus = ::occtl_topo_intersection_iter_next(myIter, &aNode);
1024 if (aStatus == OCCTL_OK)
1025 {
1026 myCurrent = NodeId(aNode);
1027 }
1028 else
1029 {
1030 if (aStatus != OCCTL_NOT_FOUND)
1031 {
1032 ::occtl::check(aStatus);
1033 }
1034 myDone = true;
1035 }
1036 }
1037
1039 NodeId myCurrent = NodeId::invalid();
1040 bool myDone;
1041 };
1042
1043 IntersectionIter() noexcept = default;
1044
1045 explicit IntersectionIter(::occtl_topo_intersection_iter_t* theIter) noexcept
1046 : myIter(theIter)
1047 {
1048 }
1049
1050 IntersectionIter(const IntersectionIter&) = delete;
1051 IntersectionIter& operator=(const IntersectionIter&) = delete;
1052
1053 IntersectionIter(IntersectionIter&& theOther) noexcept
1054 : myIter(theOther.myIter)
1055 {
1056 theOther.myIter = nullptr;
1057 }
1058
1059 IntersectionIter& operator=(IntersectionIter&& theOther) noexcept
1060 {
1061 if (this != &theOther)
1062 {
1064 myIter = theOther.myIter;
1065 theOther.myIter = nullptr;
1066 }
1067 return *this;
1068 }
1069
1070 ~IntersectionIter() { ::occtl_topo_intersection_iter_free(myIter); }
1071
1072 iterator begin() noexcept { return iterator(myIter); }
1073
1074 iterator end() noexcept { return iterator(); }
1075
1076private:
1077 ::occtl_topo_intersection_iter_t* myIter = nullptr;
1078};
1079
1087{
1088public:
1089 Batch(const Batch&) = delete;
1090 Batch& operator=(const Batch&) = delete;
1091
1093 Batch(Batch&& theOther) noexcept
1094 : myBatch(theOther.myBatch),
1095 myGraph(theOther.myGraph)
1096 {
1097 theOther.myBatch = nullptr;
1098 theOther.myGraph = nullptr;
1099 }
1100
1102 Batch& operator=(Batch&& theOther) noexcept
1103 {
1104 if (this != &theOther)
1105 {
1106 silentAbort();
1107 myBatch = theOther.myBatch;
1108 theOther.myBatch = nullptr;
1109 myGraph = theOther.myGraph;
1110 theOther.myGraph = nullptr;
1111 }
1112 return *this;
1113 }
1114
1117 ~Batch() noexcept { silentAbort(); }
1118
1120 ::occtl_graph_t* graph() noexcept { return myGraph; }
1121
1125 void commit()
1126 {
1127 if (myBatch != nullptr)
1128 {
1129 check(::occtl_batch_commit(myBatch));
1130 myBatch = nullptr;
1131 }
1132 }
1133
1136 void abort()
1137 {
1138 if (myBatch != nullptr)
1139 {
1140 check(::occtl_batch_abort(myBatch));
1141 myBatch = nullptr;
1142 }
1143 }
1144
1145private:
1146 friend class Graph;
1147
1149 explicit Batch(::occtl_batch_t* const theBatch, ::occtl_graph_t* const theGraph) noexcept
1150 : myBatch(theBatch),
1151 myGraph(theGraph)
1152 {
1153 }
1154
1159 void silentAbort() noexcept
1160 {
1161 if (myBatch != nullptr)
1162 {
1163 ::occtl_batch_abort(myBatch);
1164 myBatch = nullptr;
1165 }
1166 }
1167
1168 ::occtl_batch_t* myBatch = nullptr;
1169 ::occtl_graph_t* myGraph = nullptr;
1170};
1171
1177{
1178public:
1180 struct Item
1181 {
1182 NodeId node{::occtl_node_id_t{0}};
1183 Transform transform{::occtl_transform_t{}};
1185 };
1186
1188 {
1189 public:
1190 using iterator_category = std::input_iterator_tag;
1191 using value_type = Item;
1192 using difference_type = std::ptrdiff_t;
1193 using pointer = const Item*;
1194 using reference = const Item&;
1195
1196 iterator() noexcept
1197 : myIter(nullptr),
1198 myDone(true)
1199 {
1200 }
1201
1202 explicit iterator(::occtl_topo_explorer_iter_t* theIter)
1203 : myIter(theIter),
1204 myDone(false)
1205 {
1206 advance();
1207 }
1208
1209 iterator(const iterator&) = delete;
1210 iterator& operator=(const iterator&) = delete;
1211 iterator(iterator&&) = default;
1212 iterator& operator=(iterator&&) = default;
1213
1214 const Item& operator*() const noexcept { return myCurrent; }
1215
1216 const Item* operator->() const noexcept { return &myCurrent; }
1217
1218 iterator& operator++()
1219 {
1220 advance();
1221 return *this;
1222 }
1223
1224 void operator++(int) { advance(); }
1225
1226 bool operator==(const iterator& theOther) const noexcept
1227 {
1228 if (myDone && theOther.myDone)
1229 {
1230 return true;
1231 }
1232 return myIter == theOther.myIter && myDone == theOther.myDone;
1233 }
1234
1235 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
1236
1237 private:
1238 void advance()
1239 {
1240 if (myDone || myIter == nullptr)
1241 {
1242 myDone = true;
1243 return;
1244 }
1245 ::occtl_node_id_t anId{};
1246 ::occtl_transform_t aTrsf{};
1248 const ::occtl_status_t aStatus =
1249 ::occtl_topo_explorer_iter_next(myIter, &anId, &aTrsf, &aOri);
1250 if (aStatus == OCCTL_OK)
1251 {
1252 myCurrent = Item{NodeId(anId), Transform(aTrsf), occtl::Orientation{aOri}};
1253 }
1254 else
1255 {
1256 if (aStatus != OCCTL_NOT_FOUND)
1257 {
1258 ::occtl::check(aStatus);
1259 }
1260 myDone = true;
1261 }
1262 }
1263
1265 Item myCurrent{};
1266 bool myDone;
1267 };
1268
1269 ExplorerIter() noexcept = default;
1270
1271 explicit ExplorerIter(::occtl_topo_explorer_iter_t* theIter) noexcept
1272 : myIter(theIter)
1273 {
1274 }
1275
1276 ExplorerIter(const ExplorerIter&) = delete;
1277 ExplorerIter& operator=(const ExplorerIter&) = delete;
1278
1279 ExplorerIter(ExplorerIter&& theOther) noexcept
1280 : myIter(theOther.myIter)
1281 {
1282 theOther.myIter = nullptr;
1283 }
1284
1285 ExplorerIter& operator=(ExplorerIter&& theOther) noexcept
1286 {
1287 if (this != &theOther)
1288 {
1290 myIter = theOther.myIter;
1291 theOther.myIter = nullptr;
1292 }
1293 return *this;
1294 }
1295
1296 ~ExplorerIter() { ::occtl_topo_explorer_iter_free(myIter); }
1297
1298 iterator begin() noexcept { return iterator(myIter); }
1299
1300 iterator end() noexcept { return iterator(); }
1301
1302private:
1303 ::occtl_topo_explorer_iter_t* myIter = nullptr;
1304};
1305
1311{
1312public:
1313 struct Item
1314 {
1315 NodeId node{::occtl_node_id_t{0}};
1317 };
1318
1320 {
1321 public:
1322 using iterator_category = std::input_iterator_tag;
1323 using value_type = Item;
1324 using difference_type = std::ptrdiff_t;
1325 using pointer = const Item*;
1326 using reference = const Item&;
1327
1328 iterator() noexcept
1329 : myIter(nullptr),
1330 myDone(true)
1331 {
1332 }
1333
1334 explicit iterator(::occtl_topo_related_iter_t* theIter)
1335 : myIter(theIter),
1336 myDone(false)
1337 {
1338 advance();
1339 }
1340
1341 iterator(const iterator&) = delete;
1342 iterator& operator=(const iterator&) = delete;
1343 iterator(iterator&&) = default;
1344 iterator& operator=(iterator&&) = default;
1345
1346 const Item& operator*() const noexcept { return myCurrent; }
1347
1348 const Item* operator->() const noexcept { return &myCurrent; }
1349
1350 iterator& operator++()
1351 {
1352 advance();
1353 return *this;
1354 }
1355
1356 void operator++(int) { advance(); }
1357
1358 bool operator==(const iterator& theOther) const noexcept
1359 {
1360 if (myDone && theOther.myDone)
1361 {
1362 return true;
1363 }
1364 return myIter == theOther.myIter && myDone == theOther.myDone;
1365 }
1366
1367 bool operator!=(const iterator& theOther) const noexcept { return !(*this == theOther); }
1368
1369 private:
1370 void advance()
1371 {
1372 if (myDone || myIter == nullptr)
1373 {
1374 myDone = true;
1375 return;
1376 }
1377 ::occtl_node_id_t anId{};
1379 const ::occtl_status_t aStatus = ::occtl_topo_related_iter_next(myIter, &anId, &aKind);
1380 if (aStatus == OCCTL_OK)
1381 {
1382 myCurrent = Item{NodeId(anId), occtl::RelationKind{aKind}};
1383 }
1384 else
1385 {
1386 if (aStatus != OCCTL_NOT_FOUND)
1387 {
1388 ::occtl::check(aStatus);
1389 }
1390 myDone = true;
1391 }
1392 }
1393
1395 Item myCurrent{};
1396 bool myDone;
1397 };
1398
1399 RelatedIter() noexcept = default;
1400
1401 explicit RelatedIter(::occtl_topo_related_iter_t* theIter) noexcept
1402 : myIter(theIter)
1403 {
1404 }
1405
1406 RelatedIter(const RelatedIter&) = delete;
1407 RelatedIter& operator=(const RelatedIter&) = delete;
1408
1409 RelatedIter(RelatedIter&& theOther) noexcept
1410 : myIter(theOther.myIter)
1411 {
1412 theOther.myIter = nullptr;
1413 }
1414
1415 RelatedIter& operator=(RelatedIter&& theOther) noexcept
1416 {
1417 if (this != &theOther)
1418 {
1420 myIter = theOther.myIter;
1421 theOther.myIter = nullptr;
1422 }
1423 return *this;
1424 }
1425
1426 ~RelatedIter() { ::occtl_topo_related_iter_free(myIter); }
1427
1428 iterator begin() noexcept { return iterator(myIter); }
1429
1430 iterator end() noexcept { return iterator(); }
1431
1432private:
1433 ::occtl_topo_related_iter_t* myIter = nullptr;
1434};
1435
1444{
1445public:
1448
1450 static Graph create() { return Graph(); }
1451
1453 explicit Graph(::occtl_graph_t* const thePtr) noexcept
1454 : myPtr(thePtr)
1455 {
1456 }
1457
1460 {
1461 if (thePtr == nullptr)
1462 {
1463 throw Error(OCCTL_INVALID_HANDLE, "Graph::from_pointer_unsafe received a null pointer", 0, 0);
1464 }
1465 return Graph(thePtr);
1466 }
1467
1470
1472 Graph(Graph&& theOther) noexcept
1473 : myPtr(theOther.myPtr)
1474 {
1475 theOther.myPtr = nullptr;
1476 }
1477
1479 Graph& operator=(Graph&& theOther) noexcept
1480 {
1481 if (this != &theOther)
1482 {
1483 ::occtl_graph_free(myPtr);
1484 myPtr = theOther.myPtr;
1485 theOther.myPtr = nullptr;
1486 }
1487 return *this;
1488 }
1489
1490 Graph(const Graph&) = delete;
1491 Graph& operator=(const Graph&) = delete;
1492
1494 ::occtl_graph_t* get() const noexcept { return myPtr; }
1495
1499 {
1500 ::occtl_node_kind_t aKind;
1501 check(::occtl_graph_node_kind(myPtr, theId.get(), &aKind));
1502 return aKind;
1503 }
1504
1509 {
1510 ::occtl_node_kind_t aKind;
1511 check(::occtl_graph_uid_kind(myPtr, theUid.get(), &aKind));
1512 return aKind;
1513 }
1514
1518 {
1519 ::occtl_ref_kind_t aKind;
1520 check(::occtl_graph_ref_kind(myPtr, theId.get(), &aKind));
1521 return aKind;
1522 }
1523
1527 {
1528 ::occtl_ref_kind_t aKind;
1529 check(::occtl_graph_ref_uid_kind(myPtr, theUid.get(), &aKind));
1530 return aKind;
1531 }
1532
1536 {
1537 ::occtl_rep_kind_t aKind;
1538 check(::occtl_graph_rep_kind(myPtr, theId.get(), &aKind));
1539 return aKind;
1540 }
1541
1545 NodeId node_id_from_uid(const UID theUid) const
1546 {
1548 check(::occtl_graph_node_id_from_uid(myPtr, theUid.get(), &aId));
1549 return NodeId(aId);
1550 }
1551
1554 UID uid_from_node_id(const NodeId theId) const
1555 {
1556 ::occtl_uid_t aUid;
1557 check(::occtl_graph_uid_from_node_id(myPtr, theId.get(), &aUid));
1558 return UID(aUid);
1559 }
1560
1562 std::vector<UID> history_modified(const UID theInputUid) const
1563 {
1564 return fetch_history(&::occtl_graph_history_modified, theInputUid);
1565 }
1566
1568 std::vector<UID> history_generated(const UID theInputUid) const
1569 {
1570 return fetch_history(&::occtl_graph_history_generated, theInputUid);
1571 }
1572
1574 std::vector<UID> history_deleted_all() const
1575 {
1576 size_t aCount = 0;
1577 check(::occtl_graph_history_deleted_all(myPtr, nullptr, 0, &aCount));
1578 std::vector<::occtl_uid_t> aRaw(aCount);
1579 if (aCount != 0)
1580 {
1581 check(::occtl_graph_history_deleted_all(myPtr, aRaw.data(), aCount, &aCount));
1582 }
1583 std::vector<UID> aOut;
1584 aOut.reserve(aRaw.size());
1585 for (const ::occtl_uid_t& aUid : aRaw)
1586 {
1587 aOut.emplace_back(aUid);
1588 }
1589 return aOut;
1590 }
1591
1595 {
1596 ::occtl_ref_id_t aId;
1597 check(::occtl_graph_ref_id_from_ref_uid(myPtr, theUid.get(), &aId));
1598 return RefId(aId);
1599 }
1600
1604 {
1605 ::occtl_ref_uid_t aUid;
1606 check(::occtl_graph_ref_uid_from_ref_id(myPtr, theId.get(), &aUid));
1607 return RefUID(aUid);
1608 }
1609
1613 {
1614 ::occtl_rep_id_t aId;
1615 check(::occtl_graph_rep_id_from_rep_uid(myPtr, theUid.get(), &aId));
1616 return RepId(aId);
1617 }
1618
1622 {
1623 ::occtl_rep_uid_t aUid;
1624 check(::occtl_graph_rep_uid_from_rep_id(myPtr, theId.get(), &aUid));
1625 return RepUID(aUid);
1626 }
1627
1630 std::vector<std::pair<RefUID, RefId>> ref_uid_table() const
1631 {
1632 size_t aCount = 0;
1633 check(::occtl_graph_ref_uid_table(myPtr, nullptr, nullptr, 0, &aCount));
1634 std::vector<::occtl_ref_uid_t> aUids(aCount);
1635 std::vector<::occtl_ref_id_t> aRefs(aCount);
1636 if (aCount != 0)
1637 {
1638 check(::occtl_graph_ref_uid_table(myPtr, aUids.data(), aRefs.data(), aCount, &aCount));
1639 }
1640
1641 std::vector<std::pair<RefUID, RefId>> aResult;
1642 aResult.reserve(aCount);
1643 for (size_t anIndex = 0; anIndex < aCount; ++anIndex)
1644 {
1645 aResult.emplace_back(RefUID(aUids[anIndex]), RefId(aRefs[anIndex]));
1646 }
1647 return aResult;
1648 }
1649
1650 size_t solid_count() const
1651 {
1652 size_t aCount = 0;
1653 check(::occtl_graph_solid_count(myPtr, &aCount));
1654 return aCount;
1655 }
1656
1657 size_t shell_count() const
1658 {
1659 size_t aCount = 0;
1660 check(::occtl_graph_shell_count(myPtr, &aCount));
1661 return aCount;
1662 }
1663
1664 size_t face_count() const
1665 {
1666 size_t aCount = 0;
1667 check(::occtl_graph_face_count(myPtr, &aCount));
1668 return aCount;
1669 }
1670
1671 size_t wire_count() const
1672 {
1673 size_t aCount = 0;
1674 check(::occtl_graph_wire_count(myPtr, &aCount));
1675 return aCount;
1676 }
1677
1678 size_t edge_count() const
1679 {
1680 size_t aCount = 0;
1681 check(::occtl_graph_edge_count(myPtr, &aCount));
1682 return aCount;
1683 }
1684
1685 size_t vertex_count() const
1686 {
1687 size_t aCount = 0;
1688 check(::occtl_graph_vertex_count(myPtr, &aCount));
1689 return aCount;
1690 }
1691
1692 size_t compound_count() const
1693 {
1694 size_t aCount = 0;
1695 check(::occtl_graph_compound_count(myPtr, &aCount));
1696 return aCount;
1697 }
1698
1699 size_t compsolid_count() const
1700 {
1701 size_t aCount = 0;
1702 check(::occtl_graph_compsolid_count(myPtr, &aCount));
1703 return aCount;
1704 }
1705
1706 size_t coedge_count() const
1707 {
1708 size_t aCount = 0;
1709 check(::occtl_graph_coedge_count(myPtr, &aCount));
1710 return aCount;
1711 }
1712
1713 size_t product_count() const
1714 {
1715 size_t aCount = 0;
1716 check(::occtl_graph_product_count(myPtr, &aCount));
1717 return aCount;
1718 }
1719
1720 size_t occurrence_count() const
1721 {
1722 size_t aCount = 0;
1723 check(::occtl_graph_occurrence_count(myPtr, &aCount));
1724 return aCount;
1725 }
1726
1727 size_t node_count() const
1728 {
1729 size_t aCount = 0;
1730 check(::occtl_graph_node_count(myPtr, &aCount));
1731 return aCount;
1732 }
1733
1736 std::vector<::occtl_topo_check_issue_t> check_issues() const
1737 {
1738 size_t aCount = 0;
1739 check(::occtl_topo_check(myPtr, nullptr, 0, &aCount));
1740 std::vector<::occtl_topo_check_issue_t> anIssues(aCount);
1741 if (aCount != 0)
1742 {
1743 check(::occtl_topo_check(myPtr, anIssues.data(), anIssues.size(), &aCount));
1744 anIssues.resize(aCount);
1745 }
1746 return anIssues;
1747 }
1748
1751 bool is_valid() const { return check_issues().empty(); }
1752
1756 Point3 vertex_point(const NodeId theVertex) const
1757 {
1758 ::occtl_point3_t aPoint;
1759 check(::occtl_topo_vertex_point(myPtr, theVertex.get(), &aPoint));
1760 return Point3(aPoint);
1761 }
1762
1766 double vertex_tolerance(const NodeId theVertex) const
1767 {
1768 double aTol = 0.0;
1769 check(::occtl_topo_vertex_tolerance(myPtr, theVertex.get(), &aTol));
1770 return aTol;
1771 }
1772
1775 std::pair<double, double> edge_range(const NodeId theEdge) const
1776 {
1777 double aFirst = 0.0, aLast = 0.0;
1778 check(::occtl_topo_edge_range(myPtr, theEdge.get(), &aFirst, &aLast));
1779 return {aFirst, aLast};
1780 }
1781
1784 double edge_tolerance(const NodeId theEdge) const
1785 {
1786 double aTol = 0.0;
1787 check(::occtl_topo_edge_tolerance(myPtr, theEdge.get(), &aTol));
1788 return aTol;
1789 }
1790
1793 bool edge_is_degenerated(const NodeId theEdge) const
1794 {
1795 int32_t aFlag = 0;
1796 check(::occtl_topo_edge_is_degenerated(myPtr, theEdge.get(), &aFlag));
1797 return aFlag != 0;
1798 }
1799
1802 bool edge_has_curve(const NodeId theEdge) const
1803 {
1804 int32_t aHas = 0;
1805 check(::occtl_topo_edge_has_curve(myPtr, theEdge.get(), &aHas));
1806 return aHas != 0;
1807 }
1808
1812 CurveKind edge_curve_kind(const NodeId theEdge) const
1813 {
1815 check(::occtl_topo_edge_curve_kind(myPtr, theEdge.get(), &aKind));
1816 return aKind;
1817 }
1818
1821 NodeId edge_start_vertex(const NodeId theEdge) const
1822 {
1824 check(::occtl_topo_edge_start_vertex(myPtr, theEdge.get(), &aId));
1825 return NodeId(aId);
1826 }
1827
1830 NodeId edge_end_vertex(const NodeId theEdge) const
1831 {
1833 check(::occtl_topo_edge_end_vertex(myPtr, theEdge.get(), &aId));
1834 return NodeId(aId);
1835 }
1836
1840 bool coedge_is_seam(const NodeId theCoedge) const
1841 {
1842 int32_t aFlag = 0;
1843 check(::occtl_topo_coedge_is_seam(myPtr, theCoedge.get(), &aFlag));
1844 return aFlag != 0;
1845 }
1846
1850 NodeId coedge_edge_of(const NodeId theCoedge) const
1851 {
1853 check(::occtl_topo_coedge_edge_of(myPtr, theCoedge.get(), &aId));
1854 return NodeId(aId);
1855 }
1856
1860 NodeId coedge_face_of(const NodeId theCoedge) const
1861 {
1863 check(::occtl_topo_coedge_face_of(myPtr, theCoedge.get(), &aId));
1864 return NodeId(aId);
1865 }
1866
1869 double face_tolerance(const NodeId theFace) const
1870 {
1871 double aTol = 0.0;
1872 check(::occtl_topo_face_tolerance(myPtr, theFace.get(), &aTol));
1873 return aTol;
1874 }
1875
1879 NodeId face_outer_wire(const NodeId theFace) const
1880 {
1882 check(::occtl_topo_face_outer_wire(myPtr, theFace.get(), &aId));
1883 return NodeId(aId);
1884 }
1885
1888 void face_uv_bounds(const NodeId theFace,
1889 double& theUMin,
1890 double& theUMax,
1891 double& theVMin,
1892 double& theVMax) const
1893 {
1894 check(
1895 ::occtl_topo_face_uv_bounds(myPtr, theFace.get(), &theUMin, &theUMax, &theVMin, &theVMax));
1896 }
1897
1900 bool face_has_surface(const NodeId theFace) const
1901 {
1902 int32_t aHas = 0;
1903 check(::occtl_topo_face_has_surface(myPtr, theFace.get(), &aHas));
1904 return aHas != 0;
1905 }
1906
1911 {
1913 check(::occtl_topo_face_surface_kind(myPtr, theFace.get(), &aKind));
1914 return aKind;
1915 }
1916
1919 bool wire_is_closed(const NodeId theWire) const
1920 {
1921 int32_t aFlag = 0;
1922 check(::occtl_topo_wire_is_closed(myPtr, theWire.get(), &aFlag));
1923 return aFlag != 0;
1924 }
1925
1928 bool shell_is_closed(const NodeId theShell) const
1929 {
1930 int32_t aFlag = 0;
1931 check(::occtl_topo_shell_is_closed(myPtr, theShell.get(), &aFlag));
1932 return aFlag != 0;
1933 }
1934
1938 double vertex_parameter(const NodeId theVertex, const NodeId theEdge) const
1939 {
1940 double aParam = 0.0;
1941 check(::occtl_topo_vertex_parameter(myPtr, theVertex.get(), theEdge.get(), &aParam));
1942 return aParam;
1943 }
1944
1948 Point2 vertex_parameters(const NodeId theVertex, const NodeId theFace) const
1949 {
1950 ::occtl_point2_t aUV;
1951 check(::occtl_topo_vertex_parameters(myPtr, theVertex.get(), theFace.get(), &aUV));
1952 return Point2(aUV);
1953 }
1954
1957 bool edge_same_parameter(const NodeId theEdge) const
1958 {
1959 int32_t aFlag = 0;
1960 check(::occtl_topo_edge_same_parameter(myPtr, theEdge.get(), &aFlag));
1961 return aFlag != 0;
1962 }
1963
1966 bool edge_same_range(const NodeId theEdge) const
1967 {
1968 int32_t aFlag = 0;
1969 check(::occtl_topo_edge_same_range(myPtr, theEdge.get(), &aFlag));
1970 return aFlag != 0;
1971 }
1972
1975 bool edge_is_manifold(const NodeId theEdge) const
1976 {
1977 int32_t aFlag = 0;
1978 check(::occtl_topo_edge_is_manifold(myPtr, theEdge.get(), &aFlag));
1979 return aFlag != 0;
1980 }
1981
1984 bool edge_is_boundary(const NodeId theEdge) const
1985 {
1986 int32_t aFlag = 0;
1987 check(::occtl_topo_edge_is_boundary(myPtr, theEdge.get(), &aFlag));
1988 return aFlag != 0;
1989 }
1990
1993 bool edge_is_seam_on_face(const NodeId theEdge, const NodeId theFace) const
1994 {
1995 int32_t aFlag = 0;
1996 check(::occtl_topo_edge_is_seam_on_face(myPtr, theEdge.get(), theFace.get(), &aFlag));
1997 return aFlag != 0;
1998 }
1999
2003 bool coedge_is_reversed(const NodeId theCoedge) const
2004 {
2005 int32_t aFlag = 0;
2006 check(::occtl_topo_coedge_is_reversed(myPtr, theCoedge.get(), &aFlag));
2007 return aFlag != 0;
2008 }
2009
2013 bool coedge_has_pcurve(const NodeId theCoedge) const
2014 {
2015 int32_t aFlag = 0;
2016 check(::occtl_topo_coedge_has_pcurve(myPtr, theCoedge.get(), &aFlag));
2017 return aFlag != 0;
2018 }
2019
2023 double coedge_pcurve_parameter(const NodeId theCoedge, const NodeId theVertex) const
2024 {
2025 double aParam = 0.0;
2026 check(::occtl_topo_coedge_pcurve_parameter(myPtr, theCoedge.get(), theVertex.get(), &aParam));
2027 return aParam;
2028 }
2029
2033 std::pair<double, double> coedge_range(const NodeId theCoedge) const
2034 {
2035 double aFirst = 0.0, aLast = 0.0;
2036 check(::occtl_topo_coedge_range(myPtr, theCoedge.get(), &aFirst, &aLast));
2037 return {aFirst, aLast};
2038 }
2039
2043 void coedge_uv_points(const NodeId theCoedge,
2044 ::occtl_point2_t& theUVStart,
2045 ::occtl_point2_t& theUVEnd) const
2046 {
2047 check(::occtl_topo_coedge_uv_points(myPtr, theCoedge.get(), &theUVStart, &theUVEnd));
2048 }
2049
2053 NodeId coedge_seam_pair(const NodeId theCoedge) const
2054 {
2055 ::occtl_node_id_t aPair;
2056 check(::occtl_topo_coedge_seam_pair(myPtr, theCoedge.get(), &aPair));
2057 return NodeId(aPair);
2058 }
2059
2062 bool face_natural_restriction(const NodeId theFace) const
2063 {
2064 int32_t aFlag = 0;
2065 check(::occtl_topo_face_natural_restriction(myPtr, theFace.get(), &aFlag));
2066 return aFlag != 0;
2067 }
2068
2071 bool face_has_triangulation(const NodeId theFace) const
2072 {
2073 int32_t aFlag = 0;
2074 check(::occtl_topo_face_has_triangulation(myPtr, theFace.get(), &aFlag));
2075 return aFlag != 0;
2076 }
2077
2080 NodeId wire_face_of(const NodeId theWire) const
2081 {
2082 ::occtl_node_id_t aFace;
2083 check(::occtl_topo_wire_face_of(myPtr, theWire.get(), &aFace));
2084 return NodeId(aFace);
2085 }
2086
2089 bool wire_is_outer(const NodeId theWire) const
2090 {
2091 int32_t aFlag = 0;
2092 check(::occtl_topo_wire_is_outer(myPtr, theWire.get(), &aFlag));
2093 return aFlag != 0;
2094 }
2095
2099 Point2 coedge_pcurve_eval(const NodeId theCoedge, const double theU) const
2100 {
2101 ::occtl_point2_t aUV{};
2102 check(::occtl_topo_coedge_pcurve_eval(myPtr, theCoedge.get(), theU, &aUV));
2103 return Point2(aUV);
2104 }
2105
2109 std::pair<Point2, Vector2> coedge_pcurve_eval_d1(const NodeId theCoedge, const double theU) const
2110 {
2111 ::occtl_point2_t aUV{};
2112 ::occtl_vector2_t aD1{};
2113 check(::occtl_topo_coedge_pcurve_eval_d1(myPtr, theCoedge.get(), theU, &aUV, &aD1));
2114 return {Point2{aUV}, Vector2{aD1}};
2115 }
2116
2121 std::tuple<Point2, Vector2, Vector2> coedge_pcurve_eval_d2(const NodeId theCoedge,
2122 const double theU) const
2123 {
2124 ::occtl_point2_t aUV{};
2125 ::occtl_vector2_t aD1{}, aD2{};
2126 check(::occtl_topo_coedge_pcurve_eval_d2(myPtr, theCoedge.get(), theU, &aUV, &aD1, &aD2));
2127 return {Point2{aUV}, Vector2{aD1}, Vector2{aD2}};
2128 }
2129
2134 std::tuple<Point2, Vector2, Vector2, Vector2> coedge_pcurve_eval_d3(const NodeId theCoedge,
2135 const double theU) const
2136 {
2137 ::occtl_point2_t aUV{};
2138 ::occtl_vector2_t aD1{}, aD2{}, aD3{};
2139 check(::occtl_topo_coedge_pcurve_eval_d3(myPtr, theCoedge.get(), theU, &aUV, &aD1, &aD2, &aD3));
2140 return {Point2{aUV}, Vector2{aD1}, Vector2{aD2}, Vector2{aD3}};
2141 }
2142
2147 const double theU,
2148 const uint32_t theN) const
2149 {
2150 ::occtl_vector2_t aDN{};
2151 check(::occtl_topo_coedge_pcurve_eval_dn(myPtr, theCoedge.get(), theU, theN, &aDN));
2152 return Vector2{aDN};
2153 }
2154
2157 Point3 edge_eval(const NodeId theEdge, const double theU) const
2158 {
2159 ::occtl_point3_t aP{};
2160 check(::occtl_topo_edge_eval(myPtr, theEdge.get(), theU, &aP));
2161 return Point3(aP);
2162 }
2163
2166 std::pair<Point3, Vector3> edge_eval_d1(const NodeId theEdge, const double theU) const
2167 {
2168 ::occtl_point3_t aP{};
2169 ::occtl_vector3_t aD1{};
2170 check(::occtl_topo_edge_eval_d1(myPtr, theEdge.get(), theU, &aP, &aD1));
2171 return {Point3{aP}, Vector3{aD1}};
2172 }
2173
2176 std::tuple<Point3, Vector3, Vector3> edge_eval_d2(const NodeId theEdge, const double theU) const
2177 {
2178 ::occtl_point3_t aP{};
2179 ::occtl_vector3_t aD1{}, aD2{};
2180 check(::occtl_topo_edge_eval_d2(myPtr, theEdge.get(), theU, &aP, &aD1, &aD2));
2181 return {Point3{aP}, Vector3{aD1}, Vector3{aD2}};
2182 }
2183
2186 std::tuple<Point3, Vector3, Vector3, Vector3> edge_eval_d3(const NodeId theEdge,
2187 const double theU) const
2188 {
2189 ::occtl_point3_t aP{};
2190 ::occtl_vector3_t aD1{}, aD2{}, aD3{};
2191 check(::occtl_topo_edge_eval_d3(myPtr, theEdge.get(), theU, &aP, &aD1, &aD2, &aD3));
2192 return {Point3{aP}, Vector3{aD1}, Vector3{aD2}, Vector3{aD3}};
2193 }
2194
2197 Vector3 edge_eval_dn(const NodeId theEdge, const double theU, const uint32_t theN) const
2198 {
2199 ::occtl_vector3_t aDN{};
2200 check(::occtl_topo_edge_eval_dn(myPtr, theEdge.get(), theU, theN, &aDN));
2201 return Vector3{aDN};
2202 }
2203
2206 Point3 face_eval(const NodeId theFace, const double theU, const double theV) const
2207 {
2208 ::occtl_point3_t aP{};
2209 check(::occtl_topo_face_eval(myPtr, theFace.get(), theU, theV, &aP));
2210 return Point3(aP);
2211 }
2212
2215 std::tuple<Point3, Vector3, Vector3> face_eval_d1(const NodeId theFace,
2216 const double theU,
2217 const double theV) const
2218 {
2219 ::occtl_point3_t aP{};
2220 ::occtl_vector3_t aD1U{}, aD1V{};
2221 check(::occtl_topo_face_eval_d1(myPtr, theFace.get(), theU, theV, &aP, &aD1U, &aD1V));
2222 return {Point3{aP}, Vector3{aD1U}, Vector3{aD1V}};
2223 }
2224
2227 std::tuple<Point3, Vector3, Vector3, Vector3, Vector3, Vector3> face_eval_d2(
2228 const NodeId theFace,
2229 const double theU,
2230 const double theV) const
2231 {
2232 ::occtl_point3_t aP{};
2233 ::occtl_vector3_t aD1U{}, aD1V{}, aD2U{}, aD2V{}, aD2UV{};
2235 theFace.get(),
2236 theU,
2237 theV,
2238 &aP,
2239 &aD1U,
2240 &aD1V,
2241 &aD2U,
2242 &aD2V,
2243 &aD2UV));
2244 return {Point3{aP}, Vector3{aD1U}, Vector3{aD1V}, Vector3{aD2U}, Vector3{aD2V}, Vector3{aD2UV}};
2245 }
2246
2249 std::
2250 tuple<Point3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3>
2251 face_eval_d3(const NodeId theFace, const double theU, const double theV) const
2252 {
2253 ::occtl_point3_t aP{};
2254 ::occtl_vector3_t aD1U{}, aD1V{}, aD2U{}, aD2V{}, aD2UV{};
2255 ::occtl_vector3_t aD3U{}, aD3V{}, aD3UUV{}, aD3UVV{};
2257 theFace.get(),
2258 theU,
2259 theV,
2260 &aP,
2261 &aD1U,
2262 &aD1V,
2263 &aD2U,
2264 &aD2V,
2265 &aD2UV,
2266 &aD3U,
2267 &aD3V,
2268 &aD3UUV,
2269 &aD3UVV));
2270 return {Point3{aP},
2271 Vector3{aD1U},
2272 Vector3{aD1V},
2273 Vector3{aD2U},
2274 Vector3{aD2V},
2275 Vector3{aD2UV},
2276 Vector3{aD3U},
2277 Vector3{aD3V},
2278 Vector3{aD3UUV},
2279 Vector3{aD3UVV}};
2280 }
2281
2286 const double theU,
2287 const double theV,
2288 const uint32_t theNu,
2289 const uint32_t theNv) const
2290 {
2291 ::occtl_vector3_t aDN{};
2292 check(::occtl_topo_face_eval_dn(myPtr, theFace.get(), theU, theV, theNu, theNv, &aDN));
2293 return Vector3{aDN};
2294 }
2295
2298 uint32_t face_wire_count(const NodeId theFace) const
2299 {
2300 uint32_t aCount = 0;
2301 check(::occtl_topo_face_wire_count(myPtr, theFace.get(), &aCount));
2302 return aCount;
2303 }
2304
2307 uint32_t wire_coedge_count(const NodeId theWire) const
2308 {
2309 uint32_t aCount = 0;
2310 check(::occtl_topo_wire_coedge_count(myPtr, theWire.get(), &aCount));
2311 return aCount;
2312 }
2313
2316 uint32_t edge_face_count(const NodeId theEdge) const
2317 {
2318 uint32_t aCount = 0;
2319 check(::occtl_topo_edge_face_count(myPtr, theEdge.get(), &aCount));
2320 return aCount;
2321 }
2322
2325 uint32_t wire_distinct_edge_count(const NodeId theWire) const
2326 {
2327 uint32_t aCount = 0;
2328 check(::occtl_topo_wire_distinct_edge_count(myPtr, theWire.get(), &aCount));
2329 return aCount;
2330 }
2331
2335 uint32_t vertex_edge_count(const NodeId theVertex) const
2336 {
2337 uint32_t aCount = 0;
2338 check(::occtl_topo_vertex_edge_count(myPtr, theVertex.get(), &aCount));
2339 return aCount;
2340 }
2341
2344 uint32_t solid_shell_count(const NodeId theSolid) const
2345 {
2346 uint32_t aCount = 0;
2347 check(::occtl_topo_solid_shell_count(myPtr, theSolid.get(), &aCount));
2348 return aCount;
2349 }
2350
2353 uint32_t shell_face_count(const NodeId theShell) const
2354 {
2355 uint32_t aCount = 0;
2356 check(::occtl_topo_shell_face_count(myPtr, theShell.get(), &aCount));
2357 return aCount;
2358 }
2359
2362 uint32_t wire_edge_count(const NodeId theWire) const
2363 {
2364 uint32_t aCount = 0;
2365 check(::occtl_topo_wire_edge_count(myPtr, theWire.get(), &aCount));
2366 return aCount;
2367 }
2368
2371 uint32_t edge_vertex_count(const NodeId theEdge) const
2372 {
2373 uint32_t aCount = 0;
2374 check(::occtl_topo_edge_vertex_count(myPtr, theEdge.get(), &aCount));
2375 return aCount;
2376 }
2377
2381 uint32_t product_occurrence_count(const NodeId theProduct) const
2382 {
2383 uint32_t aCount = 0;
2384 check(::occtl_topo_product_occurrence_count(myPtr, theProduct.get(), &aCount));
2385 return aCount;
2386 }
2387
2391 uint32_t compound_child_count(const NodeId theCompound) const
2392 {
2393 uint32_t aCount = 0;
2394 check(::occtl_topo_compound_child_count(myPtr, theCompound.get(), &aCount));
2395 return aCount;
2396 }
2397
2401 uint32_t compsolid_solid_count(const NodeId theCompSolid) const
2402 {
2403 uint32_t aCount = 0;
2404 check(::occtl_topo_compsolid_solid_count(myPtr, theCompSolid.get(), &aCount));
2405 return aCount;
2406 }
2407
2410 NodeIter wire_explorer(const NodeId theWire) const
2411 {
2412 ::occtl_node_iter_t* anIt = nullptr;
2413 check(::occtl_topo_wire_explorer_create(myPtr, theWire.get(), &anIt));
2414 return NodeIter(anIt);
2415 }
2416
2419 std::vector<OrientedNode> wire_order_edges(const NodeId theWire) const
2420 {
2421 size_t aCount = 0;
2422 check(::occtl_topo_wire_order_edges(myPtr, theWire.get(), nullptr, 0, &aCount));
2423
2424 std::vector<OrientedNode> aResult(aCount);
2425 if (aCount > 0)
2426 {
2428 theWire.get(),
2429 aResult.data(),
2430 aResult.size(),
2431 &aCount));
2432 aResult.resize(aCount);
2433 }
2434 return aResult;
2435 }
2436
2440 const NodeId theRoot,
2441 const ::occtl_topo_child_explorer_config_t* const theConfig = nullptr) const
2442 {
2443 ::occtl_topo_explorer_iter_t* anIt = nullptr;
2444 check(::occtl_topo_child_explorer_create(myPtr, theRoot.get(), theConfig, &anIt));
2445 return ExplorerIter(anIt);
2446 }
2447
2451 const NodeId theNode,
2452 const ::occtl_topo_parent_explorer_config_t* const theConfig = nullptr) const
2453 {
2454 ::occtl_topo_explorer_iter_t* anIt = nullptr;
2455 check(::occtl_topo_parent_explorer_create(myPtr, theNode.get(), theConfig, &anIt));
2456 return ExplorerIter(anIt);
2457 }
2458
2461 RelatedIter related(const NodeId theNode) const
2462 {
2463 ::occtl_topo_related_iter_t* anIt = nullptr;
2464 check(::occtl_topo_related_iter_create(myPtr, theNode.get(), &anIt));
2465 return RelatedIter(anIt);
2466 }
2467
2470 DistancePair distance_pair(const NodeId theNodeA, const NodeId theNodeB) const
2471 {
2472 DistancePair aPair{};
2473 check(::occtl_topo_distance_pair(myPtr, theNodeA.get(), theNodeB.get(), &aPair));
2474 return aPair;
2475 }
2476
2479 TouchIter touches(const NodeId theNodeA,
2480 const NodeId theNodeB,
2481 const RelationOptions* const theOptions = nullptr) const
2482 {
2483 ::occtl_topo_touch_iter_t* anIt = nullptr;
2484 check(::occtl_topo_touch_iter_create(myPtr, theNodeA.get(), theNodeB.get(), theOptions, &anIt));
2485 return TouchIter(anIt);
2486 }
2487
2491 const NodeId theNodeB,
2492 const RelationOptions* const theOptions = nullptr)
2493 {
2494 ::occtl_topo_intersection_iter_t* anIt = nullptr;
2496 theNodeA.get(),
2497 theNodeB.get(),
2498 theOptions,
2499 &anIt));
2500 return IntersectionIter(anIt);
2501 }
2502
2506 const Axis1Placement& theAxis,
2507 const double theMinParameter,
2508 const double theMaxParameter,
2509 const double theTolerance) const
2510 {
2511 ::occtl_topo_axis_hit_iter_t* anIt = nullptr;
2513 theRoot.get(),
2514 theAxis.c_type(),
2515 theMinParameter,
2516 theMaxParameter,
2517 theTolerance,
2518 &anIt));
2519 return AxisHitIter(anIt);
2520 }
2521
2524 bool is_same_geometry(const NodeId theNodeA,
2525 const NodeId theNodeB,
2526 const double theTolerance) const
2527 {
2528 int32_t aFlag = 0;
2529 check(
2530 ::occtl_topo_is_same_geometry(myPtr, theNodeA.get(), theNodeB.get(), theTolerance, &aFlag));
2531 return aFlag != 0;
2532 }
2533
2536 std::vector<NodeId> common_vertices(const NodeId theNodeA, const NodeId theNodeB) const
2537 {
2538 size_t aCount = 0;
2539 check(::occtl_topo_common_vertices(myPtr, theNodeA.get(), theNodeB.get(), nullptr, 0, &aCount));
2540
2541 std::vector<::occtl_node_id_t> aRaw(aCount);
2542 if (aCount > 0)
2543 {
2545 theNodeA.get(),
2546 theNodeB.get(),
2547 aRaw.data(),
2548 aRaw.size(),
2549 &aCount));
2550 }
2551
2552 std::vector<NodeId> aResult;
2553 aResult.reserve(aCount);
2554 for (size_t anI = 0; anI < aCount; ++anI)
2555 {
2556 aResult.push_back(NodeId(aRaw[anI]));
2557 }
2558 return aResult;
2559 }
2560
2563 std::vector<NodeId> adjacent_edges(const NodeId theEdge) const
2564 {
2565 size_t aCount = 0;
2566 check(::occtl_topo_adjacent_edges(myPtr, theEdge.get(), nullptr, 0, &aCount));
2567
2568 std::vector<::occtl_node_id_t> aRaw(aCount);
2569 if (aCount > 0)
2570 {
2571 check(::occtl_topo_adjacent_edges(myPtr, theEdge.get(), aRaw.data(), aRaw.size(), &aCount));
2572 }
2573
2574 std::vector<NodeId> aResult;
2575 aResult.reserve(aCount);
2576 for (size_t anI = 0; anI < aCount; ++anI)
2577 {
2578 aResult.push_back(NodeId(aRaw[anI]));
2579 }
2580 return aResult;
2581 }
2582
2585 std::vector<NodeId> adjacent_faces(const NodeId theFace) const
2586 {
2587 size_t aCount = 0;
2588 check(::occtl_topo_adjacent_faces(myPtr, theFace.get(), nullptr, 0, &aCount));
2589
2590 std::vector<::occtl_node_id_t> aRaw(aCount);
2591 if (aCount > 0)
2592 {
2593 check(::occtl_topo_adjacent_faces(myPtr, theFace.get(), aRaw.data(), aRaw.size(), &aCount));
2594 }
2595
2596 std::vector<NodeId> aResult;
2597 aResult.reserve(aCount);
2598 for (size_t anI = 0; anI < aCount; ++anI)
2599 {
2600 aResult.push_back(NodeId(aRaw[anI]));
2601 }
2602 return aResult;
2603 }
2604
2607 std::vector<NodeId> connected_edges(const NodeId theSeedEdge) const
2608 {
2609 size_t aCount = 0;
2610 check(::occtl_topo_connected_edges(myPtr, theSeedEdge.get(), nullptr, 0, &aCount));
2611
2612 std::vector<::occtl_node_id_t> aRaw(aCount);
2613 if (aCount > 0)
2614 {
2615 check(
2616 ::occtl_topo_connected_edges(myPtr, theSeedEdge.get(), aRaw.data(), aRaw.size(), &aCount));
2617 }
2618
2619 std::vector<NodeId> aResult;
2620 aResult.reserve(aCount);
2621 for (size_t anI = 0; anI < aCount; ++anI)
2622 {
2623 aResult.push_back(NodeId(aRaw[anI]));
2624 }
2625 return aResult;
2626 }
2627
2630 std::vector<NodeId> connected_faces(const NodeId theSeedFace) const
2631 {
2632 size_t aCount = 0;
2633 check(::occtl_topo_connected_faces(myPtr, theSeedFace.get(), nullptr, 0, &aCount));
2634
2635 std::vector<::occtl_node_id_t> aRaw(aCount);
2636 if (aCount > 0)
2637 {
2638 check(
2639 ::occtl_topo_connected_faces(myPtr, theSeedFace.get(), aRaw.data(), aRaw.size(), &aCount));
2640 }
2641
2642 std::vector<NodeId> aResult;
2643 aResult.reserve(aCount);
2644 for (size_t anI = 0; anI < aCount; ++anI)
2645 {
2646 aResult.push_back(NodeId(aRaw[anI]));
2647 }
2648 return aResult;
2649 }
2650
2653 int32_t graph_distance(const NodeId theRoot,
2654 const std::vector<NodeId>& theSources,
2655 const NodeId theTarget) const
2656 {
2657 std::vector<::occtl_node_id_t> aRawSources;
2658 aRawSources.reserve(theSources.size());
2659 for (const NodeId& aSource : theSources)
2660 {
2661 aRawSources.push_back(aSource.get());
2662 }
2663
2664 int32_t aDistance = -1;
2666 theRoot.get(),
2667 aRawSources.data(),
2668 aRawSources.size(),
2669 theTarget.get(),
2670 &aDistance));
2671 return aDistance;
2672 }
2673
2676 int32_t graph_distance(const NodeId theRoot, const NodeId theSource, const NodeId theTarget) const
2677 {
2678 const ::occtl_node_id_t aSource = theSource.get();
2679 int32_t aDistance = -1;
2680 check(
2681 ::occtl_topo_graph_distance(myPtr, theRoot.get(), &aSource, 1, theTarget.get(), &aDistance));
2682 return aDistance;
2683 }
2684
2688 const Point3& thePoint,
2689 const double theTolerance) const
2690 {
2692 check(
2693 ::occtl_topo_classify_point(myPtr, theSolid.get(), thePoint.c_type(), theTolerance, &aClass));
2694 return aClass;
2695 }
2696
2699 bool is_inside(const NodeId theSolid,
2700 const Point3& thePoint,
2701 const double theTolerance,
2702 const bool theIncludeBoundary = true) const
2703 {
2704 int32_t aFlag = 0;
2706 theSolid.get(),
2707 thePoint.c_type(),
2708 theTolerance,
2709 theIncludeBoundary ? 1 : 0,
2710 &aFlag));
2711 return aFlag != 0;
2712 }
2713
2715 {
2716 ::occtl_node_iter_t* anIt = nullptr;
2718 return NodeIter(anIt);
2719 }
2720
2722 {
2723 ::occtl_node_iter_t* anIt = nullptr;
2725 return NodeIter(anIt);
2726 }
2727
2729 {
2730 ::occtl_node_iter_t* anIt = nullptr;
2732 return NodeIter(anIt);
2733 }
2734
2736 {
2737 ::occtl_node_iter_t* anIt = nullptr;
2739 return NodeIter(anIt);
2740 }
2741
2743 {
2744 ::occtl_node_iter_t* anIt = nullptr;
2746 return NodeIter(anIt);
2747 }
2748
2750 {
2751 ::occtl_node_iter_t* anIt = nullptr;
2753 return NodeIter(anIt);
2754 }
2755
2757 {
2758 ::occtl_node_iter_t* anIt = nullptr;
2760 return NodeIter(anIt);
2761 }
2762
2764 {
2765 ::occtl_node_iter_t* anIt = nullptr;
2767 return NodeIter(anIt);
2768 }
2769
2771 {
2772 ::occtl_node_iter_t* anIt = nullptr;
2774 return NodeIter(anIt);
2775 }
2776
2778 {
2779 ::occtl_node_iter_t* anIt = nullptr;
2781 return NodeIter(anIt);
2782 }
2783
2785 {
2786 ::occtl_node_iter_t* anIt = nullptr;
2788 return NodeIter(anIt);
2789 }
2790
2792 {
2793 ::occtl_node_iter_t* anIt = nullptr;
2795 return NodeIter(anIt);
2796 }
2797
2801 {
2802 ::occtl_select_iter_t* anIt = nullptr;
2803 check(::occtl_select_iter_create(myPtr, &theOptions, &anIt));
2804 return SelectIter(anIt);
2805 }
2806
2810 const char* const theTag,
2811 const size_t theTagLen)
2812 {
2813 ::occtl_select_iter_t* anIt = nullptr;
2814 check(::occtl_select_tagged_iter_create(myPtr, &theOptions, theTag, theTagLen, &anIt));
2815 return SelectIter(anIt);
2816 }
2817
2821 const SelectGroupOptions& theGroupOptions)
2822 {
2823 ::occtl_select_group_iter_t* anIt = nullptr;
2824 check(::occtl_select_group_iter_create(myPtr, &theSelectOptions, &theGroupOptions, &anIt));
2825 return SelectGroupIter(anIt);
2826 }
2827
2828 NodeIter shells_of_solid(const NodeId theSolid) const
2829 {
2830 ::occtl_node_iter_t* anIt = nullptr;
2831 check(::occtl_topo_shells_of_solid_iter_create(myPtr, theSolid.get(), &anIt));
2832 return NodeIter(anIt);
2833 }
2834
2835 NodeIter faces_of_shell(const NodeId theShell) const
2836 {
2837 ::occtl_node_iter_t* anIt = nullptr;
2838 check(::occtl_topo_faces_of_shell_iter_create(myPtr, theShell.get(), &anIt));
2839 return NodeIter(anIt);
2840 }
2841
2842 NodeIter wires_of_face(const NodeId theFace) const
2843 {
2844 ::occtl_node_iter_t* anIt = nullptr;
2845 check(::occtl_topo_wires_of_face_iter_create(myPtr, theFace.get(), &anIt));
2846 return NodeIter(anIt);
2847 }
2848
2849 NodeIter coedges_of_wire(const NodeId theWire) const
2850 {
2851 ::occtl_node_iter_t* anIt = nullptr;
2852 check(::occtl_topo_coedges_of_wire_iter_create(myPtr, theWire.get(), &anIt));
2853 return NodeIter(anIt);
2854 }
2855
2856 NodeIter edges_of_wire(const NodeId theWire) const
2857 {
2858 ::occtl_node_iter_t* anIt = nullptr;
2859 check(::occtl_topo_edges_of_wire_iter_create(myPtr, theWire.get(), &anIt));
2860 return NodeIter(anIt);
2861 }
2862
2863 NodeIter vertices_of_edge(const NodeId theEdge) const
2864 {
2865 ::occtl_node_iter_t* anIt = nullptr;
2866 check(::occtl_topo_vertices_of_edge_iter_create(myPtr, theEdge.get(), &anIt));
2867 return NodeIter(anIt);
2868 }
2869
2871 {
2872 ::occtl_node_iter_t* anIt = nullptr;
2873 check(::occtl_topo_occurrences_of_product_iter_create(myPtr, theProduct.get(), &anIt));
2874 return NodeIter(anIt);
2875 }
2876
2879 NodeId make_vertex(const ::occtl_topo_make_vertex_info_t& theInfo)
2880 {
2881 ::occtl_node_id_t anId;
2882 check(::occtl_topo_make_vertex(myPtr, &theInfo, &anId));
2883 return NodeId(anId);
2884 }
2885
2889 NodeId make_edge(const ::occtl_topo_make_edge_info_t& theInfo)
2890 {
2891 ::occtl_node_id_t anId;
2892 check(::occtl_topo_make_edge(myPtr, &theInfo, &anId));
2893 return NodeId(anId);
2894 }
2895
2899 NodeId make_wire(const ::occtl_topo_make_wire_info_t& theInfo)
2900 {
2901 ::occtl_node_id_t anId;
2902 check(::occtl_topo_make_wire(myPtr, &theInfo, &anId));
2903 return NodeId(anId);
2904 }
2905
2909 std::vector<NodeId> edges_to_wires(const EdgesToWiresOptions& theOptions)
2910 {
2911 size_t aCount = 0;
2912 check(::occtl_topo_edges_to_wires(myPtr, &theOptions, nullptr, 0, &aCount));
2913
2914 std::vector<::occtl_node_id_t> aRaw(aCount);
2915 if (aCount > 0)
2916 {
2917 check(::occtl_topo_edges_to_wires(myPtr, &theOptions, aRaw.data(), aRaw.size(), &aCount));
2918 }
2919
2920 std::vector<NodeId> aResult;
2921 aResult.reserve(aCount);
2922 for (size_t anI = 0; anI < aCount; ++anI)
2923 {
2924 aResult.push_back(NodeId(aRaw[anI]));
2925 }
2926 return aResult;
2927 }
2928
2932 {
2933 ::occtl_node_id_t anId;
2934 check(::occtl_topo_wire_offset_2d(myPtr, &theOptions, &anId));
2935 return NodeId(anId);
2936 }
2937
2942 {
2943 size_t aRemoved = 0;
2944 check(::occtl_topo_wire_fix_degenerate(myPtr, &theOptions, &aRemoved));
2945 return aRemoved;
2946 }
2947
2951 {
2952 ::occtl_node_id_t anId;
2953 check(::occtl_topo_face_chamfer_2d(myPtr, &theOptions, &anId));
2954 return NodeId(anId);
2955 }
2956
2960 {
2961 ::occtl_node_id_t anId;
2962 check(::occtl_topo_wire_chamfer_2d(myPtr, &theOptions, &anId));
2963 return NodeId(anId);
2964 }
2965
2969 NodeId make_face(const ::occtl_topo_make_face_info_t& theInfo)
2970 {
2971 ::occtl_node_id_t anId;
2972 check(::occtl_topo_make_face(myPtr, &theInfo, &anId));
2973 return NodeId(anId);
2974 }
2975
2979 {
2980 ::occtl_node_id_t anId;
2981 check(::occtl_topo_make_face_from_wires_auto(myPtr, &theOptions, &anId));
2982 return NodeId(anId);
2983 }
2984
2988 NodeId make_shell(const ::occtl_topo_make_shell_info_t& theInfo)
2989 {
2990 ::occtl_node_id_t anId;
2991 check(::occtl_topo_make_shell(myPtr, &theInfo, &anId));
2992 return NodeId(anId);
2993 }
2994
2998 NodeId make_solid(const ::occtl_topo_make_solid_info_t& theInfo)
2999 {
3000 ::occtl_node_id_t anId;
3001 check(::occtl_topo_make_solid(myPtr, &theInfo, &anId));
3002 return NodeId(anId);
3003 }
3004
3008 void solid_view(const NodeId theSolid, ::occtl_solid_view_t& theView) const
3009 {
3010 ::occtl_solid_view_init(&theView);
3011 check(::occtl_topo_solid_view(myPtr, theSolid.get(), &theView));
3012 }
3013
3017 void compound_view(const NodeId theCompound, ::occtl_compound_view_t& theView) const
3018 {
3020 check(::occtl_topo_compound_view(myPtr, theCompound.get(), &theView));
3021 }
3022
3026 void wire_view(const NodeId theWire, ::occtl_wire_view_t& theView) const
3027 {
3028 ::occtl_wire_view_init(&theView);
3029 check(::occtl_topo_wire_view(myPtr, theWire.get(), &theView));
3030 }
3031
3035 void shell_view(const NodeId theShell, ::occtl_shell_view_t& theView) const
3036 {
3037 ::occtl_shell_view_init(&theView);
3038 check(::occtl_topo_shell_view(myPtr, theShell.get(), &theView));
3039 }
3040
3044 void vertex_view(const NodeId theVertex, ::occtl_vertex_view_t& theView) const
3045 {
3046 ::occtl_vertex_view_init(&theView);
3047 check(::occtl_topo_vertex_view(myPtr, theVertex.get(), &theView));
3048 }
3049
3053 NodeId make_compsolid(const ::occtl_topo_make_compsolid_info_t& theInfo)
3054 {
3055 ::occtl_node_id_t anId;
3056 check(::occtl_topo_make_compsolid(myPtr, &theInfo, &anId));
3057 return NodeId(anId);
3058 }
3059
3063 NodeId make_compound(const ::occtl_topo_make_compound_info_t& theInfo)
3064 {
3065 ::occtl_node_id_t anId;
3066 check(::occtl_topo_make_compound(myPtr, &theInfo, &anId));
3067 return NodeId(anId);
3068 }
3069
3072 void remove(const NodeId theId) { check(::occtl_topo_remove(myPtr, theId.get())); }
3073
3076 void remove_subgraph(const NodeId theId)
3077 {
3078 check(::occtl_topo_remove_subgraph(myPtr, theId.get()));
3079 }
3080
3085 {
3086 ::occtl_batch_t* aBatch = nullptr;
3087 check(::occtl_graph_begin_batch(myPtr, &aBatch));
3088 return Batch(aBatch, myPtr);
3089 }
3090
3095 void set_vertex_point(const NodeId theVertex, const ::occtl_point3_t& thePoint)
3096 {
3097 check(::occtl_topo_set_vertex_point(myPtr, theVertex.get(), thePoint));
3098 }
3099
3104 void set_vertex_tolerance(const NodeId theVertex, const double theTol)
3105 {
3106 check(::occtl_topo_set_vertex_tolerance(myPtr, theVertex.get(), theTol));
3107 }
3108
3112 void set_edge_tolerance(const NodeId theEdge, const double theTol)
3113 {
3114 check(::occtl_topo_set_edge_tolerance(myPtr, theEdge.get(), theTol));
3115 }
3116
3120 void set_face_tolerance(const NodeId theFace, const double theTol)
3121 {
3122 check(::occtl_topo_set_face_tolerance(myPtr, theFace.get(), theTol));
3123 }
3124
3128 void set_edge_param_range(const NodeId theEdge, const double theFirst, const double theLast)
3129 {
3130 check(::occtl_topo_set_edge_param_range(myPtr, theEdge.get(), theFirst, theLast));
3131 }
3132
3136 void set_edge_same_parameter(const NodeId theEdge, const bool theFlag)
3137 {
3138 check(::occtl_topo_set_edge_same_parameter(myPtr, theEdge.get(), theFlag ? 1 : 0));
3139 }
3140
3144 void set_edge_same_range(const NodeId theEdge, const bool theFlag)
3145 {
3146 check(::occtl_topo_set_edge_same_range(myPtr, theEdge.get(), theFlag ? 1 : 0));
3147 }
3148
3152 void set_edge_is_degenerate(const NodeId theEdge, const bool theFlag)
3153 {
3154 check(::occtl_topo_set_edge_is_degenerate(myPtr, theEdge.get(), theFlag ? 1 : 0));
3155 }
3156
3160 void set_edge_is_closed(const NodeId theEdge, const bool theFlag)
3161 {
3162 check(::occtl_topo_set_edge_is_closed(myPtr, theEdge.get(), theFlag ? 1 : 0));
3163 }
3164
3168 void set_wire_is_closed(const NodeId theWire, const bool theFlag)
3169 {
3170 check(::occtl_topo_set_wire_is_closed(myPtr, theWire.get(), theFlag ? 1 : 0));
3171 }
3172
3176 void set_shell_is_closed(const NodeId theShell, const bool theFlag)
3177 {
3178 check(::occtl_topo_set_shell_is_closed(myPtr, theShell.get(), theFlag ? 1 : 0));
3179 }
3180
3184 void set_face_natural_restriction(const NodeId theFace, const bool theFlag)
3185 {
3186 check(::occtl_topo_set_face_natural_restriction(myPtr, theFace.get(), theFlag ? 1 : 0));
3187 }
3188
3193 void set_coedge_param_range(const NodeId theCoedge, const double theFirst, const double theLast)
3194 {
3195 check(::occtl_topo_set_coedge_param_range(myPtr, theCoedge.get(), theFirst, theLast));
3196 }
3197
3202 void set_coedge_uv_box(const NodeId theCoedge,
3203 const ::occtl_point2_t& theUvLo,
3204 const ::occtl_point2_t& theUvHi)
3205 {
3206 check(::occtl_topo_set_coedge_uv_box(myPtr, theCoedge.get(), theUvLo, theUvHi));
3207 }
3208
3213 Graph clone() const
3214 {
3215 ::occtl_graph_t* aClone = nullptr;
3216 check(::occtl_graph_clone(myPtr, &aClone));
3217 return Graph(aClone);
3218 }
3219
3225
3229 void remove_with_replacement(const NodeId theNode, const NodeId theReplacement)
3230 {
3231 check(::occtl_topo_remove_with_replacement(myPtr, theNode.get(), theReplacement.get()));
3232 }
3233
3237 void remove_ref(const RefId& theRefId) { check(::occtl_topo_remove_ref(myPtr, theRefId.get())); }
3238
3242 void remove_rep(const RepId& theRepId) { check(::occtl_topo_remove_rep(myPtr, theRepId.get())); }
3243
3248
3252 void set_edge_start_vertex(const NodeId theEdge, const NodeId theVertex)
3253 {
3254 check(::occtl_topo_set_edge_start_vertex(myPtr, theEdge.get(), theVertex.get()));
3255 }
3256
3260 void set_edge_end_vertex(const NodeId theEdge, const NodeId theVertex)
3261 {
3262 check(::occtl_topo_set_edge_end_vertex(myPtr, theEdge.get(), theVertex.get()));
3263 }
3264
3268 void set_ref_orientation(const RefId& theRefId, const Orientation theOrientation)
3269 {
3270 check(::occtl_topo_set_ref_orientation(myPtr, theRefId.get(), theOrientation));
3271 }
3272
3276 void set_ref_location(const RefId& theRefId, const ::occtl_transform_t& theTransform)
3277 {
3278 check(::occtl_topo_set_ref_location(myPtr, theRefId.get(), theTransform));
3279 }
3280
3284 void set_wire_ref_is_outer(const RefId& theRefId, const bool theFlag)
3285 {
3286 check(::occtl_topo_set_wire_ref_is_outer(myPtr, theRefId.get(), theFlag ? 1 : 0));
3287 }
3288
3292 void color_set(const NodeId theTarget, const ::occtl_color_rgba_t& theColor)
3293 {
3294 check(::occtl_graph_color_set(myPtr, theTarget.get(), theColor));
3295 }
3296
3301 {
3302 ::occtl_color_rgba_t aColor{};
3303 check(::occtl_graph_color_get(myPtr, theTarget.get(), &aColor));
3304 return aColor;
3305 }
3306
3310 void color_unset(const NodeId theTarget)
3311 {
3312 check(::occtl_graph_color_unset(myPtr, theTarget.get()));
3313 }
3314
3317 std::vector<std::pair<NodeId, ::occtl_color_rgba_t>> color_entries() const
3318 {
3319 size_t aCount = 0;
3320 check(::occtl_graph_color_entries(myPtr, nullptr, nullptr, 0, &aCount));
3321
3322 std::vector<::occtl_node_id_t> aNodes(aCount);
3323 std::vector<::occtl_color_rgba_t> aColors(aCount);
3324 if (aCount != 0)
3325 {
3326 check(::occtl_graph_color_entries(myPtr, aNodes.data(), aColors.data(), aCount, &aCount));
3327 }
3328
3329 std::vector<std::pair<NodeId, ::occtl_color_rgba_t>> aEntries;
3330 aEntries.reserve(aCount);
3331 for (size_t anIndex = 0; anIndex < aCount; ++anIndex)
3332 {
3333 aEntries.emplace_back(NodeId(aNodes[anIndex]), aColors[anIndex]);
3334 }
3335 return aEntries;
3336 }
3337
3342 void name_set(const NodeId theTarget, const char* const theName, const size_t theNameLen)
3343 {
3344 check(::occtl_graph_name_set(myPtr, theTarget.get(), theName, theNameLen));
3345 }
3346
3351 std::string name_get(const NodeId theTarget) const
3352 {
3353 size_t aRequired = 0;
3354 check(::occtl_graph_name_get(myPtr, theTarget.get(), nullptr, 0, &aRequired));
3355 if (aRequired <= 1)
3356 {
3357 return {};
3358 }
3359 std::string aResult(aRequired - 1, '\0');
3361 theTarget.get(),
3362 aResult.data(),
3363 aResult.size() + 1,
3364 &aRequired));
3365 return aResult;
3366 }
3367
3370 std::vector<NodeId> name_nodes() const
3371 {
3372 size_t aCount = 0;
3373 check(::occtl_graph_name_nodes(myPtr, nullptr, 0, &aCount));
3374
3375 std::vector<::occtl_node_id_t> aRaw(aCount);
3376 if (!aRaw.empty())
3377 {
3378 check(::occtl_graph_name_nodes(myPtr, aRaw.data(), aRaw.size(), &aCount));
3379 }
3380
3381 std::vector<NodeId> aNodes;
3382 aNodes.reserve(aCount);
3383 for (size_t anIndex = 0; anIndex < aCount; ++anIndex)
3384 {
3385 aNodes.emplace_back(aRaw[anIndex]);
3386 }
3387 return aNodes;
3388 }
3389
3393 void material_set(const NodeId theTarget, const MaterialInfo& theInfo)
3394 {
3395 check(::occtl_graph_material_set(myPtr, theTarget.get(), &theInfo));
3396 }
3397
3401 GraphMaterial material_get(const NodeId theTarget) const
3402 {
3403 MaterialInfo anInfo = OCCTL_MATERIAL_INFO_INIT;
3404 size_t aRequired = 0;
3405 check(::occtl_graph_material_get(myPtr, theTarget.get(), &anInfo, nullptr, 0, &aRequired));
3406
3407 GraphMaterial aMaterial;
3408 if (aRequired > 1)
3409 {
3410 aMaterial.name.assign(aRequired - 1, '\0');
3412 theTarget.get(),
3413 &anInfo,
3414 aMaterial.name.data(),
3415 aMaterial.name.size() + 1,
3416 &aRequired));
3417 }
3418 else
3419 {
3420 char aName[1] = {};
3422 theTarget.get(),
3423 &anInfo,
3424 aName,
3425 sizeof(aName),
3426 &aRequired));
3427 aMaterial.name.clear();
3428 }
3429
3430 aMaterial.has_density = anInfo.has_density;
3431 aMaterial.density = anInfo.density;
3432 aMaterial.has_diffuse_color = anInfo.has_diffuse_color;
3433 aMaterial.diffuse_color = anInfo.diffuse_color;
3434 aMaterial.metadata_uid = anInfo.metadata_uid;
3435 return aMaterial;
3436 }
3437
3441 void material_unset(const NodeId theTarget)
3442 {
3443 check(::occtl_graph_material_unset(myPtr, theTarget.get()));
3444 }
3445
3448 std::vector<NodeId> material_nodes() const
3449 {
3450 size_t aCount = 0;
3451 check(::occtl_graph_material_nodes(myPtr, nullptr, 0, &aCount));
3452
3453 std::vector<::occtl_node_id_t> aRaw(aCount);
3454 if (!aRaw.empty())
3455 {
3456 check(::occtl_graph_material_nodes(myPtr, aRaw.data(), aRaw.size(), &aCount));
3457 }
3458
3459 std::vector<NodeId> aNodes;
3460 aNodes.reserve(aCount);
3461 for (size_t anIndex = 0; anIndex < aCount; ++anIndex)
3462 {
3463 aNodes.emplace_back(aRaw[anIndex]);
3464 }
3465 return aNodes;
3466 }
3467
3471 void graph_units_set(const double theLengthUnitToMeter,
3472 const char* const theName,
3473 const size_t theNameLen)
3474 {
3475 check(::occtl_graph_units_set(myPtr, theLengthUnitToMeter, theName, theNameLen));
3476 }
3477
3482 {
3483 GraphUnits aUnits;
3484 size_t aRequired = 0;
3485 check(::occtl_graph_units_get(myPtr, &aUnits.length_unit_to_meter, nullptr, 0, &aRequired));
3486 if (aRequired <= 1)
3487 {
3488 aUnits.name.clear();
3489 return aUnits;
3490 }
3491 aUnits.name.assign(aRequired - 1, '\0');
3493 &aUnits.length_unit_to_meter,
3494 aUnits.name.data(),
3495 aUnits.name.size() + 1,
3496 &aRequired));
3497 return aUnits;
3498 }
3499
3503 void node_metadata_set(const NodeId theTarget,
3504 const char* const theKey,
3505 const size_t theKeyLen,
3506 const char* const theValue,
3507 const size_t theValueLen)
3508 {
3510 theTarget.get(),
3511 theKey,
3512 theKeyLen,
3513 theValue,
3514 theValueLen));
3515 }
3516
3520 std::string node_metadata_get(const NodeId theTarget,
3521 const char* const theKey,
3522 const size_t theKeyLen) const
3523 {
3524 size_t aRequired = 0;
3526 theTarget.get(),
3527 theKey,
3528 theKeyLen,
3529 nullptr,
3530 0,
3531 &aRequired));
3532 if (aRequired <= 1)
3533 {
3534 return {};
3535 }
3536 std::string aResult(aRequired - 1, '\0');
3538 theTarget.get(),
3539 theKey,
3540 theKeyLen,
3541 aResult.data(),
3542 aResult.size() + 1,
3543 &aRequired));
3544 return aResult;
3545 }
3546
3550 std::vector<std::string> node_metadata_keys(const NodeId theTarget) const
3551 {
3552 size_t aCount = 0;
3553 check(::occtl_graph_node_metadata_keys(myPtr, theTarget.get(), nullptr, 0, &aCount));
3554
3555 std::vector<::occtl_metadata_key_view_t> aViews(aCount);
3556 if (!aViews.empty())
3557 {
3559 theTarget.get(),
3560 aViews.data(),
3561 aViews.size(),
3562 &aCount));
3563 }
3564
3565 std::vector<std::string> aKeys;
3566 aKeys.reserve(aCount);
3567 for (const ::occtl_metadata_key_view_t& aView : aViews)
3568 {
3569 aKeys.emplace_back(aView.key, aView.key_len);
3570 }
3571 return aKeys;
3572 }
3573
3576 std::vector<NodeId> node_metadata_nodes() const
3577 {
3578 size_t aCount = 0;
3579 check(::occtl_graph_node_metadata_nodes(myPtr, nullptr, 0, &aCount));
3580
3581 std::vector<::occtl_node_id_t> aRaw(aCount);
3582 if (!aRaw.empty())
3583 {
3584 check(::occtl_graph_node_metadata_nodes(myPtr, aRaw.data(), aRaw.size(), &aCount));
3585 }
3586
3587 std::vector<NodeId> aNodes;
3588 aNodes.reserve(aCount);
3589 for (size_t anIndex = 0; anIndex < aCount; ++anIndex)
3590 {
3591 aNodes.emplace_back(aRaw[anIndex]);
3592 }
3593 return aNodes;
3594 }
3595
3599 void graph_metadata_set(const char* const theKey,
3600 const size_t theKeyLen,
3601 const char* const theValue,
3602 const size_t theValueLen)
3603 {
3604 check(::occtl_graph_metadata_set(myPtr, theKey, theKeyLen, theValue, theValueLen));
3605 }
3606
3610 std::string graph_metadata_get(const char* const theKey, const size_t theKeyLen) const
3611 {
3612 size_t aRequired = 0;
3613 check(::occtl_graph_metadata_get(myPtr, theKey, theKeyLen, nullptr, 0, &aRequired));
3614 if (aRequired <= 1)
3615 {
3616 return {};
3617 }
3618 std::string aResult(aRequired - 1, '\0');
3620 theKey,
3621 theKeyLen,
3622 aResult.data(),
3623 aResult.size() + 1,
3624 &aRequired));
3625 return aResult;
3626 }
3627
3630 std::vector<std::string> graph_metadata_keys() const
3631 {
3632 size_t aCount = 0;
3633 check(::occtl_graph_metadata_keys(myPtr, nullptr, 0, &aCount));
3634
3635 std::vector<::occtl_metadata_key_view_t> aViews(aCount);
3636 if (!aViews.empty())
3637 {
3638 check(::occtl_graph_metadata_keys(myPtr, aViews.data(), aViews.size(), &aCount));
3639 }
3640
3641 std::vector<std::string> aKeys;
3642 aKeys.reserve(aCount);
3643 for (const ::occtl_metadata_key_view_t& aView : aViews)
3644 {
3645 aKeys.emplace_back(aView.key, aView.key_len);
3646 }
3647 return aKeys;
3648 }
3649
3652 void graph_metadata_unset(const char* const theKey, const size_t theKeyLen)
3653 {
3654 check(::occtl_graph_metadata_unset(myPtr, theKey, theKeyLen));
3655 }
3656
3660 void node_metadata_unset(const NodeId theTarget, const char* const theKey, const size_t theKeyLen)
3661 {
3662 check(::occtl_graph_node_metadata_unset(myPtr, theTarget.get(), theKey, theKeyLen));
3663 }
3664
3668 void tag_add(const NodeId theTarget, const char* const theTag, const size_t theTagLen)
3669 {
3670 check(::occtl_graph_tag_add(myPtr, theTarget.get(), theTag, theTagLen));
3671 }
3672
3676 void tag_remove(const NodeId theTarget, const char* const theTag, const size_t theTagLen)
3677 {
3678 check(::occtl_graph_tag_remove(myPtr, theTarget.get(), theTag, theTagLen));
3679 }
3680
3684 bool tag_has(const NodeId theTarget, const char* const theTag, const size_t theTagLen) const
3685 {
3686 int32_t hasTag = 0;
3687 check(::occtl_graph_tag_has(myPtr, theTarget.get(), theTag, theTagLen, &hasTag));
3688 return hasTag != 0;
3689 }
3690
3694 std::vector<std::string> tag_list(const NodeId theTarget) const
3695 {
3696 size_t aCount = 0;
3697 check(::occtl_graph_tag_list(myPtr, theTarget.get(), nullptr, 0, &aCount));
3698
3699 std::vector<::occtl_tag_view_t> aViews(aCount);
3700 if (!aViews.empty())
3701 {
3702 check(::occtl_graph_tag_list(myPtr, theTarget.get(), aViews.data(), aViews.size(), &aCount));
3703 }
3704
3705 std::vector<std::string> aTags;
3706 aTags.reserve(aCount);
3707 for (const ::occtl_tag_view_t& aView : aViews)
3708 {
3709 aTags.emplace_back(aView.tag, aView.tag_len);
3710 }
3711 return aTags;
3712 }
3713
3716 std::vector<NodeId> tag_nodes(const char* const theTag = nullptr,
3717 const size_t theTagLen = 0) const
3718 {
3719 size_t aCount = 0;
3720 check(::occtl_graph_tag_nodes(myPtr, theTag, theTagLen, nullptr, 0, &aCount));
3721
3722 std::vector<::occtl_node_id_t> aRaw(aCount);
3723 if (!aRaw.empty())
3724 {
3725 check(::occtl_graph_tag_nodes(myPtr, theTag, theTagLen, aRaw.data(), aRaw.size(), &aCount));
3726 }
3727
3728 std::vector<NodeId> aNodes;
3729 aNodes.reserve(aCount);
3730 for (size_t anIndex = 0; anIndex < aCount; ++anIndex)
3731 {
3732 aNodes.emplace_back(aRaw[anIndex]);
3733 }
3734 return aNodes;
3735 }
3736
3742 {
3743 ::occtl_joint_id_t aJoint = OCCTL_JOINT_ID_INVALID;
3744 check(::occtl_joint_create(myPtr, &theInfo, &aJoint));
3745 return JointId(aJoint);
3746 }
3747
3751 JointInfo joint_get(const JointId theJoint) const
3752 {
3753 JointInfo anInfo = OCCTL_JOINT_INFO_INIT;
3754 check(::occtl_joint_get(myPtr, theJoint.get(), &anInfo));
3755 return anInfo;
3756 }
3757
3761 void joint_remove(const JointId theJoint) { check(::occtl_joint_remove(myPtr, theJoint.get())); }
3762
3766 std::vector<JointId> joint_list(const NodeId theNode = NodeId::invalid()) const
3767 {
3768 size_t aCount = 0;
3769 check(::occtl_joint_list(myPtr, theNode.get(), nullptr, 0, &aCount));
3770 std::vector<::occtl_joint_id_t> aIds(aCount);
3771 if (aCount != 0)
3772 {
3773 check(::occtl_joint_list(myPtr, theNode.get(), aIds.data(), aIds.size(), &aCount));
3774 }
3775 std::vector<JointId> aResult;
3776 aResult.reserve(aIds.size());
3777 for (const ::occtl_joint_id_t& anId : aIds)
3778 {
3779 aResult.emplace_back(anId);
3780 }
3781 return aResult;
3782 }
3783
3787 void clear_cached(const NodeId theNode)
3788 {
3789 check(::occtl_graph_clear_cached(myPtr, theNode.get(), OCCTL_REF_ID_INVALID));
3790 }
3791
3795 void clear_cached(const RefId theRef)
3796 {
3798 }
3799
3804 {
3805 ::occtl_select_bbox_t aBox{};
3806 check(::occtl_graph_bbox_get(myPtr, theNode.get(), &aBox));
3807 return aBox;
3808 }
3809
3814 {
3815 ::occtl_graph_obb_t aBox{};
3816 check(::occtl_graph_obb_get(myPtr, theNode.get(), &aBox));
3817 return aBox;
3818 }
3819
3824 {
3825 ::occtl_graph_uv_bounds_t aBounds{};
3826 check(::occtl_graph_face_uv_bounds_get(myPtr, theFace.get(), &aBounds));
3827 return aBounds;
3828 }
3829
3833 double measure_get(const NodeId theNode, const SelectMeasureKind theKind)
3834 {
3835 double aValue = 0.0;
3836 check(::occtl_graph_measure_get(myPtr, theNode.get(), theKind, &aValue));
3837 return aValue;
3838 }
3839
3844 {
3845 ::occtl_graph_mass_properties_t aProperties{};
3846 check(::occtl_graph_mass_properties_get(myPtr, theNode.get(), &aProperties));
3847 return aProperties;
3848 }
3849
3854 {
3856 check(::occtl_graph_edge_curve_kind_get(myPtr, theEdge.get(), &aKind));
3857 return aKind;
3858 }
3859
3864 {
3866 check(::occtl_graph_face_surface_kind_get(myPtr, theFace.get(), &aKind));
3867 return aKind;
3868 }
3869
3873 std::vector<NodeId> descendant_vertices_get(const NodeId theNode)
3874 {
3875 size_t aCount = 0;
3876 check(::occtl_graph_descendant_vertices_get(myPtr, theNode.get(), nullptr, 0, &aCount));
3877 std::vector<::occtl_node_id_t> aIds(aCount);
3878 if (aCount != 0)
3879 {
3881 theNode.get(),
3882 aIds.data(),
3883 aIds.size(),
3884 &aCount));
3885 }
3886 std::vector<NodeId> aResult;
3887 aResult.reserve(aIds.size());
3888 for (const ::occtl_node_id_t& anId : aIds)
3889 {
3890 aResult.emplace_back(anId);
3891 }
3892 return aResult;
3893 }
3894
3898 std::vector<NodeId> descendant_edges_get(const NodeId theNode)
3899 {
3900 size_t aCount = 0;
3901 check(::occtl_graph_descendant_edges_get(myPtr, theNode.get(), nullptr, 0, &aCount));
3902 std::vector<::occtl_node_id_t> aIds(aCount);
3903 if (aCount != 0)
3904 {
3906 theNode.get(),
3907 aIds.data(),
3908 aIds.size(),
3909 &aCount));
3910 }
3911 std::vector<NodeId> aResult;
3912 aResult.reserve(aIds.size());
3913 for (const ::occtl_node_id_t& anId : aIds)
3914 {
3915 aResult.emplace_back(anId);
3916 }
3917 return aResult;
3918 }
3919
3923 std::vector<NodeId> descendant_faces_get(const NodeId theNode)
3924 {
3925 size_t aCount = 0;
3926 check(::occtl_graph_descendant_faces_get(myPtr, theNode.get(), nullptr, 0, &aCount));
3927 std::vector<::occtl_node_id_t> aIds(aCount);
3928 if (aCount != 0)
3929 {
3931 theNode.get(),
3932 aIds.data(),
3933 aIds.size(),
3934 &aCount));
3935 }
3936 std::vector<NodeId> aResult;
3937 aResult.reserve(aIds.size());
3938 for (const ::occtl_node_id_t& anId : aIds)
3939 {
3940 aResult.emplace_back(anId);
3941 }
3942 return aResult;
3943 }
3944
3948 std::vector<NodeId> descendants_get(const NodeId theNode, const NodeKind theKind)
3949 {
3950 size_t aCount = 0;
3951 check(::occtl_graph_descendants_get(myPtr, theNode.get(), theKind, nullptr, 0, &aCount));
3952 std::vector<::occtl_node_id_t> aIds(aCount);
3953 if (aCount != 0)
3954 {
3956 theNode.get(),
3957 theKind,
3958 aIds.data(),
3959 aIds.size(),
3960 &aCount));
3961 }
3962 std::vector<NodeId> aResult;
3963 aResult.reserve(aIds.size());
3964 for (const ::occtl_node_id_t& anId : aIds)
3965 {
3966 aResult.emplace_back(anId);
3967 }
3968 return aResult;
3969 }
3970
3974 std::vector<NodeId> adjacent_faces_get(const NodeId theFace)
3975 {
3976 size_t aCount = 0;
3977 check(::occtl_graph_adjacent_faces_get(myPtr, theFace.get(), nullptr, 0, &aCount));
3978 std::vector<::occtl_node_id_t> aIds(aCount);
3979 if (aCount != 0)
3980 {
3981 check(
3982 ::occtl_graph_adjacent_faces_get(myPtr, theFace.get(), aIds.data(), aIds.size(), &aCount));
3983 }
3984 std::vector<NodeId> aResult;
3985 aResult.reserve(aIds.size());
3986 for (const ::occtl_node_id_t& anId : aIds)
3987 {
3988 aResult.emplace_back(anId);
3989 }
3990 return aResult;
3991 }
3992
3996 std::vector<NodeId> adjacent_edges_get(const NodeId theEdge)
3997 {
3998 size_t aCount = 0;
3999 check(::occtl_graph_adjacent_edges_get(myPtr, theEdge.get(), nullptr, 0, &aCount));
4000 std::vector<::occtl_node_id_t> aIds(aCount);
4001 if (aCount != 0)
4002 {
4003 check(
4004 ::occtl_graph_adjacent_edges_get(myPtr, theEdge.get(), aIds.data(), aIds.size(), &aCount));
4005 }
4006 std::vector<NodeId> aResult;
4007 aResult.reserve(aIds.size());
4008 for (const ::occtl_node_id_t& anId : aIds)
4009 {
4010 aResult.emplace_back(anId);
4011 }
4012 return aResult;
4013 }
4014
4018 double pair_distance_get(const NodeId theFirst, const NodeId theSecond)
4019 {
4020 double aDistance = 0.0;
4021 check(::occtl_graph_pair_distance_get(myPtr, theFirst.get(), theSecond.get(), &aDistance));
4022 return aDistance;
4023 }
4024
4029 NodeId make_product(const ::occtl_topo_make_product_info_t& theInfo)
4030 {
4031 ::occtl_node_id_t anId;
4032 check(::occtl_topo_make_product(myPtr, &theInfo, &anId));
4033 return NodeId(anId);
4034 }
4035
4039 void link_product_to_topology(const NodeId theProduct,
4040 const NodeId theRoot,
4041 const ::occtl_transform_t& thePlacement)
4042 {
4043 check(::occtl_topo_link_product(myPtr, theProduct.get(), theRoot.get(), thePlacement));
4044 }
4045
4050 const NodeId theRoot,
4051 const ::occtl_transform_t& thePlacement)
4052 {
4053 ::occtl_node_id_t anOccurrence{};
4055 theProduct.get(),
4056 theRoot.get(),
4057 thePlacement,
4058 &anOccurrence));
4059 return NodeId(anOccurrence);
4060 }
4061
4065 void link_products(const NodeId theParentProduct,
4066 const NodeId theChildProduct,
4067 const ::occtl_transform_t& thePlacement,
4068 const NodeId theParentOccurrence = NodeId(OCCTL_NODE_ID_INVALID))
4069 {
4071 theParentProduct.get(),
4072 theChildProduct.get(),
4073 thePlacement,
4074 theParentOccurrence.get()));
4075 }
4076
4081 const NodeId theParentProduct,
4082 const NodeId theChildProduct,
4083 const ::occtl_transform_t& thePlacement,
4084 const NodeId theParentOccurrence = NodeId(OCCTL_NODE_ID_INVALID))
4085 {
4086 ::occtl_node_id_t anOccurrence{};
4088 theParentProduct.get(),
4089 theChildProduct.get(),
4090 thePlacement,
4091 theParentOccurrence.get(),
4092 &anOccurrence));
4093 return NodeId(anOccurrence);
4094 }
4095
4099 void remove_occurrence(const RefId& theOccurrenceRef)
4100 {
4101 check(::occtl_topo_remove_occurrence(myPtr, theOccurrenceRef.get()));
4102 }
4103
4107 void occurrence_transform_set(const NodeId theOccurrence, const ::occtl_transform_t& theTransform)
4108 {
4109 check(::occtl_topo_occurrence_set_transform(myPtr, theOccurrence.get(), theTransform));
4110 }
4111
4116 {
4117 ::occtl_transform_t aTransform;
4118 check(::occtl_topo_occurrence_transform(myPtr, theOccurrence.get(), &aTransform));
4119 return aTransform;
4120 }
4121
4126 const NodeId theOccurrence) const
4127 {
4128 ::occtl_transform_t aTransform;
4130 theRoot.get(),
4131 theOccurrence.get(),
4132 &aTransform));
4133 return aTransform;
4134 }
4135
4138 void shell_add_face(const NodeId theShell,
4139 const NodeId theFace,
4140 const ::occtl_orientation_t theOrientation)
4141 {
4142 check(::occtl_topo_shell_add_face(myPtr, theShell.get(), theFace.get(), theOrientation));
4143 }
4144
4147 void shell_remove_face(const NodeId theShell, const NodeId theFace)
4148 {
4149 check(::occtl_topo_shell_remove_face(myPtr, theShell.get(), theFace.get()));
4150 }
4151
4154 void face_add_holes(const NodeId theFace, const std::vector<NodeId>& theHoles)
4155 {
4156 std::vector<::occtl_node_id_t> aRaw;
4157 aRaw.reserve(theHoles.size());
4158 for (const NodeId& aHole : theHoles)
4159 {
4160 aRaw.push_back(aHole.get());
4161 }
4163 theFace.get(),
4164 aRaw.empty() ? nullptr : aRaw.data(),
4165 aRaw.size()));
4166 }
4167
4170 void face_remove_holes(const NodeId theFace)
4171 {
4172 check(::occtl_topo_face_remove_holes(myPtr, theFace.get(), nullptr, 0));
4173 }
4174
4177 void face_remove_holes(const NodeId theFace, const std::vector<NodeId>& theHoles)
4178 {
4179 std::vector<::occtl_node_id_t> aRaw;
4180 aRaw.reserve(theHoles.size());
4181 for (const NodeId& aHole : theHoles)
4182 {
4183 aRaw.push_back(aHole.get());
4184 }
4186 theFace.get(),
4187 aRaw.empty() ? nullptr : aRaw.data(),
4188 aRaw.size()));
4189 }
4190
4193 void solid_add_shell(const NodeId theSolid,
4194 const NodeId theShell,
4195 const ::occtl_orientation_t theOrientation)
4196 {
4197 check(::occtl_topo_solid_add_shell(myPtr, theSolid.get(), theShell.get(), theOrientation));
4198 }
4199
4202 void solid_remove_shell(const NodeId theSolid, const NodeId theShell)
4203 {
4204 check(::occtl_topo_solid_remove_shell(myPtr, theSolid.get(), theShell.get()));
4205 }
4206
4209 void compound_add_child(const NodeId theCompound,
4210 const NodeId theChild,
4211 const ::occtl_orientation_t theOrientation)
4212 {
4213 check(
4214 ::occtl_topo_compound_add_child(myPtr, theCompound.get(), theChild.get(), theOrientation));
4215 }
4216
4219 void compound_remove_child(const NodeId theCompound, const NodeId theChild)
4220 {
4221 check(::occtl_topo_compound_remove_child(myPtr, theCompound.get(), theChild.get()));
4222 }
4223
4230
4234 EdgeSplitResult edge_split(const NodeId theEdge, const double theParameter)
4235 {
4236 ::occtl_node_id_t aE1{};
4237 ::occtl_node_id_t aE2{};
4238 check(::occtl_topo_edge_split(myPtr, theEdge.get(), theParameter, &aE1, &aE2));
4239 return {NodeId(aE1), NodeId(aE2)};
4240 }
4241
4244 void edge_add_internal_vertex(const NodeId theEdge, const NodeId theVertex)
4245 {
4246 check(::occtl_topo_edge_add_internal_vertex(myPtr, theEdge.get(), theVertex.get()));
4247 }
4248
4251 void edge_remove_vertex(const NodeId theEdge, const NodeId theVertex)
4252 {
4253 check(::occtl_topo_edge_remove_vertex(myPtr, theEdge.get(), theVertex.get()));
4254 }
4255
4258 void replace_edge_curve(const NodeId theEdge, const ::occtl_rep_id_t theCurveId)
4259 {
4260 check(::occtl_topo_replace_edge_curve(myPtr, theEdge.get(), theCurveId));
4261 }
4262
4265 void replace_face_surface(const NodeId theFace, const ::occtl_rep_id_t theSurfaceId)
4266 {
4267 check(::occtl_topo_replace_face_surface(myPtr, theFace.get(), theSurfaceId));
4268 }
4269
4272 void replace_coedge_pcurve(const NodeId theCoedge, const ::occtl_rep_id_t thePcurveId)
4273 {
4274 check(::occtl_topo_replace_coedge_pcurve(myPtr, theCoedge.get(), thePcurveId));
4275 }
4276
4279 void add_pcurve(const NodeId theEdge,
4280 const NodeId theFace,
4281 const ::occtl_rep_id_t thePcurveId,
4282 const double theFirst,
4283 const double theLast,
4284 const ::occtl_orientation_t theOrientation)
4285 {
4287 theEdge.get(),
4288 theFace.get(),
4289 thePcurveId,
4290 theFirst,
4291 theLast,
4292 theOrientation));
4293 }
4294
4298 const NodeId theFaceA,
4299 const NodeId theFaceB) const
4300 {
4302 check(
4303 ::occtl_topo_edge_continuity(myPtr, theEdge.get(), theFaceA.get(), theFaceB.get(), &aCont));
4304 return aCont;
4305 }
4306
4309 bool edge_has_continuity(const NodeId theEdge, const NodeId theFaceA, const NodeId theFaceB) const
4310 {
4311 int32_t aFlag = 0;
4313 theEdge.get(),
4314 theFaceA.get(),
4315 theFaceB.get(),
4316 &aFlag));
4317 return aFlag != 0;
4318 }
4319
4323 {
4325 check(::occtl_topo_edge_max_continuity(myPtr, theEdge.get(), &aCont));
4326 return aCont;
4327 }
4328
4332 {
4333 ::occtl_orientation_t anOri{};
4334 check(::occtl_topo_coedge_orientation(myPtr, theCoedge.get(), &anOri));
4335 return anOri;
4336 }
4337
4340 NodeId edge_find_coedge_on_face(const NodeId theEdge, const NodeId theFace) const
4341 {
4342 ::occtl_node_id_t aCoedge{};
4343 check(::occtl_topo_edge_find_coedge_on_face(myPtr, theEdge.get(), theFace.get(), &aCoedge));
4344 return NodeId(aCoedge);
4345 }
4346
4350 const NodeId theFace,
4351 const ::occtl_orientation_t theOrientation) const
4352 {
4353 ::occtl_node_id_t aCoedge{};
4355 theEdge.get(),
4356 theFace.get(),
4357 theOrientation,
4358 &aCoedge));
4359 return NodeId(aCoedge);
4360 }
4361
4364 ::occtl_point3_t vertex_point_in_usage(const NodeId theVertex, const NodeId theParent) const
4365 {
4366 ::occtl_point3_t aPoint{};
4367 check(::occtl_topo_vertex_point_in_usage(myPtr, theVertex.get(), theParent.get(), &aPoint));
4368 return aPoint;
4369 }
4370
4373 double vertex_pcurve_parameter(const NodeId theVertex, const NodeId theCoedge) const
4374 {
4375 double aU = 0.0;
4376 check(::occtl_topo_vertex_pcurve_parameter(myPtr, theVertex.get(), theCoedge.get(), &aU));
4377 return aU;
4378 }
4379
4382 bool edge_has_polygon3d(const NodeId theEdge) const
4383 {
4384 int32_t aFlag = 0;
4385 check(::occtl_topo_edge_has_polygon3d(myPtr, theEdge.get(), &aFlag));
4386 return aFlag != 0;
4387 }
4388
4391 bool coedge_has_polygon_on_surface(const NodeId theCoedge) const
4392 {
4393 int32_t aFlag = 0;
4394 check(::occtl_topo_coedge_has_polygon_on_surface(myPtr, theCoedge.get(), &aFlag));
4395 return aFlag != 0;
4396 }
4397
4401 const double theUMin,
4402 const double theUMax,
4403 const double theVMin,
4404 const double theVMax,
4405 const double theU,
4406 const double theV,
4407 ::occtl_point3_t& theOutPoint,
4408 ::occtl_vector3_t& theOutD1U,
4409 ::occtl_vector3_t& theOutD1V) const
4410 {
4412 theFace.get(),
4413 theUMin,
4414 theUMax,
4415 theVMin,
4416 theVMax,
4417 theU,
4418 theV,
4419 &theOutPoint,
4420 &theOutD1U,
4421 &theOutD1V));
4422 }
4423
4429 std::pair<Graph, NodeId> fillet(const ::occtl_topo_fillet_options_t& theOpts)
4430 {
4431 ::occtl_graph_t* aOutGraph = nullptr;
4432 ::occtl_node_id_t aOutRoot{};
4433 check(::occtl_topo_fillet(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4434 return {Graph(aOutGraph), NodeId(aOutRoot)};
4435 }
4436
4444 std::pair<Graph, NodeId> blend_edges(const NodeId theRoot,
4445 const std::vector<NodeId>& theEdges,
4446 const ::occtl_topo_edge_blend_options_t& theOpts) const
4447 {
4448 std::vector<::occtl_node_id_t> aEdges;
4449 aEdges.reserve(theEdges.size());
4450 for (const NodeId& anEdge : theEdges)
4451 {
4452 aEdges.push_back(anEdge.get());
4453 }
4454
4455 ::occtl_topo_edge_blend_options_t aOpts = theOpts;
4456 aOpts.root = theRoot.get();
4457 aOpts.edges = aEdges.data();
4458 aOpts.edge_count = aEdges.size();
4459
4460 ::occtl_graph_t* aOutGraph = nullptr;
4461 ::occtl_node_id_t aOutRoot{};
4462 check(::occtl_topo_blend_edges(myPtr, &aOpts, &aOutGraph, &aOutRoot));
4463 return {Graph(aOutGraph), NodeId(aOutRoot)};
4464 }
4465
4468 std::pair<Graph, NodeId> fillet_edges(const NodeId theRoot,
4469 const std::vector<NodeId>& theEdges,
4470 const double theRadius) const
4471 {
4472 ::occtl_topo_edge_blend_options_t aOpts = OCCTL_TOPO_EDGE_BLEND_OPTIONS_INIT;
4473 aOpts.radius = theRadius;
4474 aOpts.chamfer_mode = 0;
4475 return blend_edges(theRoot, theEdges, aOpts);
4476 }
4477
4480 std::pair<Graph, NodeId> chamfer_edges(const NodeId theRoot,
4481 const std::vector<NodeId>& theEdges,
4482 const double theDist1,
4483 const double theDist2) const
4484 {
4485 ::occtl_topo_edge_blend_options_t aOpts = OCCTL_TOPO_EDGE_BLEND_OPTIONS_INIT;
4486 aOpts.chamfer_mode = 1;
4487 aOpts.chamfer_dist1 = theDist1;
4488 aOpts.chamfer_dist2 = theDist2;
4489 return blend_edges(theRoot, theEdges, aOpts);
4490 }
4491
4495 double max_fillet_radius(const NodeId theRoot,
4496 const std::vector<NodeId>& theEdges,
4497 const ::occtl_topo_max_fillet_radius_options_t& theOpts) const
4498 {
4499 std::vector<::occtl_node_id_t> aEdges;
4500 aEdges.reserve(theEdges.size());
4501 for (const NodeId& anEdge : theEdges)
4502 {
4503 aEdges.push_back(anEdge.get());
4504 }
4505
4507 aOpts.root = theRoot.get();
4508 aOpts.edges = aEdges.data();
4509 aOpts.edge_count = aEdges.size();
4510
4511 double aRadius = 0.0;
4512 check(::occtl_topo_max_fillet_radius(myPtr, &aOpts, &aRadius));
4513 return aRadius;
4514 }
4515
4519 std::pair<Graph, NodeId> transformed(const NodeId theRoot, const Transform& theTransform) const
4520 {
4521 ::occtl_graph_t* aOutGraph = nullptr;
4522 ::occtl_node_id_t aOutRoot{};
4523 check(
4524 ::occtl_topo_transformed(myPtr, theRoot.get(), theTransform.c_type(), &aOutGraph, &aOutRoot));
4525 return {Graph(aOutGraph), NodeId(aOutRoot)};
4526 }
4527
4531 std::pair<Graph, NodeId> project_on_face(
4532 const ::occtl_topo_project_on_face_options_t& theOpts) const
4533 {
4534 ::occtl_graph_t* aOutGraph = nullptr;
4535 ::occtl_node_id_t aOutRoot{};
4536 check(::occtl_topo_project_on_face(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4537 return {Graph(aOutGraph), NodeId(aOutRoot)};
4538 }
4539
4543 std::pair<Graph, NodeId> wrap_on_face(const ::occtl_topo_wrap_on_face_options_t& theOpts) const
4544 {
4545 ::occtl_graph_t* aOutGraph = nullptr;
4546 ::occtl_node_id_t aOutRoot{};
4547 check(::occtl_topo_wrap_on_face(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4548 return {Graph(aOutGraph), NodeId(aOutRoot)};
4549 }
4550
4554 std::pair<Graph, NodeId> project_face_along_direction(
4555 const ::occtl_topo_project_face_direction_options_t& theOpts) const
4556 {
4557 ::occtl_graph_t* aOutGraph = nullptr;
4558 ::occtl_node_id_t aOutRoot{};
4559 check(::occtl_topo_project_face_along_direction(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4560 return {Graph(aOutGraph), NodeId(aOutRoot)};
4561 }
4562
4566 std::pair<Graph, NodeId> face_to_arcs(const ::occtl_topo_face_to_arcs_options_t& theOpts) const
4567 {
4568 ::occtl_graph_t* aOutGraph = nullptr;
4569 ::occtl_node_id_t aOutRoot{};
4570 check(::occtl_topo_face_to_arcs(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4571 return {Graph(aOutGraph), NodeId(aOutRoot)};
4572 }
4573
4578 std::pair<Graph, HlrCategoryRoots> hlr_project(const ::occtl_topo_hlr_options_t& theOpts) const
4579 {
4581 check(::occtl_topo_make_hlr_projection(myPtr, &theOpts, &aResult));
4582 HlrCategoryRoots aRoots;
4583 aRoots.visible_sharp = NodeId(aResult.visible_sharp);
4584 aRoots.visible_smooth = NodeId(aResult.visible_smooth);
4585 aRoots.visible_seam = NodeId(aResult.visible_seam);
4586 aRoots.visible_outline = NodeId(aResult.visible_outline);
4587 aRoots.hidden_sharp = NodeId(aResult.hidden_sharp);
4588 aRoots.hidden_smooth = NodeId(aResult.hidden_smooth);
4589 aRoots.hidden_seam = NodeId(aResult.hidden_seam);
4590 aRoots.hidden_outline = NodeId(aResult.hidden_outline);
4591 return {Graph(aResult.graph), aRoots};
4592 }
4593
4597 std::pair<Graph, NodeId> draft_faces(const ::occtl_topo_draft_faces_options_t& theOpts) const
4598 {
4599 ::occtl_graph_t* aOutGraph = nullptr;
4600 ::occtl_node_id_t aOutRoot{};
4601 check(::occtl_topo_draft_faces(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4602 return {Graph(aOutGraph), NodeId(aOutRoot)};
4603 }
4604
4612 std::pair<Graph, NodeId> remove_features(const NodeId theRoot,
4613 const std::vector<NodeId>& theSelections,
4614 const bool theParallel = false) const
4615 {
4616 std::vector<::occtl_node_id_t> aSelections;
4617 aSelections.reserve(theSelections.size());
4618 for (const NodeId& aSelection : theSelections)
4619 {
4620 aSelections.push_back(aSelection.get());
4621 }
4622
4623 ::occtl_topo_defeature_options_t aOpts = OCCTL_TOPO_DEFEATURE_OPTIONS_INIT;
4624 aOpts.root = theRoot.get();
4625 aOpts.selections = aSelections.data();
4626 aOpts.selection_count = aSelections.size();
4627 aOpts.parallel = theParallel ? 1 : 0;
4628
4629 ::occtl_graph_t* aOutGraph = nullptr;
4630 ::occtl_node_id_t aOutRoot{};
4631 check(::occtl_topo_defeature(myPtr, &aOpts, &aOutGraph, &aOutRoot));
4632 return {Graph(aOutGraph), NodeId(aOutRoot)};
4633 }
4634
4638 std::pair<Graph, NodeId> remove_features(const ::occtl_topo_defeature_options_t& theOpts) const
4639 {
4640 ::occtl_graph_t* aOutGraph = nullptr;
4641 ::occtl_node_id_t aOutRoot{};
4642 check(::occtl_topo_defeature(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4643 return {Graph(aOutGraph), NodeId(aOutRoot)};
4644 }
4645
4654 std::pair<Graph, NodeId> offset_features(const NodeId theRoot,
4655 const std::vector<NodeId>& theSelections,
4656 const double theSelectionOffset,
4657 const double theBaseOffset = 0.0) const
4658 {
4659 std::vector<::occtl_node_id_t> aSelections;
4660 aSelections.reserve(theSelections.size());
4661 for (const NodeId& aSelection : theSelections)
4662 {
4663 aSelections.push_back(aSelection.get());
4664 }
4665
4666 ::occtl_topo_offset_features_options_t aOpts = OCCTL_TOPO_OFFSET_FEATURES_OPTIONS_INIT;
4667 aOpts.root = theRoot.get();
4668 aOpts.selections = aSelections.data();
4669 aOpts.selection_count = aSelections.size();
4670 aOpts.selection_offset = theSelectionOffset;
4671 aOpts.base_offset = theBaseOffset;
4672
4673 ::occtl_graph_t* aOutGraph = nullptr;
4674 ::occtl_node_id_t aOutRoot{};
4675 check(::occtl_topo_make_offset_features(myPtr, &aOpts, &aOutGraph, &aOutRoot));
4676 return {Graph(aOutGraph), NodeId(aOutRoot)};
4677 }
4678
4682 std::pair<Graph, NodeId> offset_features(
4683 const ::occtl_topo_offset_features_options_t& theOpts) const
4684 {
4685 ::occtl_graph_t* aOutGraph = nullptr;
4686 ::occtl_node_id_t aOutRoot{};
4687 check(::occtl_topo_make_offset_features(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4688 return {Graph(aOutGraph), NodeId(aOutRoot)};
4689 }
4690
4694 std::pair<Graph, NodeId> make_filling(const ::occtl_topo_filling_options_t& theOpts) const
4695 {
4696 ::occtl_graph_t* aOutGraph = nullptr;
4697 ::occtl_node_id_t aOutRoot{};
4698 check(::occtl_topo_make_filling(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4699 return {Graph(aOutGraph), NodeId(aOutRoot)};
4700 }
4701
4705 std::pair<Graph, NodeId> make_filling_patch(
4706 const ::occtl_topo_filling_patch_options_t& theOpts) const
4707 {
4708 ::occtl_graph_t* aOutGraph = nullptr;
4709 ::occtl_node_id_t aOutRoot{};
4710 check(::occtl_topo_make_filling_patch(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4711 return {Graph(aOutGraph), NodeId(aOutRoot)};
4712 }
4713
4715 std::pair<Graph, NodeId> translated(const NodeId theRoot, const Vector3& theDelta) const
4716 {
4717 return transformed(theRoot, Transform::translation(theDelta));
4718 }
4719
4721 std::pair<Graph, NodeId> rotated(const NodeId theRoot,
4722 const Axis1Placement& theAxis,
4723 const double theAngle) const
4724 {
4725 return transformed(theRoot, Transform::rotation(theAxis, theAngle));
4726 }
4727
4729 std::pair<Graph, NodeId> scaled(const NodeId theRoot,
4730 const Point3& theCenter,
4731 const double theFactor) const
4732 {
4733 return transformed(theRoot, Transform::scale(theCenter, theFactor));
4734 }
4735
4743 std::pair<Graph, NodeId> mirror(const NodeId theRoot,
4744 const ::occtl_point3_t& thePoint,
4745 const ::occtl_direction3_t& theNormal) const
4746 {
4747 ::occtl_graph_t* aOutGraph = nullptr;
4748 ::occtl_node_id_t aOutRoot{};
4749 check(::occtl_topo_mirrored(myPtr, theRoot.get(), thePoint, theNormal, &aOutGraph, &aOutRoot));
4750 return {Graph(aOutGraph), NodeId(aOutRoot)};
4751 }
4752
4759 std::pair<Graph, NodeId> split_by_plane(
4760 const ::occtl_topo_split_by_plane_options_t& theOpts) const
4761 {
4762 ::occtl_graph_t* aOutGraph = nullptr;
4763 ::occtl_node_id_t aOutRoot{};
4764 check(::occtl_topo_make_split_by_plane(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4765 return {Graph(aOutGraph), NodeId(aOutRoot)};
4766 }
4767
4774 std::pair<Graph, NodeId> section_by_planes(
4775 const ::occtl_topo_section_by_planes_options_t& theOpts) const
4776 {
4777 ::occtl_graph_t* aOutGraph = nullptr;
4778 ::occtl_node_id_t aOutRoot{};
4779 check(::occtl_topo_make_sections_by_planes(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4780 return {Graph(aOutGraph), NodeId(aOutRoot)};
4781 }
4782
4788 std::pair<Graph, NodeId> extrude_faces_to_solids(
4789 const ::occtl_topo_extrude_faces_options_t& theOpts) const
4790 {
4791 occtl_graph_t* aOutGraph = nullptr;
4793 check(::occtl_topo_make_face_extrusion(myPtr, &theOpts, &aOutGraph, &aOutRoot));
4794 return {Graph(aOutGraph), NodeId(aOutRoot)};
4795 }
4796
4804 std::pair<Graph, NodeId> linear_pattern(
4805 const NodeId theRoot,
4806 const ::occtl_topo_linear_pattern_options_t& theOpts) const
4807 {
4808 ::occtl_graph_t* aOutGraph = nullptr;
4809 ::occtl_node_id_t aOutRoot{};
4810 check(::occtl_topo_make_linear_pattern(myPtr, theRoot.get(), &theOpts, &aOutGraph, &aOutRoot));
4811 return {Graph(aOutGraph), NodeId(aOutRoot)};
4812 }
4813
4821 std::pair<Graph, NodeId> circular_pattern(
4822 const NodeId theRoot,
4823 const ::occtl_topo_circular_pattern_options_t& theOpts) const
4824 {
4825 ::occtl_graph_t* aOutGraph = nullptr;
4826 ::occtl_node_id_t aOutRoot{};
4827 check(
4828 ::occtl_topo_make_circular_pattern(myPtr, theRoot.get(), &theOpts, &aOutGraph, &aOutRoot));
4829 return {Graph(aOutGraph), NodeId(aOutRoot)};
4830 }
4831
4832 template <typename Fn>
4833 void for_each(const uint64_t theKindMask, Fn theFn) const
4834 {
4835 driveVisitorMask(::occtl_graph_for_each, theKindMask, theFn);
4836 }
4837
4838 template <typename Fn>
4839 void for_each_ref(const uint64_t theRefKindMask, Fn theFn) const
4840 {
4841 driveRefVisitor(::occtl_graph_for_each_ref, theRefKindMask, theFn);
4842 }
4843
4844 template <typename Fn>
4845 void for_each_rep(const uint64_t theRepKindMask, Fn theFn) const
4846 {
4847 driveRepVisitor(::occtl_graph_for_each_rep, theRepKindMask, theFn);
4848 }
4849
4850 template <typename Fn>
4851 void for_each_related(const NodeId theNode, Fn theFn) const
4852 {
4853 driveChildVisitor(::occtl_topo_for_each_related, theNode, theFn);
4854 }
4855
4856private:
4858 template <typename Fn>
4859 struct VisitorBridge
4860 {
4861 Fn* fn;
4862 std::exception_ptr exc;
4863 };
4864
4865 template <typename Fn>
4866 static ::occtl_status_t OCCTL_CALL visitorTrampoline(const ::occtl_node_id_t theId,
4867 void* const theUser)
4868 {
4869 VisitorBridge<Fn>* const aBridge = static_cast<VisitorBridge<Fn>*>(theUser);
4870 try
4871 {
4872 if constexpr (std::is_invocable_r_v<bool, Fn&, NodeId>)
4873 {
4874 return (*aBridge->fn)(NodeId(theId)) ? OCCTL_OK : OCCTL_CANCELLED;
4875 }
4876 else
4877 {
4878 (*aBridge->fn)(NodeId(theId));
4879 return OCCTL_OK;
4880 }
4881 }
4882 catch (...)
4883 {
4884 aBridge->exc = std::current_exception();
4885 return OCCTL_INTERNAL;
4886 }
4887 }
4888
4889 template <typename Fn>
4890 struct RefBridge
4891 {
4892 Fn* fn;
4893 std::exception_ptr exc;
4894 };
4895
4896 template <typename Fn>
4897 static ::occtl_status_t OCCTL_CALL refTrampoline(const ::occtl_ref_id_t theId,
4898 void* const theUser)
4899 {
4900 RefBridge<Fn>* const aBridge = static_cast<RefBridge<Fn>*>(theUser);
4901 try
4902 {
4903 if constexpr (std::is_invocable_r_v<bool, Fn&, ::occtl_ref_id_t>)
4904 {
4905 return (*aBridge->fn)(theId) ? OCCTL_OK : OCCTL_CANCELLED;
4906 }
4907 else
4908 {
4909 (*aBridge->fn)(theId);
4910 return OCCTL_OK;
4911 }
4912 }
4913 catch (...)
4914 {
4915 aBridge->exc = std::current_exception();
4916 return OCCTL_INTERNAL;
4917 }
4918 }
4919
4920 template <typename Fn>
4921 struct RepBridge
4922 {
4923 Fn* fn;
4924 std::exception_ptr exc;
4925 };
4926
4927 template <typename Fn>
4928 static ::occtl_status_t OCCTL_CALL repTrampoline(const ::occtl_rep_id_t theId,
4929 void* const theUser)
4930 {
4931 RepBridge<Fn>* const aBridge = static_cast<RepBridge<Fn>*>(theUser);
4932 try
4933 {
4934 if constexpr (std::is_invocable_r_v<bool, Fn&, ::occtl_rep_id_t>)
4935 {
4936 return (*aBridge->fn)(theId) ? OCCTL_OK : OCCTL_CANCELLED;
4937 }
4938 else
4939 {
4940 (*aBridge->fn)(theId);
4941 return OCCTL_OK;
4942 }
4943 }
4944 catch (...)
4945 {
4946 aBridge->exc = std::current_exception();
4947 return OCCTL_INTERNAL;
4948 }
4949 }
4950
4951 template <typename CFn, typename Fn>
4952 void driveVisitor(CFn theCFn, Fn& theFn) const
4953 {
4954 VisitorBridge<Fn> aBridge{&theFn, nullptr};
4955 const ::occtl_status_t aSt = theCFn(myPtr, &visitorTrampoline<Fn>, &aBridge);
4956 if (aBridge.exc)
4957 {
4958 std::rethrow_exception(aBridge.exc);
4959 }
4960 check(aSt);
4961 }
4962
4963 template <typename CFn, typename Fn>
4964 void driveChildVisitor(CFn theCFn, const NodeId theParent, Fn& theFn) const
4965 {
4966 VisitorBridge<Fn> aBridge{&theFn, nullptr};
4967 const ::occtl_status_t aSt = theCFn(myPtr, theParent.get(), &visitorTrampoline<Fn>, &aBridge);
4968 if (aBridge.exc)
4969 {
4970 std::rethrow_exception(aBridge.exc);
4971 }
4972 check(aSt);
4973 }
4974
4975 template <typename CFn, typename Fn>
4976 void driveVisitorMask(CFn theCFn, const uint64_t theMask, Fn& theFn) const
4977 {
4978 VisitorBridge<Fn> aBridge{&theFn, nullptr};
4979 const ::occtl_status_t aSt = theCFn(myPtr, theMask, &visitorTrampoline<Fn>, &aBridge);
4980 if (aBridge.exc)
4981 {
4982 std::rethrow_exception(aBridge.exc);
4983 }
4984 check(aSt);
4985 }
4986
4987 template <typename CFn, typename Fn>
4988 void driveRefVisitor(CFn theCFn, const uint64_t theMask, Fn& theFn) const
4989 {
4990 RefBridge<Fn> aBridge{&theFn, nullptr};
4991 const ::occtl_status_t aSt = theCFn(myPtr, theMask, &refTrampoline<Fn>, &aBridge);
4992 if (aBridge.exc)
4993 {
4994 std::rethrow_exception(aBridge.exc);
4995 }
4996 check(aSt);
4997 }
4998
4999 template <typename CFn, typename Fn>
5000 void driveRepVisitor(CFn theCFn, const uint64_t theMask, Fn& theFn) const
5001 {
5002 RepBridge<Fn> aBridge{&theFn, nullptr};
5003 const ::occtl_status_t aSt = theCFn(myPtr, theMask, &repTrampoline<Fn>, &aBridge);
5004 if (aBridge.exc)
5005 {
5006 std::rethrow_exception(aBridge.exc);
5007 }
5008 check(aSt);
5009 }
5010
5011 using HistoryAccessor = ::occtl_status_t (*)(const ::occtl_graph_t*,
5014 std::size_t,
5015 std::size_t*);
5016
5017 std::vector<UID> fetch_history(const HistoryAccessor theAccessor, const UID theInputUid) const
5018 {
5019 size_t aCount = 0;
5020 check(theAccessor(myPtr, theInputUid.get(), nullptr, 0, &aCount));
5021 std::vector<::occtl_uid_t> aRaw(aCount);
5022 if (aCount != 0)
5023 {
5024 check(theAccessor(myPtr, theInputUid.get(), aRaw.data(), aCount, &aCount));
5025 }
5026 std::vector<UID> aOut;
5027 aOut.reserve(aRaw.size());
5028 for (const ::occtl_uid_t& aUid : aRaw)
5029 {
5030 aOut.emplace_back(aUid);
5031 }
5032 return aOut;
5033 }
5034
5035 ::occtl_graph_t* myPtr = nullptr;
5036};
5037
5038} // namespace occtl
5039
5040#endif // OCCTL_HPP_TOPO_HPP
Definition topo.hpp:725
RAII range adapter wrapping occtl_topo_axis_hit_iter_t.
Definition topo.hpp:722
RAII handle for a batched graph mutation scope. Mirrors occtl_batch_t.
Definition topo.hpp:1087
Batch & operator=(Batch &&theOther) noexcept
Move assignment — releases any previously-owned batch.
Definition topo.hpp:1102
~Batch() noexcept
Calls abort on destruction if the batch has not been committed. Swallows the abort status so the dest...
Definition topo.hpp:1117
void abort()
Aborts the batch, discarding all deferred mutations. NULL-tolerant; idempotent.
Definition topo.hpp:1136
::occtl_graph_t * graph() noexcept
Returns a borrowed pointer to the graph this batch is scoped over.
Definition topo.hpp:1120
Batch(Batch &&theOther) noexcept
Move constructor — takes ownership from theOther.
Definition topo.hpp:1093
void commit()
Commits all deferred mutations in the batch to the graph. After this call the batch handle is freed; ...
Definition topo.hpp:1125
Exception thrown by the veneer on any non-OK status code.
Definition core.hpp:45
Definition topo.hpp:1188
RAII range adapter wrapping occtl_topo_explorer_iter_t.
Definition topo.hpp:1177
RAII handle for a topology graph. Mirrors occtl_graph_t.
Definition topo.hpp:1444
void remove_ref(const RefId &theRefId)
Removes a reference entry by its RefId.
Definition topo.hpp:3237
void occurrence_transform_set(const NodeId theOccurrence, const ::occtl_transform_t &theTransform)
Sets the local transform of a uniquely referenced occurrence node.
Definition topo.hpp:4107
NodeId node_id_from_uid(const UID theUid) const
Resolves a persistent UID to its current NodeId.
Definition topo.hpp:1545
Graph & operator=(Graph &&theOther) noexcept
Move-assigns, releasing any previously-owned graph.
Definition topo.hpp:1479
std::pair< Point3, Vector3 > edge_eval_d1(const NodeId theEdge, const double theU) const
Evaluates the 3D point and first derivative on an edge at parameter theU.
Definition topo.hpp:2166
void shell_remove_face(const NodeId theShell, const NodeId theFace)
Removes a face from a shell (the face definition remains in the graph).
Definition topo.hpp:4147
std::vector< NodeId > adjacent_faces(const NodeId theFace) const
Returns faces adjacent to theFace through shared edges.
Definition topo.hpp:2585
void graph_metadata_unset(const char *const theKey, const size_t theKeyLen)
Removes one graph-level metadata key. Idempotent.
Definition topo.hpp:3652
Batch begin_batch()
Opens a batched mutation scope on this graph.
Definition topo.hpp:3084
RefUID ref_uid_from_ref_id(const RefId theId) const
Returns the persistent RefUID for a RefId.
Definition topo.hpp:1603
bool wire_is_outer(const NodeId theWire) const
Returns whether a wire is the outer wire of its parent face.
Definition topo.hpp:2089
bool face_has_surface(const NodeId theFace) const
Returns whether a face has a surface.
Definition topo.hpp:1900
void tag_add(const NodeId theTarget, const char *const theTag, const size_t theTagLen)
Adds a UTF-8 tag to a target node.
Definition topo.hpp:3668
std::tuple< Point3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3 > face_eval_d3(const NodeId theFace, const double theU, const double theV) const
Evaluates the 3D point and first three partial derivatives on a face.
Definition topo.hpp:2251
size_t solid_count() const
Active solid count.
Definition topo.hpp:1650
size_t product_count() const
Active product count.
Definition topo.hpp:1713
NodeIter compounds() const
Range-for adapter over all active compounds.
Definition topo.hpp:2756
bool edge_has_continuity(const NodeId theEdge, const NodeId theFaceA, const NodeId theFaceB) const
Returns true if continuity is recorded between two faces at the edge.
Definition topo.hpp:4309
std::pair< Graph, NodeId > offset_features(const NodeId theRoot, const std::vector< NodeId > &theSelections, const double theSelectionOffset, const double theBaseOffset=0.0) const
Offsets selected features of theRoot.
Definition topo.hpp:4654
std::string name_get(const NodeId theTarget) const
Retrieves the name of a target node. Returns empty string if unset.
Definition topo.hpp:3351
std::tuple< Point3, Vector3, Vector3, Vector3, Vector3, Vector3 > face_eval_d2(const NodeId theFace, const double theU, const double theV) const
Evaluates the 3D point and first two partial derivatives on a face.
Definition topo.hpp:2227
NodeIter faces() const
Range-for adapter over all active faces.
Definition topo.hpp:2728
::occtl_rep_kind_t rep_id_kind(const RepId theId) const
Returns the kind of a rep ID.
Definition topo.hpp:1535
size_t occurrence_count() const
Active occurrence count.
Definition topo.hpp:1720
NodeIter edges() const
Range-for adapter over all active edges.
Definition topo.hpp:2742
DistancePair distance_pair(const NodeId theNodeA, const NodeId theNodeB) const
Computes the closest-distance pair between two graph nodes.
Definition topo.hpp:2470
NodeIter shells_of_solid(const NodeId theSolid) const
Range-for adapter over the shells of a solid.
Definition topo.hpp:2828
bool edge_is_seam_on_face(const NodeId theEdge, const NodeId theFace) const
Returns whether an edge is a seam edge on a given face.
Definition topo.hpp:1993
uint32_t edge_vertex_count(const NodeId theEdge) const
Returns the number of vertices on an edge.
Definition topo.hpp:2371
void set_vertex_tolerance(const NodeId theVertex, const double theTol)
Sets the tolerance of a vertex.
Definition topo.hpp:3104
bool edge_same_parameter(const NodeId theEdge) const
Returns whether an edge has the same parameterisation on every face it bounds.
Definition topo.hpp:1957
std::vector< UID > history_deleted_all() const
Returns all graph-owned deleted history input UIDs.
Definition topo.hpp:1574
NodeIter vertices_of_edge(const NodeId theEdge) const
Range-for adapter over the vertices of an edge.
Definition topo.hpp:2863
NodeIter products() const
Range-for adapter over all active products.
Definition topo.hpp:2777
std::vector< UID > history_modified(const UID theInputUid) const
Returns graph-owned Modified history images for an input UID.
Definition topo.hpp:1562
::occtl_color_rgba_t color_get(const NodeId theTarget) const
Retrieves the colour of a target node, or opaque white if unset.
Definition topo.hpp:3300
bool face_has_triangulation(const NodeId theFace) const
Returns whether a face has a triangulation.
Definition topo.hpp:2071
void joint_remove(const JointId theJoint)
Removes an assembly joint record. Missing joints are a no-op.
Definition topo.hpp:3761
void tag_remove(const NodeId theTarget, const char *const theTag, const size_t theTagLen)
Removes a UTF-8 tag from a target node. Idempotent.
Definition topo.hpp:3676
NodeIter occurrences_of_product(const NodeId theProduct) const
Range-for adapter over the occurrences of a product.
Definition topo.hpp:2870
void set_wire_ref_is_outer(const RefId &theRefId, const bool theFlag)
Sets the IsOuter flag on a wire reference.
Definition topo.hpp:3284
bool edge_is_degenerated(const NodeId theEdge) const
Returns whether an edge is degenerated.
Definition topo.hpp:1793
NodeId make_compound(const ::occtl_topo_make_compound_info_t &theInfo)
Creates a compound node from a span of oriented children.
Definition topo.hpp:3063
uint32_t edge_face_count(const NodeId theEdge) const
Returns the number of faces referencing an edge.
Definition topo.hpp:2316
std::pair< Graph, NodeId > wrap_on_face(const ::occtl_topo_wrap_on_face_options_t &theOpts) const
Wraps a planar edge, wire, or face onto a target face.
Definition topo.hpp:4543
NodeIter solids() const
Range-for adapter over all active solids.
Definition topo.hpp:2714
void link_product_to_topology(const NodeId theProduct, const NodeId theRoot, const ::occtl_transform_t &thePlacement)
Links an existing product to a topology root with a placement.
Definition topo.hpp:4039
size_t wire_fix_degenerate_edges(const WireFixDegenerateEdgesOptions &theOptions)
Removes degenerate edge usages from a wire in place.
Definition topo.hpp:2941
SurfaceKind face_surface_kind(const NodeId theFace) const
Returns the surface kind carried by a face.
Definition topo.hpp:1910
uint32_t face_wire_count(const NodeId theFace) const
Returns the number of wires on a face.
Definition topo.hpp:2298
std::vector<::occtl_topo_check_issue_t > check_issues() const
Runs graph validation and returns all reported issues.
Definition topo.hpp:1736
void set_wire_is_closed(const NodeId theWire, const bool theFlag)
Sets the is-closed flag on a wire.
Definition topo.hpp:3168
void remove_occurrence(const RefId &theOccurrenceRef)
Removes an occurrence reference from the graph.
Definition topo.hpp:4099
bool shell_is_closed(const NodeId theShell) const
Returns whether a shell is topologically closed (watertight).
Definition topo.hpp:1928
NodeIter wires() const
Range-for adapter over all active wires.
Definition topo.hpp:2735
std::vector< std::string > graph_metadata_keys() const
Lists UTF-8 metadata keys stored on the graph itself.
Definition topo.hpp:3630
NodeIter compsolids() const
Range-for adapter over all active compsolids.
Definition topo.hpp:2763
std::vector< NodeId > material_nodes() const
Lists nodes that have explicit material-lite data.
Definition topo.hpp:3448
void replace_face_surface(const NodeId theFace, const ::occtl_rep_id_t theSurfaceId)
Replaces a face's surface.
Definition topo.hpp:4265
bool is_inside(const NodeId theSolid, const Point3 &thePoint, const double theTolerance, const bool theIncludeBoundary=true) const
Returns whether a point is inside a solid node.
Definition topo.hpp:2699
EdgeSplitResult edge_split(const NodeId theEdge, const double theParameter)
Splits an edge at the given parameter and returns the two new sub-edges. The original edge is soft-re...
Definition topo.hpp:4234
RefId ref_id_from_ref_uid(const RefUID theUid) const
Resolves a persistent RefUID to its current RefId.
Definition topo.hpp:1594
double measure_get(const NodeId theNode, const SelectMeasureKind theKind)
Returns one computed OCCT mass-property scalar.
Definition topo.hpp:3833
std::string graph_metadata_get(const char *const theKey, const size_t theKeyLen) const
Retrieves UTF-8 metadata from the graph itself.
Definition topo.hpp:3610
RelatedIter related(const NodeId theNode) const
Creates a related-iterator over the semantic neighbours of theNode.
Definition topo.hpp:2461
std::vector< NodeId > descendant_edges_get(const NodeId theNode)
Returns computed descendant Edge nodes for a root node.
Definition topo.hpp:3898
std::vector< OrientedNode > wire_order_edges(const NodeId theWire) const
Returns wire edges in endpoint-chaining order with coedge orientation.
Definition topo.hpp:2419
Point3 vertex_point(const NodeId theVertex) const
Returns the 3D point of a vertex.
Definition topo.hpp:1756
void compound_view(const NodeId theCompound, ::occtl_compound_view_t &theView) const
Fills theView with the current scalar state of theCompound.
Definition topo.hpp:3017
void set_edge_same_range(const NodeId theEdge, const bool theFlag)
Sets the same-range flag on an edge.
Definition topo.hpp:3144
NodeId make_face(const ::occtl_topo_make_face_info_t &theInfo)
Creates a face node from a surface, outer wire, and optional inner wires.
Definition topo.hpp:2969
NodeIter shells() const
Range-for adapter over all active shells.
Definition topo.hpp:2721
std::pair< double, double > edge_range(const NodeId theEdge) const
Returns the parametric range of an edge's 3D curve.
Definition topo.hpp:1775
int32_t graph_distance(const NodeId theRoot, const std::vector< NodeId > &theSources, const NodeId theTarget) const
Returns same-kind topological hop distance under theRoot, or -1 if disconnected.
Definition topo.hpp:2653
void set_face_tolerance(const NodeId theFace, const double theTol)
Sets the tolerance of a face.
Definition topo.hpp:3120
Vector2 coedge_pcurve_eval_dn(const NodeId theCoedge, const double theU, const uint32_t theN) const
Evaluates the Nth derivative on a coedge pcurve at parameter theU.
Definition topo.hpp:2146
std::tuple< Point2, Vector2, Vector2 > coedge_pcurve_eval_d2(const NodeId theCoedge, const double theU) const
Evaluates the PCurve UV point and first two derivatives on a coedge at parameter theU.
Definition topo.hpp:2121
void graph_metadata_set(const char *const theKey, const size_t theKeyLen, const char *const theValue, const size_t theValueLen)
Sets UTF-8 metadata on the graph itself.
Definition topo.hpp:3599
int32_t graph_distance(const NodeId theRoot, const NodeId theSource, const NodeId theTarget) const
Returns same-kind topological hop distance from one source under theRoot.
Definition topo.hpp:2676
double pair_distance_get(const NodeId theFirst, const NodeId theSecond)
Returns computed OCCT minimum distance between two nodes.
Definition topo.hpp:4018
void link_products(const NodeId theParentProduct, const NodeId theChildProduct, const ::occtl_transform_t &thePlacement, const NodeId theParentOccurrence=NodeId(OCCTL_NODE_ID_INVALID))
Links two products via a parent-child occurrence.
Definition topo.hpp:4065
void color_unset(const NodeId theTarget)
Removes the colour associated with a target node. Idempotent.
Definition topo.hpp:3310
SurfaceKind face_surface_kind_get(const NodeId theFace)
Returns computed surface-kind classification for a Face node.
Definition topo.hpp:3863
size_t compsolid_count() const
Active compsolid count.
Definition topo.hpp:1699
void material_set(const NodeId theTarget, const MaterialInfo &theInfo)
Sets material-lite data on a target node.
Definition topo.hpp:3393
void set_vertex_point(const NodeId theVertex, const ::occtl_point3_t &thePoint)
Sets the 3D point of a vertex.
Definition topo.hpp:3095
void node_metadata_unset(const NodeId theTarget, const char *const theKey, const size_t theKeyLen)
Removes one metadata key from a target node. Idempotent.
Definition topo.hpp:3660
::occtl_ref_kind_t ref_id_kind(const RefId theId) const
Returns the kind of a ref ID.
Definition topo.hpp:1517
void set_ref_orientation(const RefId &theRefId, const Orientation theOrientation)
Sets the orientation of a reference entry.
Definition topo.hpp:3268
NodeId make_compsolid(const ::occtl_topo_make_compsolid_info_t &theInfo)
Creates a compsolid node from a span of oriented solids.
Definition topo.hpp:3053
NodeIter coedges() const
Range-for adapter over all active coedges.
Definition topo.hpp:2770
std::pair< Graph, NodeId > extrude_faces_to_solids(const ::occtl_topo_extrude_faces_options_t &theOpts) const
Thickens one or more Face nodes into prism solids.
Definition topo.hpp:4788
AxisHitIter faces_intersected_by_axis(const NodeId theRoot, const Axis1Placement &theAxis, const double theMinParameter, const double theMaxParameter, const double theTolerance) const
Returns ordered face intersections with an axis under a graph root.
Definition topo.hpp:2505
size_t node_count() const
Total active node count across all kinds.
Definition topo.hpp:1727
void edge_remove_vertex(const NodeId theEdge, const NodeId theVertex)
Removes a vertex (boundary or internal) from an edge.
Definition topo.hpp:4251
std::string node_metadata_get(const NodeId theTarget, const char *const theKey, const size_t theKeyLen) const
Retrieves UTF-8 metadata from a target node.
Definition topo.hpp:3520
std::vector< NodeId > common_vertices(const NodeId theNodeA, const NodeId theNodeB) const
Returns vertex nodes common to two graph roots.
Definition topo.hpp:2536
::occtl_select_bbox_t bbox_get(const NodeId theNode)
Returns the computed axis-aligned bounding box for a node.
Definition topo.hpp:3803
double vertex_tolerance(const NodeId theVertex) const
Returns the tolerance of a vertex.
Definition topo.hpp:1766
NodeId face_chamfer_2d(const FaceChamfer2dOptions &theOptions)
Chamfers corners of a planar face and inserts the result into this graph.
Definition topo.hpp:2950
bool coedge_has_polygon_on_surface(const NodeId theCoedge) const
Returns true if the coedge has a polygon-on-surface discretization.
Definition topo.hpp:4391
NodeId link_products_with_occurrence(const NodeId theParentProduct, const NodeId theChildProduct, const ::occtl_transform_t &thePlacement, const NodeId theParentOccurrence=NodeId(OCCTL_NODE_ID_INVALID))
Links two products and returns the new occurrence.
Definition topo.hpp:4080
std::vector< NodeId > connected_faces(const NodeId theSeedFace) const
Returns all faces connected to theSeedFace through shared edges.
Definition topo.hpp:2630
uint32_t vertex_edge_count(const NodeId theVertex) const
Returns the number of edges that reference a vertex.
Definition topo.hpp:2335
::occtl_shape_continuity_t edge_continuity(const NodeId theEdge, const NodeId theFaceA, const NodeId theFaceB) const
Returns the geometric continuity between two faces at their shared edge.
Definition topo.hpp:4297
double max_fillet_radius(const NodeId theRoot, const std::vector< NodeId > &theEdges, const ::occtl_topo_max_fillet_radius_options_t &theOpts) const
Estimates the largest selected-edge constant fillet radius accepted by OCCT.
Definition topo.hpp:4495
std::pair< Graph, NodeId > scaled(const NodeId theRoot, const Point3 &theCenter, const double theFactor) const
Creates a uniformly scaled copy of the shape rooted at theRoot.
Definition topo.hpp:4729
size_t coedge_count() const
Active coedge count.
Definition topo.hpp:1706
NodeId coedge_seam_pair(const NodeId theCoedge) const
Returns the paired coedge for a seam edge, or an invalid NodeId for non-seam coedges.
Definition topo.hpp:2053
void color_set(const NodeId theTarget, const ::occtl_color_rgba_t &theColor)
Sets a colour on a target node.
Definition topo.hpp:3292
std::vector< NodeId > descendants_get(const NodeId theNode, const NodeKind theKind)
Returns computed descendant nodes of one requested kind.
Definition topo.hpp:3948
size_t compound_count() const
Active compound count.
Definition topo.hpp:1692
void set_edge_is_closed(const NodeId theEdge, const bool theFlag)
Sets the is-closed flag on an edge.
Definition topo.hpp:3160
std::pair< Graph, NodeId > draft_faces(const ::occtl_topo_draft_faces_options_t &theOpts) const
Applies a draft angle to selected faces of a shape.
Definition topo.hpp:4597
void set_edge_same_parameter(const NodeId theEdge, const bool theFlag)
Sets the same-parameter flag on an edge.
Definition topo.hpp:3136
::occtl_point3_t vertex_point_in_usage(const NodeId theVertex, const NodeId theParent) const
Returns the vertex point with a parent's accumulated Location applied.
Definition topo.hpp:4364
NodeId edge_find_coedge_on_face_oriented(const NodeId theEdge, const NodeId theFace, const ::occtl_orientation_t theOrientation) const
Finds the coedge for an (edge, face, orientation) triple. Disambiguates seam edges.
Definition topo.hpp:4349
void clear_cached(const NodeId theNode)
Clears graph-owned computed data related to one node.
Definition topo.hpp:3787
std::pair< Graph, NodeId > mirror(const NodeId theRoot, const ::occtl_point3_t &thePoint, const ::occtl_direction3_t &theNormal) const
Creates a mirrored copy of the shape rooted at theRoot.
Definition topo.hpp:4743
NodeId make_vertex(const ::occtl_topo_make_vertex_info_t &theInfo)
Creates a vertex node from a point and tolerance.
Definition topo.hpp:2879
void set_edge_tolerance(const NodeId theEdge, const double theTol)
Sets the tolerance of an edge.
Definition topo.hpp:3112
std::pair< Graph, NodeId > face_to_arcs(const ::occtl_topo_face_to_arcs_options_t &theOpts) const
Converts planar face or wire boundaries to line and circular-arc edges.
Definition topo.hpp:4566
SelectGroupIter select_groups(const SelectOptions &theSelectOptions, const SelectGroupOptions &theGroupOptions)
Groups selected graph nodes matching theSelectOptions by theGroupOptions.
Definition topo.hpp:2820
void solid_add_shell(const NodeId theSolid, const NodeId theShell, const ::occtl_orientation_t theOrientation)
Adds a shell to a solid with the given orientation.
Definition topo.hpp:4193
NodeId wire_face_of(const NodeId theWire) const
Returns the face a wire belongs to.
Definition topo.hpp:2080
std::pair< Point2, Vector2 > coedge_pcurve_eval_d1(const NodeId theCoedge, const double theU) const
Evaluates the PCurve UV point and first derivative on a coedge at parameter theU.
Definition topo.hpp:2109
size_t vertex_count() const
Active vertex count.
Definition topo.hpp:1685
std::pair< Graph, NodeId > chamfer_edges(const NodeId theRoot, const std::vector< NodeId > &theEdges, const double theDist1, const double theDist2) const
Applies a selected-edge 3D chamfer to theRoot.
Definition topo.hpp:4480
bool coedge_is_seam(const NodeId theCoedge) const
Returns whether a coedge is a seam (closed-surface) edge.
Definition topo.hpp:1840
std::pair< Graph, NodeId > fillet(const ::occtl_topo_fillet_options_t &theOpts)
Applies a 3D fillet or chamfer to all solids and shells in this graph.
Definition topo.hpp:4429
static Graph from_pointer_unsafe(::occtl_graph_t *const thePtr)
Wraps an existing owned handle; throws on NULL.
Definition topo.hpp:1459
void solid_remove_shell(const NodeId theSolid, const NodeId theShell)
Removes a shell from a solid (the shell definition remains in the graph).
Definition topo.hpp:4202
Vector3 edge_eval_dn(const NodeId theEdge, const double theU, const uint32_t theN) const
Evaluates the Nth derivative on an edge at parameter theU.
Definition topo.hpp:2197
void coedge_uv_points(const NodeId theCoedge, ::occtl_point2_t &theUVStart, ::occtl_point2_t &theUVEnd) const
Returns the UV points at the start and end of a coedge.
Definition topo.hpp:2043
void face_remove_holes(const NodeId theFace)
Removes all inner wires from a face.
Definition topo.hpp:4170
void shell_view(const NodeId theShell, ::occtl_shell_view_t &theView) const
Fills theView with the current scalar state of theShell.
Definition topo.hpp:3035
std::vector< NodeId > name_nodes() const
Lists nodes that have explicit names.
Definition topo.hpp:3370
::occtl_transform_t occurrence_world_transform(const NodeId theRoot, const NodeId theOccurrence) const
Returns an occurrence transform accumulated from a traversal root.
Definition topo.hpp:4125
size_t face_count() const
Active face count.
Definition topo.hpp:1664
void set_edge_param_range(const NodeId theEdge, const double theFirst, const double theLast)
Sets the parametric range of an edge's 3D curve.
Definition topo.hpp:3128
std::tuple< Point3, Vector3, Vector3 > face_eval_d1(const NodeId theFace, const double theU, const double theV) const
Evaluates the 3D point, D1U, and D1V on a face at UV parameters (theU, theV).
Definition topo.hpp:2215
std::pair< Graph, NodeId > make_filling_patch(const ::occtl_topo_filling_patch_options_t &theOpts) const
Builds a filling patch from edge, support-face, and point constraints.
Definition topo.hpp:4705
std::pair< Graph, NodeId > remove_features(const NodeId theRoot, const std::vector< NodeId > &theSelections, const bool theParallel=false) const
Removes selected features from theRoot.
Definition topo.hpp:4612
NodeId wire_offset_2d(const WireOffset2dOptions &theOptions)
Creates a planar offset wire in this graph.
Definition topo.hpp:2931
Graph(::occtl_graph_t *const thePtr) noexcept
Wraps an existing handle (takes ownership).
Definition topo.hpp:1453
void replace_edge_curve(const NodeId theEdge, const ::occtl_rep_id_t theCurveId)
Replaces an edge's 3D curve.
Definition topo.hpp:4258
CurveKind edge_curve_kind_get(const NodeId theEdge)
Returns computed curve-kind classification for an Edge node.
Definition topo.hpp:3853
std::vector< NodeId > adjacent_edges(const NodeId theEdge) const
Returns edges adjacent to theEdge through shared vertices.
Definition topo.hpp:2563
std::pair< Graph, NodeId > linear_pattern(const NodeId theRoot, const ::occtl_topo_linear_pattern_options_t &theOpts) const
Creates count linearly-spaced copies of a shape.
Definition topo.hpp:4804
NodeIter faces_of_shell(const NodeId theShell) const
Range-for adapter over the faces of a shell.
Definition topo.hpp:2835
void set_coedge_uv_box(const NodeId theCoedge, const ::occtl_point2_t &theUvLo, const ::occtl_point2_t &theUvHi)
Sets the UV box of a coedge.
Definition topo.hpp:3202
std::pair< Graph, NodeId > circular_pattern(const NodeId theRoot, const ::occtl_topo_circular_pattern_options_t &theOpts) const
Creates count angularly-spaced copies of a shape.
Definition topo.hpp:4821
ExplorerIter child_explorer(const NodeId theRoot, const ::occtl_topo_child_explorer_config_t *const theConfig=nullptr) const
Creates a child explorer for accumulated-location/orientation downward traversal.
Definition topo.hpp:2439
void graph_units_set(const double theLengthUnitToMeter, const char *const theName, const size_t theNameLen)
Sets graph-level length-unit metadata.
Definition topo.hpp:3471
std::vector< NodeId > edges_to_wires(const EdgesToWiresOptions &theOptions)
Connects unordered edges into wire nodes.
Definition topo.hpp:2909
std::vector< NodeId > connected_edges(const NodeId theSeedEdge) const
Returns all edges connected to theSeedEdge through shared vertices.
Definition topo.hpp:2607
NodeIter occurrences() const
Range-for adapter over all active occurrences.
Definition topo.hpp:2784
std::pair< Graph, NodeId > project_face_along_direction(const ::occtl_topo_project_face_direction_options_t &theOpts) const
Projects a face onto target boundary faces along a fixed direction.
Definition topo.hpp:4554
uint32_t compound_child_count(const NodeId theCompound) const
Returns the number of children in a compound.
Definition topo.hpp:2391
::occtl_shape_continuity_t edge_max_continuity(const NodeId theEdge) const
Returns the maximum continuity across all face pairs at the edge.
Definition topo.hpp:4322
std::pair< Graph, HlrCategoryRoots > hlr_project(const ::occtl_topo_hlr_options_t &theOpts) const
Projects a shape with OCCT hidden-line removal.
Definition topo.hpp:4578
::occtl_graph_t * get() const noexcept
Borrows-it pointer to the underlying C handle, for direct ABI calls.
Definition topo.hpp:1494
NodeId make_face_from_wires_auto(const MakeFaceFromWiresAutoOptions &theOptions)
Creates a face from candidate wires using automatic outer-loop detection.
Definition topo.hpp:2978
std::vector< NodeId > descendant_vertices_get(const NodeId theNode)
Returns computed descendant Vertex nodes for a root node.
Definition topo.hpp:3873
void set_edge_start_vertex(const NodeId theEdge, const NodeId theVertex)
Rebinds an edge's start vertex to a different vertex.
Definition topo.hpp:3252
std::vector< std::pair< RefUID, RefId > > ref_uid_table() const
Returns active RefUID to RefId pairs for all references in the graph.
Definition topo.hpp:1630
std::vector< std::string > tag_list(const NodeId theTarget) const
Lists UTF-8 tags stored on a target node.
Definition topo.hpp:3694
void node_metadata_set(const NodeId theTarget, const char *const theKey, const size_t theKeyLen, const char *const theValue, const size_t theValueLen)
Sets UTF-8 metadata on a target node.
Definition topo.hpp:3503
uint32_t product_occurrence_count(const NodeId theProduct) const
Returns the number of occurrences of a product.
Definition topo.hpp:2381
uint32_t wire_edge_count(const NodeId theWire) const
Returns the number of edges in a wire.
Definition topo.hpp:2362
void add_pcurve(const NodeId theEdge, const NodeId theFace, const ::occtl_rep_id_t thePcurveId, const double theFirst, const double theLast, const ::occtl_orientation_t theOrientation)
Adds a pcurve binding between an edge and a face, creating a new coedge.
Definition topo.hpp:4279
NodeId face_outer_wire(const NodeId theFace) const
Returns the outer wire of a face.
Definition topo.hpp:1879
void remove(const NodeId theId)
Removes a node from the graph.
Definition topo.hpp:3072
std::tuple< Point3, Vector3, Vector3 > edge_eval_d2(const NodeId theEdge, const double theU) const
Evaluates the first two derivatives on an edge at parameter theU.
Definition topo.hpp:2176
void name_set(const NodeId theTarget, const char *const theName, const size_t theNameLen)
Sets a human-readable name on a target node.
Definition topo.hpp:3342
NodeId coedge_face_of(const NodeId theCoedge) const
Returns the parent face of a coedge.
Definition topo.hpp:1860
NodeId edge_start_vertex(const NodeId theEdge) const
Returns the start vertex of an edge.
Definition topo.hpp:1821
::occtl_node_kind_t uid_kind(const UID theUid) const
Returns the kind embedded in a UID.
Definition topo.hpp:1508
NodeId edge_find_coedge_on_face(const NodeId theEdge, const NodeId theFace) const
Finds the coedge for an (edge, face) pair.
Definition topo.hpp:4340
double vertex_pcurve_parameter(const NodeId theVertex, const NodeId theCoedge) const
Returns the 2D parameter of a vertex on a coedge's pcurve.
Definition topo.hpp:4373
double vertex_parameter(const NodeId theVertex, const NodeId theEdge) const
Returns the parameter of a vertex on an edge.
Definition topo.hpp:1938
std::pair< Graph, NodeId > translated(const NodeId theRoot, const Vector3 &theDelta) const
Creates a translated copy of the shape rooted at theRoot.
Definition topo.hpp:4715
void shell_add_face(const NodeId theShell, const NodeId theFace, const ::occtl_orientation_t theOrientation)
Adds a face to a shell with the given orientation.
Definition topo.hpp:4138
JointId joint_create(const JointInfo &theInfo)
Creates an assembly joint record in the graph.
Definition topo.hpp:3741
bool wire_is_closed(const NodeId theWire) const
Returns whether a wire is topologically closed.
Definition topo.hpp:1919
std::pair< Graph, NodeId > blend_edges(const NodeId theRoot, const std::vector< NodeId > &theEdges, const ::occtl_topo_edge_blend_options_t &theOpts) const
Applies a selected-edge 3D fillet or chamfer to theRoot.
Definition topo.hpp:4444
uint32_t shell_face_count(const NodeId theShell) const
Returns the number of faces in a shell.
Definition topo.hpp:2353
::occtl_node_kind_t node_id_kind(const NodeId theId) const
Returns the kind of a node ID.
Definition topo.hpp:1498
NodeId make_shell(const ::occtl_topo_make_shell_info_t &theInfo)
Creates a shell node from a span of oriented faces.
Definition topo.hpp:2988
bool is_valid() const
Returns true when graph validation reports no issues.
Definition topo.hpp:1751
std::vector< std::string > node_metadata_keys(const NodeId theTarget) const
Lists UTF-8 metadata keys stored on a target node.
Definition topo.hpp:3550
std::pair< Graph, NodeId > rotated(const NodeId theRoot, const Axis1Placement &theAxis, const double theAngle) const
Creates a rotated copy of the shape rooted at theRoot.
Definition topo.hpp:4721
::occtl_ref_kind_t ref_uid_kind(const RefUID theUid) const
Returns the kind embedded in a RefUID.
Definition topo.hpp:1526
::occtl_orientation_t coedge_orientation(const NodeId theCoedge) const
Returns the full TopAbs orientation of a coedge.
Definition topo.hpp:4331
void solid_view(const NodeId theSolid, ::occtl_solid_view_t &theView) const
Fills theView with the current scalar state of theSolid.
Definition topo.hpp:3008
std::tuple< Point3, Vector3, Vector3, Vector3 > edge_eval_d3(const NodeId theEdge, const double theU) const
Evaluates the first three derivatives on an edge at parameter theU.
Definition topo.hpp:2186
Point2 vertex_parameters(const NodeId theVertex, const NodeId theFace) const
Returns the UV parameters of a vertex on a face.
Definition topo.hpp:1948
void remove_rep(const RepId &theRepId)
Removes a representation entry by its RepId.
Definition topo.hpp:3242
void set_shell_is_closed(const NodeId theShell, const bool theFlag)
Sets the is-closed flag on a shell.
Definition topo.hpp:3176
bool edge_same_range(const NodeId theEdge) const
Returns whether an edge has the same range in 3D and on its pcurves.
Definition topo.hpp:1966
void replace_coedge_pcurve(const NodeId theCoedge, const ::occtl_rep_id_t thePcurveId)
Replaces a coedge's pcurve.
Definition topo.hpp:4272
NodeId make_wire(const ::occtl_topo_make_wire_info_t &theInfo)
Creates a wire node from an ordered span of oriented edges.
Definition topo.hpp:2899
std::tuple< Point2, Vector2, Vector2, Vector2 > coedge_pcurve_eval_d3(const NodeId theCoedge, const double theU) const
Evaluates the PCurve UV point and first three derivatives on a coedge at parameter theU.
Definition topo.hpp:2134
bool coedge_is_reversed(const NodeId theCoedge) const
Returns whether a coedge is reversed.
Definition topo.hpp:2003
void compound_remove_child(const NodeId theCompound, const NodeId theChild)
Removes a child from a compound (the child definition remains in the graph).
Definition topo.hpp:4219
Point2 coedge_pcurve_eval(const NodeId theCoedge, const double theU) const
Evaluates the PCurve UV point on a coedge at parameter theU.
Definition topo.hpp:2099
GraphUnits graph_units_get() const
Retrieves graph-level length-unit metadata.
Definition topo.hpp:3481
void compound_add_child(const NodeId theCompound, const NodeId theChild, const ::occtl_orientation_t theOrientation)
Adds a child entity to a compound with the given orientation.
Definition topo.hpp:4209
Graph()
Creates an empty graph.
Definition topo.hpp:1447
NodeId make_solid(const ::occtl_topo_make_solid_info_t &theInfo)
Creates a solid node from a span of oriented shells.
Definition topo.hpp:2998
NodeId link_product_to_topology_with_occurrence(const NodeId theProduct, const NodeId theRoot, const ::occtl_transform_t &thePlacement)
Links an existing product to a topology root and returns the new occurrence.
Definition topo.hpp:4049
void set_edge_is_degenerate(const NodeId theEdge, const bool theFlag)
Sets the is-degenerate flag on an edge.
Definition topo.hpp:3152
CurveKind edge_curve_kind(const NodeId theEdge) const
Returns the 3D curve kind carried by an edge.
Definition topo.hpp:1812
std::vector< NodeId > adjacent_edges_get(const NodeId theEdge)
Returns computed adjacent Edge nodes for an Edge node.
Definition topo.hpp:3996
uint32_t wire_distinct_edge_count(const NodeId theWire) const
Returns the number of distinct edges in a wire.
Definition topo.hpp:2325
std::vector< NodeId > tag_nodes(const char *const theTag=nullptr, const size_t theTagLen=0) const
Lists nodes that have tags, optionally filtered by exact tag.
Definition topo.hpp:3716
NodeIter edges_of_wire(const NodeId theWire) const
Range-for adapter over the edges of a wire.
Definition topo.hpp:2856
void set_edge_end_vertex(const NodeId theEdge, const NodeId theVertex)
Rebinds an edge's end vertex to a different vertex.
Definition topo.hpp:3260
std::pair< Graph, NodeId > split_by_plane(const ::occtl_topo_split_by_plane_options_t &theOpts) const
Splits a shape by a plane and returns selected side(s).
Definition topo.hpp:4759
void face_add_holes(const NodeId theFace, const std::vector< NodeId > &theHoles)
Adds selected wires as inner wires of a face.
Definition topo.hpp:4154
~Graph()
Releases the underlying graph.
Definition topo.hpp:1469
NodeIter wires_of_face(const NodeId theFace) const
Range-for adapter over the wires of a face.
Definition topo.hpp:2842
NodeId wire_chamfer_2d(const WireChamfer2dOptions &theOptions)
Chamfers corners of a planar wire and inserts the result into this graph.
Definition topo.hpp:2959
void remove_with_replacement(const NodeId theNode, const NodeId theReplacement)
Removes a node and reparents children to a replacement.
Definition topo.hpp:3229
SelectIter select_tagged(const SelectOptions &theOptions, const char *const theTag, const size_t theTagLen)
Selects graph nodes matching theOptions and carrying theTag.
Definition topo.hpp:2809
void compact()
Compacts the graph, reclaiming slots from removed nodes. Invalidates all NodeId and RefId values.
Definition topo.hpp:3224
RepUID rep_uid_from_rep_id(const RepId theId) const
Returns the persistent RepUID for a RepId.
Definition topo.hpp:1621
uint32_t solid_shell_count(const NodeId theSolid) const
Returns the number of shells in a solid.
Definition topo.hpp:2344
uint32_t wire_coedge_count(const NodeId theWire) const
Returns the number of coedges in a wire.
Definition topo.hpp:2307
static Graph create()
Creates an empty graph (naming-aligned alias).
Definition topo.hpp:1450
NodeIter wire_explorer(const NodeId theWire) const
Creates a wire explorer that visits coedges in geometric traversal order.
Definition topo.hpp:2410
std::pair< Graph, NodeId > fillet_edges(const NodeId theRoot, const std::vector< NodeId > &theEdges, const double theRadius) const
Applies a selected-edge constant-radius 3D fillet to theRoot.
Definition topo.hpp:4468
std::vector< NodeId > descendant_faces_get(const NodeId theNode)
Returns computed descendant Face nodes for a root node.
Definition topo.hpp:3923
Point3 face_eval(const NodeId theFace, const double theU, const double theV) const
Evaluates the 3D point on a face at UV parameters (theU, theV).
Definition topo.hpp:2206
RepId rep_id_from_rep_uid(const RepUID theUid) const
Resolves a persistent RepUID to its current RepId.
Definition topo.hpp:1612
std::vector< JointId > joint_list(const NodeId theNode=NodeId::invalid()) const
Lists all assembly joints or those attached to theNode.
Definition topo.hpp:3766
GraphMaterial material_get(const NodeId theTarget) const
Retrieves material-lite data from a target node.
Definition topo.hpp:3401
NodeId coedge_edge_of(const NodeId theCoedge) const
Returns the parent edge of a coedge.
Definition topo.hpp:1850
void remove_subgraph(const NodeId theId)
Recursively removes a node and its entire subgraph.
Definition topo.hpp:3076
std::pair< Graph, NodeId > section_by_planes(const ::occtl_topo_section_by_planes_options_t &theOpts) const
Sections a shape by one or more planes.
Definition topo.hpp:4774
size_t edge_count() const
Active edge count.
Definition topo.hpp:1678
JointInfo joint_get(const JointId theJoint) const
Retrieves an assembly joint record.
Definition topo.hpp:3751
std::pair< Graph, NodeId > project_on_face(const ::occtl_topo_project_on_face_options_t &theOpts) const
Projects an edge or wire onto a target face along face normals.
Definition topo.hpp:4531
::occtl_graph_uv_bounds_t face_uv_bounds_get(const NodeId theFace)
Returns computed UV parameter bounds for a Face node.
Definition topo.hpp:3823
double coedge_pcurve_parameter(const NodeId theCoedge, const NodeId theVertex) const
Returns the parameter of a vertex on the pcurve carried by a coedge.
Definition topo.hpp:2023
::occtl_transform_t occurrence_transform_get(const NodeId theOccurrence) const
Returns the local transform of a uniquely referenced occurrence node.
Definition topo.hpp:4115
double face_tolerance(const NodeId theFace) const
Returns the tolerance of a face.
Definition topo.hpp:1869
NodeId make_edge(const ::occtl_topo_make_edge_info_t &theInfo)
Creates an edge node.
Definition topo.hpp:2889
void material_unset(const NodeId theTarget)
Removes material-lite data from a target node. Idempotent.
Definition topo.hpp:3441
NodeIter root_products() const
Range-for adapter over all root products.
Definition topo.hpp:2791
std::vector< NodeId > adjacent_faces_get(const NodeId theFace)
Returns computed adjacent Face nodes for a Face node.
Definition topo.hpp:3974
void vertex_view(const NodeId theVertex, ::occtl_vertex_view_t &theView) const
Fills theView with the current scalar state of theVertex.
Definition topo.hpp:3044
NodeIter coedges_of_wire(const NodeId theWire) const
Range-for adapter over the coedges of a wire.
Definition topo.hpp:2849
bool tag_has(const NodeId theTarget, const char *const theTag, const size_t theTagLen) const
Tests whether a target node carries a UTF-8 tag.
Definition topo.hpp:3684
bool face_natural_restriction(const NodeId theFace) const
Returns whether a face has natural restriction.
Definition topo.hpp:2062
bool edge_is_boundary(const NodeId theEdge) const
Returns whether an edge is a boundary edge.
Definition topo.hpp:1984
void set_ref_location(const RefId &theRefId, const ::occtl_transform_t &theTransform)
Sets the local location of a reference entry.
Definition topo.hpp:3276
Point3 edge_eval(const NodeId theEdge, const double theU) const
Evaluates the 3D point on an edge at parameter theU.
Definition topo.hpp:2157
bool coedge_has_pcurve(const NodeId theCoedge) const
Returns whether a coedge has a pcurve.
Definition topo.hpp:2013
TouchIter touches(const NodeId theNodeA, const NodeId theNodeB, const RelationOptions *const theOptions=nullptr) const
Returns contact solutions between two graph nodes.
Definition topo.hpp:2479
bool is_same_geometry(const NodeId theNodeA, const NodeId theNodeB, const double theTolerance) const
Tests whether two edge or face nodes share geometric support.
Definition topo.hpp:2524
void wire_view(const NodeId theWire, ::occtl_wire_view_t &theView) const
Fills theView with the current scalar state of theWire.
Definition topo.hpp:3026
PointClass classify_point(const NodeId theSolid, const Point3 &thePoint, const double theTolerance) const
Classifies a point relative to a solid node.
Definition topo.hpp:2687
void edge_add_internal_vertex(const NodeId theEdge, const NodeId theVertex)
Adds an internal vertex to an edge.
Definition topo.hpp:4244
void face_uv_bounds(const NodeId theFace, double &theUMin, double &theUMax, double &theVMin, double &theVMax) const
Returns the UV parameter bounds of a face.
Definition topo.hpp:1888
size_t wire_count() const
Active wire count.
Definition topo.hpp:1671
SelectIter select(const SelectOptions &theOptions)
Selects graph nodes matching theOptions.
Definition topo.hpp:2800
bool edge_has_polygon3d(const NodeId theEdge) const
Returns true if the edge has a 3D polygon discretization.
Definition topo.hpp:4382
void face_remove_holes(const NodeId theFace, const std::vector< NodeId > &theHoles)
Removes selected inner wires from a face.
Definition topo.hpp:4177
std::vector< std::pair< NodeId, ::occtl_color_rgba_t > > color_entries() const
Lists explicit colour entries.
Definition topo.hpp:3317
std::vector< NodeId > node_metadata_nodes() const
Lists nodes that have at least one metadata key.
Definition topo.hpp:3576
void clear_cached(const RefId theRef)
Clears graph-owned computed data related to one reference.
Definition topo.hpp:3795
double edge_tolerance(const NodeId theEdge) const
Returns the tolerance of an edge.
Definition topo.hpp:1784
std::pair< Graph, NodeId > offset_features(const ::occtl_topo_offset_features_options_t &theOpts) const
Offsets selected features using a fully specified C options struct.
Definition topo.hpp:4682
bool edge_has_curve(const NodeId theEdge) const
Returns whether an edge has a 3D curve.
Definition topo.hpp:1802
Graph(Graph &&theOther) noexcept
Move-constructs, leaving theOther empty.
Definition topo.hpp:1472
::occtl_graph_mass_properties_t mass_properties_get(const NodeId theNode)
Returns computed combined OCCT mass properties for a node.
Definition topo.hpp:3843
::occtl_graph_obb_t obb_get(const NodeId theNode)
Returns the computed oriented bounding box for a node.
Definition topo.hpp:3813
std::pair< Graph, NodeId > remove_features(const ::occtl_topo_defeature_options_t &theOpts) const
Removes selected features using a fully specified C options struct.
Definition topo.hpp:4638
ExplorerIter parent_explorer(const NodeId theNode, const ::occtl_topo_parent_explorer_config_t *const theConfig=nullptr) const
Creates a parent explorer for accumulated-location/orientation upward traversal.
Definition topo.hpp:2450
Vector3 face_eval_dn(const NodeId theFace, const double theU, const double theV, const uint32_t theNu, const uint32_t theNv) const
Evaluates the (theNu, theNv) cross derivative on a face at UV parameters (theU, theV).
Definition topo.hpp:2285
UID uid_from_node_id(const NodeId theId) const
Returns the persistent UID for a NodeId.
Definition topo.hpp:1554
void cleanup_removed_refs()
Cleans up stale references after removal operations. Idempotent.
Definition topo.hpp:3247
uint32_t compsolid_solid_count(const NodeId theCompSolid) const
Returns the number of solids in a compsolid.
Definition topo.hpp:2401
Graph clone() const
Deep-clones this graph into a new, independent graph.
Definition topo.hpp:3213
IntersectionIter intersections(const NodeId theNodeA, const NodeId theNodeB, const RelationOptions *const theOptions=nullptr)
Inserts and returns generated intersection nodes for two graph nodes.
Definition topo.hpp:2490
NodeId edge_end_vertex(const NodeId theEdge) const
Returns the end vertex of an edge.
Definition topo.hpp:1830
std::vector< UID > history_generated(const UID theInputUid) const
Returns graph-owned Generated history images for an input UID.
Definition topo.hpp:1568
std::pair< Graph, NodeId > make_filling(const ::occtl_topo_filling_options_t &theOpts) const
Builds an N-side filling face from ordered boundary edges.
Definition topo.hpp:4694
bool edge_is_manifold(const NodeId theEdge) const
Returns whether an edge is manifold.
Definition topo.hpp:1975
std::pair< double, double > coedge_range(const NodeId theCoedge) const
Returns the parametric range of a coedge.
Definition topo.hpp:2033
NodeId make_product(const ::occtl_topo_make_product_info_t &theInfo)
Creates a product in the graph.
Definition topo.hpp:4029
void set_coedge_param_range(const NodeId theCoedge, const double theFirst, const double theLast)
Sets the parametric range of a coedge.
Definition topo.hpp:3193
NodeIter vertices() const
Range-for adapter over all active vertices.
Definition topo.hpp:2749
std::pair< Graph, NodeId > transformed(const NodeId theRoot, const Transform &theTransform) const
Creates a transformed copy of the shape rooted at theRoot.
Definition topo.hpp:4519
size_t shell_count() const
Active shell count.
Definition topo.hpp:1657
void face_uv_bounds_restricted(const NodeId theFace, const double theUMin, const double theUMax, const double theVMin, const double theVMax, const double theU, const double theV, ::occtl_point3_t &theOutPoint, ::occtl_vector3_t &theOutD1U, ::occtl_vector3_t &theOutD1V) const
Evaluates a face surface with its first partials inside a restricted UV box.
Definition topo.hpp:4400
void set_face_natural_restriction(const NodeId theFace, const bool theFlag)
Sets the natural-restriction flag on a face.
Definition topo.hpp:3184
Definition topo.hpp:965
RAII range adapter wrapping occtl_topo_intersection_iter_t.
Definition topo.hpp:962
Session-local identity of an assembly joint record. Mirrors occtl_joint_id_t.
Definition topo.hpp:162
static JointId invalid() noexcept
Returns the invalid sentinel (all-zero bits).
Definition topo.hpp:171
bool operator!=(const JointId &theOther) const noexcept
Bitwise inequality.
Definition topo.hpp:186
::occtl_joint_id_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition topo.hpp:174
bool operator==(const JointId &theOther) const noexcept
Bitwise equality.
Definition topo.hpp:181
bool is_valid() const noexcept
True when the ID is not the all-zero sentinel.
Definition topo.hpp:176
JointId(const ::occtl_joint_id_t theId) noexcept
Wraps an existing C value type (zero-cost).
Definition topo.hpp:165
Session-local identity of a graph node. Mirrors occtl_node_id_t.
Definition topo.hpp:52
::occtl_node_id_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition topo.hpp:64
NodeId(const ::occtl_node_id_t theId) noexcept
Wraps an existing C value type (zero-cost).
Definition topo.hpp:55
bool is_valid() const noexcept
True when the ID is not the all-zero sentinel.
Definition topo.hpp:66
bool operator==(const NodeId &theOther) const noexcept
Bitwise equality.
Definition topo.hpp:71
static NodeId invalid() noexcept
Returns the invalid sentinel (all-zero bits).
Definition topo.hpp:61
bool operator!=(const NodeId &theOther) const noexcept
Bitwise inequality.
Definition topo.hpp:76
Definition topo.hpp:354
iterator & operator++()
Advances to the next node and returns the iterator.
Definition topo.hpp:387
bool operator!=(const iterator &theOther) const noexcept
Returns true when iterators differ.
Definition topo.hpp:407
bool operator==(const iterator &theOther) const noexcept
Returns true when both iterators are at the same position or both are done.
Definition topo.hpp:397
const NodeId & operator*() const noexcept
Returns a reference to the current NodeId.
Definition topo.hpp:381
const NodeId * operator->() const noexcept
Returns a pointer to the current NodeId.
Definition topo.hpp:384
void operator++(int)
Advances to the next node (postfix).
Definition topo.hpp:394
RAII range adapter wrapping occtl_node_iter_t.
Definition topo.hpp:351
NodeIter(NodeIter &&theOther) noexcept
Move constructor — takes ownership of the iterator from theOther.
Definition topo.hpp:450
iterator end() noexcept
Returns the past-the-end sentinel iterator.
Definition topo.hpp:474
NodeIter & operator=(NodeIter &&theOther) noexcept
Move assignment — releases any previously owned iterator.
Definition topo.hpp:457
iterator begin() noexcept
Returns the begin iterator, which fetches the first node on construction.
Definition topo.hpp:471
Session-local identity of a reference entry. Mirrors occtl_ref_id_t.
Definition topo.hpp:90
bool operator!=(const RefId &theOther) const noexcept
Bitwise inequality.
Definition topo.hpp:114
bool is_valid() const noexcept
True when the ID is not the all-zero sentinel.
Definition topo.hpp:104
static RefId invalid() noexcept
Returns the invalid sentinel (all-zero bits).
Definition topo.hpp:99
RefId(const ::occtl_ref_id_t theId) noexcept
Wraps an existing C value type (zero-cost).
Definition topo.hpp:93
::occtl_ref_id_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition topo.hpp:102
bool operator==(const RefId &theOther) const noexcept
Bitwise equality.
Definition topo.hpp:109
Persistent identity surviving reference removal and graph compaction.
Definition uid.hpp:77
::occtl_ref_uid_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition uid.hpp:89
Definition topo.hpp:1320
RAII range adapter wrapping occtl_topo_related_iter_t.
Definition topo.hpp:1311
Identity of a representation (geometry / mesh data). Mirrors occtl_rep_id_t.
Definition topo.hpp:127
bool is_valid() const noexcept
True when the ID is not the all-zero sentinel.
Definition topo.hpp:141
::occtl_rep_id_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition topo.hpp:139
bool operator==(const RepId &theOther) const noexcept
Bitwise equality.
Definition topo.hpp:146
bool operator!=(const RepId &theOther) const noexcept
Bitwise inequality.
Definition topo.hpp:151
static RepId invalid() noexcept
Returns the invalid sentinel (all-zero bits).
Definition topo.hpp:136
RepId(const ::occtl_rep_id_t theId) noexcept
Wraps an existing C value type (zero-cost).
Definition topo.hpp:130
Persistent identity surviving representation removal and graph compaction.
Definition uid.hpp:132
::occtl_rep_uid_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition uid.hpp:144
Definition topo.hpp:605
RAII range adapter wrapping occtl_select_group_iter_t.
Definition topo.hpp:602
Definition topo.hpp:485
RAII range adapter wrapping occtl_select_iter_t.
Definition topo.hpp:482
Definition topo.hpp:845
RAII range adapter wrapping occtl_topo_touch_iter_t.
Definition topo.hpp:842
Persistent identity surviving node removal and graph compaction. Mirrors occtl_uid_t.
Definition uid.hpp:39
::occtl_uid_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition uid.hpp:51
C++ veneer for the core module.
void check(const ::occtl_status_t theStatus)
Throw on non-OK; otherwise a no-op.
Definition core.hpp:85
C++ veneer for the geom module.
struct occtl_uid occtl_uid_t
enum occtl_status occtl_status_t
enum occtl_rep_kind occtl_rep_kind_t
enum occtl_ref_kind occtl_ref_kind_t
@ OCCTL_OK
Definition occtl_core.h:133
@ OCCTL_INTERNAL
Definition occtl_core.h:149
@ OCCTL_INVALID_HANDLE
Definition occtl_core.h:136
@ OCCTL_NOT_FOUND
Definition occtl_core.h:137
@ OCCTL_CANCELLED
Definition occtl_core.h:146
#define OCCTL_UID_INVALID
Definition occtl_core.h:286
enum occtl_node_kind occtl_node_kind_t
@ OCCTL_CURVE_KIND_UNDEFINED
Definition occtl_curves_common.h:55
enum occtl_curve_kind occtl_curve_kind_t
@ OCCTL_SURFACE_KIND_UNDEFINED
Definition occtl_surfaces.h:65
enum occtl_surface_kind occtl_surface_kind_t
OCCT-Light: topology module public API.
occtl_status_t occtl_graph_units_set(occtl_graph_t *graph, double length_unit_to_meter, const char *name, size_t nameLen)
occtl_status_t occtl_graph_ref_uid_from_ref_id(const occtl_graph_t *graph, occtl_ref_id_t ref_id, occtl_ref_uid_t *out_ref_uid)
occtl_status_t occtl_graph_wire_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_metadata_keys(const occtl_graph_t *graph, occtl_metadata_key_view_t *out_keys, size_t cap, size_t *out_count)
void occtl_shell_view_init(occtl_shell_view_t *view)
occtl_status_t occtl_topo_edge_start_vertex(const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t *out_vertex)
struct occtl_node_iter occtl_node_iter_t
Definition occtl_topo.h:1951
occtl_status_t occtl_topo_edge_vertex_count(const occtl_graph_t *graph, occtl_node_id_t edge, uint32_t *out_count)
occtl_status_t occtl_graph_compound_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_edge_eval_dn(const occtl_graph_t *graph, occtl_node_id_t edge, double u, uint32_t n, occtl_vector3_t *out_dn)
occtl_status_t occtl_topo_edge_curve_kind(const occtl_graph_t *graph, occtl_node_id_t edge, occtl_curve_kind_t *out_kind)
occtl_status_t occtl_topo_face_eval_dn(const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, uint32_t nu, uint32_t nv, occtl_vector3_t *out_dn)
occtl_status_t occtl_graph_metadata_set(occtl_graph_t *graph, const char *key, size_t keyLen, const char *value, size_t valueLen)
occtl_status_t occtl_graph_name_get(const occtl_graph_t *graph, occtl_node_id_t target, char *buf, size_t bufSize, size_t *out_required)
occtl_status_t occtl_graph_material_set(occtl_graph_t *graph, occtl_node_id_t target, const occtl_material_info_t *info)
occtl_status_t occtl_graph_solid_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_compound_child_count(const occtl_graph_t *graph, occtl_node_id_t compound, uint32_t *out_count)
occtl_status_t occtl_topo_compound_view(const occtl_graph_t *graph, occtl_node_id_t compound, occtl_compound_view_t *view)
occtl_status_t occtl_topo_occurrence_set_transform(occtl_graph_t *graph, occtl_node_id_t occurrence, occtl_transform_t transform)
occtl_status_t occtl_topo_coedge_is_reversed(const occtl_graph_t *graph, occtl_node_id_t coedge, int32_t *out_is_reversed)
occtl_status_t occtl_graph_metadata_get(const occtl_graph_t *graph, const char *key, size_t keyLen, char *buf, size_t bufSize, size_t *out_required)
occtl_status_t occtl_graph_occurrence_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_tag_nodes(const occtl_graph_t *graph, const char *tag, size_t tagLen, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_history_modified(const occtl_graph_t *graph, occtl_uid_t input_uid, occtl_uid_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_edge_has_curve(const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_has_curve)
occtl_status_t occtl_topo_coedge_is_seam(const occtl_graph_t *graph, occtl_node_id_t coedge, int32_t *out_is_seam)
occtl_status_t occtl_graph_name_set(occtl_graph_t *graph, occtl_node_id_t target, const char *name, size_t nameLen)
occtl_status_t occtl_topo_coedge_edge_of(const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t *out_edge)
occtl_status_t occtl_topo_solid_shell_count(const occtl_graph_t *graph, occtl_node_id_t solid, uint32_t *out_count)
occtl_status_t occtl_graph_product_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_joint_list(const occtl_graph_t *graph, occtl_node_id_t node, occtl_joint_id_t *out_joints, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_edge_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_for_each_related(const occtl_graph_t *graph, occtl_node_id_t node, occtl_node_visitor_t visitor, void *user_data)
occtl_status_t occtl_topo_face_surface_kind(const occtl_graph_t *graph, occtl_node_id_t face, occtl_surface_kind_t *out_kind)
occtl_status_t occtl_graph_tag_list(const occtl_graph_t *graph, occtl_node_id_t target, occtl_tag_view_t *out_tags, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_color_get(const occtl_graph_t *graph, occtl_node_id_t target, occtl_color_rgba_t *out_color)
occtl_status_t occtl_topo_coedge_pcurve_eval_d3(const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv, occtl_vector2_t *out_d1, occtl_vector2_t *out_d2, occtl_vector2_t *out_d3)
occtl_status_t occtl_topo_edge_is_manifold(const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_is_manifold)
occtl_status_t occtl_topo_vertex_parameters(const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_node_id_t face, occtl_point2_t *out_uv)
occtl_status_t occtl_graph_occurrence_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_link_product(occtl_graph_t *graph, occtl_node_id_t product, occtl_node_id_t root, occtl_transform_t placement)
occtl_status_t occtl_topo_wire_face_of(const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_id_t *out_face)
occtl_status_t occtl_topo_coedges_of_wire_iter_create(const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_vertex_view(const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_vertex_view_t *view)
void occtl_solid_view_init(occtl_solid_view_t *view)
occtl_status_t occtl_topo_wires_of_face_iter_create(const occtl_graph_t *graph, occtl_node_id_t face, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_rep_id_from_rep_uid(const occtl_graph_t *graph, occtl_rep_uid_t rep_uid, occtl_rep_id_t *out_rep_id)
occtl_status_t occtl_topo_face_eval_d1(const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v)
occtl_status_t occtl_graph_tag_add(occtl_graph_t *graph, occtl_node_id_t target, const char *tag, size_t tagLen)
occtl_status_t occtl_graph_node_metadata_unset(occtl_graph_t *graph, occtl_node_id_t target, const char *key, size_t keyLen)
occtl_status_t occtl_topo_face_has_triangulation(const occtl_graph_t *graph, occtl_node_id_t face, int32_t *out_has_triangulation)
occtl_status_t occtl_topo_face_eval(const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p)
occtl_status_t occtl_graph_node_metadata_set(occtl_graph_t *graph, occtl_node_id_t target, const char *key, size_t keyLen, const char *value, size_t valueLen)
occtl_status_t occtl_topo_edge_is_seam_on_face(const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t face, int32_t *out_is_seam)
void occtl_wire_view_init(occtl_wire_view_t *view)
occtl_status_t occtl_topo_solid_view(const occtl_graph_t *graph, occtl_node_id_t solid, occtl_solid_view_t *view)
occtl_status_t occtl_topo_coedge_seam_pair(const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t *out_pair)
occtl_status_t occtl_graph_tag_has(const occtl_graph_t *graph, occtl_node_id_t target, const char *tag, size_t tagLen, int32_t *out_has_tag)
occtl_status_t occtl_joint_get(const occtl_graph_t *graph, occtl_joint_id_t joint, occtl_joint_info_t *out_info)
occtl_status_t occtl_topo_coedge_range(const occtl_graph_t *graph, occtl_node_id_t coedge, double *out_first, double *out_last)
occtl_status_t occtl_topo_occurrence_transform(const occtl_graph_t *graph, occtl_node_id_t occurrence, occtl_transform_t *out_transform)
occtl_status_t occtl_topo_shell_face_count(const occtl_graph_t *graph, occtl_node_id_t shell, uint32_t *out_count)
occtl_status_t occtl_topo_edge_tolerance(const occtl_graph_t *graph, occtl_node_id_t edge, double *out_tolerance)
occtl_status_t occtl_graph_metadata_unset(occtl_graph_t *graph, const char *key, size_t keyLen)
occtl_status_t occtl_graph_coedge_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_shell_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_topo_coedge_has_pcurve(const occtl_graph_t *graph, occtl_node_id_t coedge, int32_t *out_has_pcurve)
occtl_status_t occtl_graph_color_set(occtl_graph_t *graph, occtl_node_id_t target, occtl_color_rgba_t color)
occtl_status_t occtl_topo_face_eval_d3(const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv, occtl_vector3_t *out_d3u, occtl_vector3_t *out_d3v, occtl_vector3_t *out_d3uuv, occtl_vector3_t *out_d3uvv)
occtl_status_t occtl_graph_vertex_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_vertex_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_color_entries(const occtl_graph_t *graph, occtl_node_id_t *out_nodes, occtl_color_rgba_t *out_colors, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_coedge_pcurve_eval_d2(const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv, occtl_vector2_t *out_d1, occtl_vector2_t *out_d2)
occtl_status_t occtl_graph_history_generated(const occtl_graph_t *graph, occtl_uid_t input_uid, occtl_uid_t *out_buf, size_t cap, size_t *out_count)
void occtl_node_iter_free(occtl_node_iter_t *iter)
occtl_status_t occtl_graph_for_each(const occtl_graph_t *graph, uint64_t kind_mask, occtl_node_visitor_t visitor, void *user_data)
occtl_status_t occtl_topo_occurrences_of_product_iter_create(const occtl_graph_t *graph, occtl_node_id_t product, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_ref_uid_table(const occtl_graph_t *graph, occtl_ref_uid_t *out_ref_uids, occtl_ref_id_t *out_refs, size_t cap, size_t *out_count)
occtl_status_t occtl_joint_remove(occtl_graph_t *graph, occtl_joint_id_t joint)
occtl_status_t occtl_topo_link_products_occurrence(occtl_graph_t *graph, occtl_node_id_t parentProduct, occtl_node_id_t childProduct, occtl_transform_t placement, occtl_node_id_t parentOccurrence, occtl_node_id_t *out_occurrence)
occtl_status_t occtl_topo_vertex_point(const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_point3_t *out_point)
occtl_status_t occtl_graph_rep_kind(const occtl_graph_t *graph, occtl_rep_id_t id, occtl_rep_kind_t *out_kind)
occtl_status_t occtl_graph_node_id_from_uid(const occtl_graph_t *graph, occtl_uid_t uid, occtl_node_id_t *out_node_id)
occtl_status_t occtl_graph_wire_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_solid_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_node_metadata_nodes(const occtl_graph_t *graph, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_uid_from_node_id(const occtl_graph_t *graph, occtl_node_id_t id, occtl_uid_t *out_uid)
occtl_status_t occtl_topo_shells_of_solid_iter_create(const occtl_graph_t *graph, occtl_node_id_t solid, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_face_tolerance(const occtl_graph_t *graph, occtl_node_id_t face, double *out_tolerance)
occtl_status_t occtl_topo_edge_eval_d3(const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p, occtl_vector3_t *out_d1, occtl_vector3_t *out_d2, occtl_vector3_t *out_d3)
occtl_status_t occtl_topo_wire_is_outer(const occtl_graph_t *graph, occtl_node_id_t wire, int32_t *out_is_outer)
occtl_status_t occtl_topo_coedge_pcurve_eval_d1(const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv, occtl_vector2_t *out_d1)
occtl_status_t occtl_topo_face_uv_bounds(const occtl_graph_t *graph, occtl_node_id_t face, double *out_umin, double *out_umax, double *out_vmin, double *out_vmax)
occtl_status_t occtl_graph_compound_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_name_nodes(const occtl_graph_t *graph, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_material_get(const occtl_graph_t *graph, occtl_node_id_t target, occtl_material_info_t *out_info, char *name_buf, size_t name_buf_size, size_t *out_name_required)
occtl_status_t occtl_topo_face_has_surface(const occtl_graph_t *graph, occtl_node_id_t face, int32_t *out_has_surface)
occtl_status_t occtl_topo_vertex_parameter(const occtl_graph_t *graph, occtl_node_id_t vertex, occtl_node_id_t edge, double *out_parameter)
occtl_status_t occtl_topo_compsolid_solid_count(const occtl_graph_t *graph, occtl_node_id_t compsolid, uint32_t *out_count)
occtl_status_t occtl_topo_wire_distinct_edge_count(const occtl_graph_t *graph, occtl_node_id_t wire, uint32_t *out_count)
occtl_status_t occtl_topo_edge_end_vertex(const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t *out_vertex)
occtl_status_t occtl_graph_color_unset(occtl_graph_t *graph, occtl_node_id_t target)
occtl_status_t occtl_graph_root_product_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_vertex_tolerance(const occtl_graph_t *graph, occtl_node_id_t vertex, double *out_tolerance)
occtl_status_t occtl_topo_face_wire_count(const occtl_graph_t *graph, occtl_node_id_t face, uint32_t *out_count)
occtl_status_t occtl_topo_face_natural_restriction(const occtl_graph_t *graph, occtl_node_id_t face, int32_t *out_has_natural_restriction)
occtl_status_t occtl_topo_coedge_pcurve_parameter(const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t vertex, double *out_parameter)
void occtl_compound_view_init(occtl_compound_view_t *view)
occtl_status_t occtl_topo_faces_of_shell_iter_create(const occtl_graph_t *graph, occtl_node_id_t shell, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_shell_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_rep_uid_from_rep_id(const occtl_graph_t *graph, occtl_rep_id_t rep_id, occtl_rep_uid_t *out_rep_uid)
occtl_status_t occtl_topo_edge_is_degenerated(const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_is_degenerated)
void occtl_vertex_view_init(occtl_vertex_view_t *view)
occtl_status_t occtl_topo_wire_explorer_create(const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_material_unset(occtl_graph_t *graph, occtl_node_id_t target)
occtl_status_t occtl_topo_edge_eval(const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p)
occtl_status_t occtl_topo_coedge_face_of(const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_node_id_t *out_face)
occtl_status_t occtl_graph_face_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_create(occtl_graph_t **out_graph)
occtl_status_t occtl_graph_units_get(const occtl_graph_t *graph, double *out_length_unit_to_meter, char *name_buf, size_t name_buf_size, size_t *out_name_required)
occtl_status_t occtl_graph_compsolid_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_product_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_topo_face_eval_d2(const occtl_graph_t *graph, occtl_node_id_t face, double u, double v, occtl_point3_t *out_p, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv)
occtl_status_t occtl_topo_coedge_uv_points(const occtl_graph_t *graph, occtl_node_id_t coedge, occtl_point2_t *out_uv_start, occtl_point2_t *out_uv_end)
occtl_status_t occtl_graph_ref_kind(const occtl_graph_t *graph, occtl_ref_id_t id, occtl_ref_kind_t *out_kind)
occtl_status_t occtl_topo_shell_view(const occtl_graph_t *graph, occtl_node_id_t shell, occtl_shell_view_t *view)
occtl_status_t occtl_graph_ref_uid_kind(const occtl_graph_t *graph, occtl_ref_uid_t ref_uid, occtl_ref_kind_t *out_kind)
occtl_status_t occtl_topo_edge_eval_d2(const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p, occtl_vector3_t *out_d1, occtl_vector3_t *out_d2)
occtl_status_t occtl_topo_edges_of_wire_iter_create(const occtl_graph_t *graph, occtl_node_id_t wire, occtl_node_iter_t **out_iter)
occtl_status_t occtl_topo_occurrence_world_transform(const occtl_graph_t *graph, occtl_node_id_t root, occtl_node_id_t occurrence, occtl_transform_t *out_transform)
occtl_status_t occtl_topo_link_products(occtl_graph_t *graph, occtl_node_id_t parentProduct, occtl_node_id_t childProduct, occtl_transform_t placement, occtl_node_id_t parentOccurrence)
occtl_status_t occtl_topo_wire_is_closed(const occtl_graph_t *graph, occtl_node_id_t wire, int32_t *out_is_closed)
occtl_status_t occtl_topo_wire_coedge_count(const occtl_graph_t *graph, occtl_node_id_t wire, uint32_t *out_count)
occtl_status_t occtl_topo_edge_face_count(const occtl_graph_t *graph, occtl_node_id_t edge, uint32_t *out_count)
occtl_status_t occtl_topo_vertex_edge_count(const occtl_graph_t *graph, occtl_node_id_t vertex, uint32_t *out_count)
occtl_status_t occtl_graph_edge_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_coedge_iter_create(const occtl_graph_t *graph, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_for_each_ref(const occtl_graph_t *graph, uint64_t ref_kind_mask, occtl_ref_visitor_t visitor, void *user_data)
occtl_status_t occtl_topo_make_product(occtl_graph_t *graph, const occtl_topo_make_product_info_t *info, occtl_node_id_t *out_product)
occtl_status_t occtl_topo_wire_view(const occtl_graph_t *graph, occtl_node_id_t wire, occtl_wire_view_t *view)
occtl_status_t occtl_graph_face_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_node_kind(const occtl_graph_t *graph, occtl_node_id_t id, occtl_node_kind_t *out_kind)
occtl_status_t occtl_topo_edge_eval_d1(const occtl_graph_t *graph, occtl_node_id_t edge, double u, occtl_point3_t *out_p, occtl_vector3_t *out_d1)
occtl_status_t occtl_topo_product_occurrence_count(const occtl_graph_t *graph, occtl_node_id_t product, uint32_t *out_count)
occtl_status_t occtl_topo_link_product_occurrence(occtl_graph_t *graph, occtl_node_id_t product, occtl_node_id_t root, occtl_transform_t placement, occtl_node_id_t *out_occurrence)
occtl_status_t occtl_graph_tag_remove(occtl_graph_t *graph, occtl_node_id_t target, const char *tag, size_t tagLen)
occtl_status_t occtl_graph_ref_id_from_ref_uid(const occtl_graph_t *graph, occtl_ref_uid_t ref_uid, occtl_ref_id_t *out_ref_id)
occtl_status_t occtl_topo_wire_edge_count(const occtl_graph_t *graph, occtl_node_id_t wire, uint32_t *out_count)
occtl_status_t occtl_topo_edge_range(const occtl_graph_t *graph, occtl_node_id_t edge, double *out_first, double *out_last)
occtl_status_t occtl_topo_coedge_pcurve_eval(const occtl_graph_t *graph, occtl_node_id_t coedge, double u, occtl_point2_t *out_uv)
occtl_status_t occtl_graph_node_metadata_get(const occtl_graph_t *graph, occtl_node_id_t target, const char *key, size_t keyLen, char *buf, size_t bufSize, size_t *out_required)
occtl_status_t occtl_graph_node_count(const occtl_graph_t *graph, size_t *out_count)
occtl_status_t occtl_graph_uid_kind(const occtl_graph_t *graph, occtl_uid_t uid, occtl_node_kind_t *out_kind)
occtl_status_t occtl_topo_edge_same_parameter(const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_has_same_parameter)
occtl_status_t occtl_graph_for_each_rep(const occtl_graph_t *graph, uint64_t rep_kind_mask, occtl_rep_visitor_t visitor, void *user_data)
occtl_status_t occtl_joint_create(occtl_graph_t *graph, const occtl_joint_info_t *info, occtl_joint_id_t *out_joint)
occtl_status_t occtl_topo_vertices_of_edge_iter_create(const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_iter_t **out_iter)
occtl_status_t occtl_graph_node_metadata_keys(const occtl_graph_t *graph, occtl_node_id_t target, occtl_metadata_key_view_t *out_keys, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_history_deleted_all(const occtl_graph_t *graph, occtl_uid_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_remove_occurrence(occtl_graph_t *graph, occtl_ref_id_t occurrence_ref)
occtl_status_t occtl_topo_coedge_pcurve_eval_dn(const occtl_graph_t *graph, occtl_node_id_t coedge, double u, uint32_t n, occtl_vector2_t *out_dn)
occtl_status_t occtl_node_iter_next(occtl_node_iter_t *iter, occtl_node_id_t *out_id)
occtl_status_t occtl_topo_edge_same_range(const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_has_same_range)
occtl_status_t occtl_topo_edge_is_boundary(const occtl_graph_t *graph, occtl_node_id_t edge, int32_t *out_is_boundary)
occtl_status_t occtl_graph_material_nodes(const occtl_graph_t *graph, occtl_node_id_t *out_nodes, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_compsolid_count(const occtl_graph_t *graph, size_t *out_count)
void occtl_graph_free(occtl_graph_t *graph)
occtl_status_t occtl_topo_face_outer_wire(const occtl_graph_t *graph, occtl_node_id_t face, occtl_node_id_t *out_wire)
occtl_status_t occtl_topo_shell_is_closed(const occtl_graph_t *graph, occtl_node_id_t shell, int32_t *out_is_closed)
OCCT-Light: graph-native algorithms — sewing, same-parameter recompute, validation.
occtl_status_t occtl_topo_make_hlr_projection(const occtl_graph_t *graph, const occtl_topo_hlr_options_t *options, occtl_topo_hlr_result_t *out_result)
struct occtl_topo_extrude_faces_options occtl_topo_extrude_faces_options_t
occtl_status_t occtl_topo_mirrored(const occtl_graph_t *graph, occtl_node_id_t root, occtl_point3_t point, occtl_direction3_t normal, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_make_circular_pattern(const occtl_graph_t *graph, occtl_node_id_t root, const occtl_topo_circular_pattern_options_t *opts, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_transformed(const occtl_graph_t *graph, occtl_node_id_t root, occtl_transform_t transform, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
struct occtl_topo_section_by_planes_options occtl_topo_section_by_planes_options_t
struct occtl_topo_section_plane occtl_topo_section_plane_t
struct occtl_topo_max_fillet_radius_options occtl_topo_max_fillet_radius_options_t
occtl_status_t occtl_topo_make_filling_patch(const occtl_graph_t *graph, const occtl_topo_filling_patch_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_project_face_along_direction(const occtl_graph_t *graph, const occtl_topo_project_face_direction_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
struct occtl_topo_split_by_plane_options occtl_topo_split_by_plane_options_t
occtl_status_t occtl_topo_defeature(const occtl_graph_t *graph, const occtl_topo_defeature_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_fillet(occtl_graph_t *graph, const occtl_topo_fillet_options_t *opts, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_make_filling(const occtl_graph_t *graph, const occtl_topo_filling_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_make_sections_by_planes(const occtl_graph_t *graph, const occtl_topo_section_by_planes_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_wrap_on_face(const occtl_graph_t *graph, const occtl_topo_wrap_on_face_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_check(const occtl_graph_t *graph, occtl_topo_check_issue_t *out_issues, size_t cap, size_t *out_count)
#define OCCTL_TOPO_HLR_RESULT_INIT
Definition occtl_topo_algo.h:864
occtl_status_t occtl_topo_project_on_face(const occtl_graph_t *graph, const occtl_topo_project_on_face_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_face_to_arcs(const occtl_graph_t *graph, const occtl_topo_face_to_arcs_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_draft_faces(const occtl_graph_t *graph, const occtl_topo_draft_faces_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_max_fillet_radius(const occtl_graph_t *graph, const occtl_topo_max_fillet_radius_options_t *options, double *out_radius)
occtl_status_t occtl_topo_make_face_extrusion(const occtl_graph_t *graph, const occtl_topo_extrude_faces_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_make_linear_pattern(const occtl_graph_t *graph, occtl_node_id_t root, const occtl_topo_linear_pattern_options_t *opts, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_blend_edges(const occtl_graph_t *graph, const occtl_topo_edge_blend_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_make_split_by_plane(const occtl_graph_t *graph, const occtl_topo_split_by_plane_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_make_offset_features(const occtl_graph_t *graph, const occtl_topo_offset_features_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_topo_wire_offset_2d(occtl_graph_t *graph, const occtl_topo_wire_offset_2d_options_t *options, occtl_node_id_t *out_wire)
void occtl_select_iter_free(occtl_select_iter_t *iter)
occtl_status_t occtl_graph_clone(const occtl_graph_t *source, occtl_graph_t **out_graph)
occtl_status_t occtl_topo_shell_add_face(occtl_graph_t *graph, occtl_node_id_t shell, occtl_node_id_t face, occtl_orientation_t orientation)
struct occtl_topo_face_chamfer_2d_options occtl_topo_face_chamfer_2d_options_t
occtl_status_t occtl_topo_add_pcurve(occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t face, occtl_rep_id_t pcurve_id, double first, double last, occtl_orientation_t orientation)
occtl_status_t occtl_topo_set_ref_location(occtl_graph_t *graph, occtl_ref_id_t ref_id, occtl_transform_t transform)
occtl_status_t occtl_topo_set_edge_tolerance(occtl_graph_t *graph, occtl_node_id_t edge, double tol)
occtl_status_t occtl_topo_remove_subgraph(occtl_graph_t *graph, occtl_node_id_t id)
struct occtl_topo_wire_chamfer_2d_options occtl_topo_wire_chamfer_2d_options_t
occtl_status_t occtl_graph_descendant_faces_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_make_solid(occtl_graph_t *graph, const occtl_topo_make_solid_info_t *info, occtl_node_id_t *out_solid)
occtl_status_t occtl_topo_set_coedge_param_range(occtl_graph_t *graph, occtl_node_id_t coedge, double first, double last)
enum occtl_joint_kind occtl_joint_kind_t
occtl_status_t occtl_topo_face_chamfer_2d(occtl_graph_t *graph, const occtl_topo_face_chamfer_2d_options_t *options, occtl_node_id_t *out_face)
occtl_status_t occtl_topo_replace_coedge_pcurve(occtl_graph_t *graph, occtl_node_id_t coedge, occtl_rep_id_t pcurve_id)
occtl_status_t occtl_topo_remove_with_replacement(occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t replacement)
occtl_status_t occtl_topo_set_edge_is_degenerate(occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
struct occtl_select_group_view occtl_select_group_view_t
struct occtl_batch occtl_batch_t
Definition occtl_topo_build.h:1064
occtl_status_t occtl_graph_face_uv_bounds_get(occtl_graph_t *graph, occtl_node_id_t face, occtl_graph_uv_bounds_t *out_uv_bounds)
occtl_status_t occtl_graph_pair_distance_get(occtl_graph_t *graph, occtl_node_id_t first, occtl_node_id_t second, double *out_distance)
void occtl_select_group_iter_free(occtl_select_group_iter_t *iter)
enum occtl_select_group_key occtl_select_group_key_t
struct occtl_topo_edges_to_wires_options occtl_topo_edges_to_wires_options_t
struct occtl_select_metadata_filter occtl_select_metadata_filter_t
occtl_status_t occtl_topo_compound_add_child(occtl_graph_t *graph, occtl_node_id_t compound, occtl_node_id_t child, occtl_orientation_t orientation)
occtl_status_t occtl_topo_make_edge(occtl_graph_t *graph, const occtl_topo_make_edge_info_t *info, occtl_node_id_t *out_edge)
occtl_status_t occtl_topo_remove_ref(occtl_graph_t *graph, occtl_ref_id_t ref_id)
occtl_status_t occtl_topo_set_wire_ref_is_outer(occtl_graph_t *graph, occtl_ref_id_t ref_id, int32_t flag)
occtl_status_t occtl_topo_make_face_from_wires_auto(occtl_graph_t *graph, const occtl_topo_make_face_from_wires_auto_options_t *options, occtl_node_id_t *out_face)
occtl_status_t occtl_select_tagged_iter_create(occtl_graph_t *graph, const occtl_select_options_t *options, const char *tag, size_t tagLen, occtl_select_iter_t **out_iter)
enum occtl_select_axis_position occtl_select_axis_position_t
occtl_status_t occtl_topo_set_vertex_tolerance(occtl_graph_t *graph, occtl_node_id_t vertex, double tol)
occtl_status_t occtl_topo_edge_has_polygon3d(const occtl_graph_t *const graph, occtl_node_id_t edge, int32_t *const out_has_polygon3d)
occtl_status_t occtl_topo_set_vertex_point(occtl_graph_t *graph, occtl_node_id_t vertex, occtl_point3_t point)
struct occtl_select_group_iter occtl_select_group_iter_t
Definition occtl_topo_build.h:2242
occtl_status_t occtl_batch_commit(occtl_batch_t *batch)
occtl_status_t occtl_topo_compound_remove_child(occtl_graph_t *graph, occtl_node_id_t compound, occtl_node_id_t child)
occtl_status_t occtl_topo_face_add_holes(occtl_graph_t *graph, occtl_node_id_t face, const occtl_node_id_t *holes, size_t hole_count)
occtl_status_t occtl_topo_set_edge_start_vertex(occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
occtl_status_t occtl_topo_solid_remove_shell(occtl_graph_t *graph, occtl_node_id_t solid, occtl_node_id_t shell)
struct occtl_topo_make_face_from_wires_auto_options occtl_topo_make_face_from_wires_auto_options_t
occtl_status_t occtl_topo_edge_has_continuity(const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t faceA, occtl_node_id_t faceB, int32_t *const out_has_continuity)
struct occtl_joint_info occtl_joint_info_t
occtl_status_t occtl_topo_edge_find_coedge_on_face_oriented(const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t face, occtl_orientation_t orientation, occtl_node_id_t *const out_coedge)
occtl_status_t occtl_topo_set_ref_orientation(occtl_graph_t *graph, occtl_ref_id_t ref_id, occtl_orientation_t orientation)
occtl_status_t occtl_topo_edge_continuity(const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t faceA, occtl_node_id_t faceB, occtl_shape_continuity_t *const out_continuity)
occtl_status_t occtl_topo_set_edge_end_vertex(occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
occtl_status_t occtl_topo_remove_rep(occtl_graph_t *graph, occtl_rep_id_t rep_id)
occtl_status_t occtl_topo_set_face_tolerance(occtl_graph_t *graph, occtl_node_id_t face, double tol)
occtl_status_t occtl_graph_mass_properties_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_graph_mass_properties_t *out_properties)
occtl_status_t occtl_graph_compact(occtl_graph_t *graph)
occtl_status_t occtl_topo_wire_chamfer_2d(occtl_graph_t *graph, const occtl_topo_wire_chamfer_2d_options_t *options, occtl_node_id_t *out_wire)
occtl_status_t occtl_topo_set_shell_is_closed(occtl_graph_t *graph, occtl_node_id_t shell, int32_t flag)
occtl_status_t occtl_topo_vertex_pcurve_parameter(const occtl_graph_t *const graph, occtl_node_id_t vertex, occtl_node_id_t coedge, double *const out_u)
occtl_status_t occtl_topo_set_wire_is_closed(occtl_graph_t *graph, occtl_node_id_t wire, int32_t flag)
occtl_status_t occtl_graph_clear_cached(occtl_graph_t *graph, occtl_node_id_t node, occtl_ref_id_t ref)
occtl_status_t occtl_topo_set_edge_same_range(occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
occtl_status_t occtl_graph_obb_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_graph_obb_t *out_obb)
occtl_status_t occtl_topo_face_uv_bounds_restricted(const occtl_graph_t *const graph, occtl_node_id_t face, double umin, double umax, double vmin, double vmax, double u, double v, occtl_point3_t *const out_point, occtl_vector3_t *const out_d1u, occtl_vector3_t *const out_d1v)
occtl_status_t occtl_select_iter_next(occtl_select_iter_t *iter, occtl_node_id_t *out_node)
occtl_status_t occtl_graph_measure_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_select_measure_kind_t kind, double *out_value)
occtl_status_t occtl_topo_vertex_point_in_usage(const occtl_graph_t *const graph, occtl_node_id_t vertex, occtl_node_id_t parent, occtl_point3_t *const out_point)
enum occtl_select_normal_mode occtl_select_normal_mode_t
occtl_status_t occtl_topo_make_shell(occtl_graph_t *graph, const occtl_topo_make_shell_info_t *info, occtl_node_id_t *out_shell)
enum occtl_select_bbox_mode occtl_select_bbox_mode_t
occtl_status_t occtl_graph_adjacent_faces_get(occtl_graph_t *graph, occtl_node_id_t face, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
enum occtl_select_measure_kind occtl_select_measure_kind_t
occtl_status_t occtl_topo_face_remove_holes(occtl_graph_t *graph, occtl_node_id_t face, const occtl_node_id_t *holes, size_t hole_count)
occtl_status_t occtl_graph_begin_batch(occtl_graph_t *graph, occtl_batch_t **out_batch)
occtl_status_t occtl_topo_coedge_orientation(const occtl_graph_t *const graph, occtl_node_id_t coedge, occtl_orientation_t *const out_orientation)
occtl_status_t occtl_topo_set_face_natural_restriction(occtl_graph_t *graph, occtl_node_id_t face, int32_t flag)
occtl_status_t occtl_topo_cleanup_removed_refs(occtl_graph_t *graph)
occtl_status_t occtl_graph_adjacent_edges_get(occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_make_compound(occtl_graph_t *graph, const occtl_topo_make_compound_info_t *info, occtl_node_id_t *out_compound)
occtl_status_t occtl_topo_edge_remove_vertex(occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
occtl_status_t occtl_topo_make_vertex(occtl_graph_t *graph, const occtl_topo_make_vertex_info_t *info, occtl_node_id_t *out_vertex)
occtl_status_t occtl_graph_descendant_edges_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_coedge_has_polygon_on_surface(const occtl_graph_t *const graph, occtl_node_id_t coedge, int32_t *const out_has_polygon_on_surface)
occtl_status_t occtl_topo_wire_fix_degenerate(occtl_graph_t *graph, const occtl_topo_wire_fix_degenerate_edges_options_t *options, size_t *out_removed)
occtl_status_t occtl_select_group_iter_create(occtl_graph_t *graph, const occtl_select_options_t *select_options, const occtl_select_group_options_t *group_options, occtl_select_group_iter_t **out_iter)
occtl_status_t occtl_topo_set_edge_is_closed(occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
occtl_status_t occtl_select_group_iter_next(occtl_select_group_iter_t *iter, occtl_select_group_view_t *out_view)
struct occtl_material_info occtl_material_info_t
struct occtl_select_distance_to_node_sort occtl_select_distance_to_node_sort_t
occtl_status_t occtl_topo_edge_split(occtl_graph_t *graph, occtl_node_id_t edge, double parameter, occtl_node_id_t *out_edge1, occtl_node_id_t *out_edge2)
struct occtl_select_iter occtl_select_iter_t
Definition occtl_topo_build.h:2231
struct occtl_select_options occtl_select_options_t
occtl_status_t occtl_select_iter_create(occtl_graph_t *graph, const occtl_select_options_t *options, occtl_select_iter_t **out_iter)
occtl_status_t occtl_topo_make_face(occtl_graph_t *graph, const occtl_topo_make_face_info_t *info, occtl_node_id_t *out_face)
occtl_status_t occtl_topo_edges_to_wires(occtl_graph_t *graph, const occtl_topo_edges_to_wires_options_t *options, occtl_node_id_t *out_wires, size_t cap, size_t *out_count)
enum occtl_select_axis occtl_select_axis_t
occtl_status_t occtl_graph_descendant_vertices_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_graph_face_surface_kind_get(occtl_graph_t *graph, occtl_node_id_t face, occtl_surface_kind_t *out_kind)
occtl_status_t occtl_topo_edge_find_coedge_on_face(const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_node_id_t face, occtl_node_id_t *const out_coedge)
struct occtl_topo_wire_offset_2d_options occtl_topo_wire_offset_2d_options_t
occtl_status_t occtl_graph_edge_curve_kind_get(occtl_graph_t *graph, occtl_node_id_t edge, occtl_curve_kind_t *out_kind)
struct occtl_tag_view occtl_tag_view_t
occtl_status_t occtl_batch_abort(occtl_batch_t *batch)
struct occtl_topo_wire_fix_degenerate_edges_options occtl_topo_wire_fix_degenerate_edges_options_t
occtl_status_t occtl_topo_edge_add_internal_vertex(occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t vertex)
occtl_status_t occtl_topo_replace_edge_curve(occtl_graph_t *graph, occtl_node_id_t edge, occtl_rep_id_t curve_id)
occtl_status_t occtl_graph_descendants_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_node_kind_t descendant_kind, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_make_compsolid(occtl_graph_t *graph, const occtl_topo_make_compsolid_info_t *info, occtl_node_id_t *out_compsolid)
occtl_status_t occtl_topo_solid_add_shell(occtl_graph_t *graph, occtl_node_id_t solid, occtl_node_id_t shell, occtl_orientation_t orientation)
occtl_status_t occtl_graph_bbox_get(occtl_graph_t *graph, occtl_node_id_t node, occtl_select_bbox_t *out_bbox)
occtl_status_t occtl_topo_set_edge_same_parameter(occtl_graph_t *graph, occtl_node_id_t edge, int32_t flag)
occtl_status_t occtl_topo_remove(occtl_graph_t *graph, occtl_node_id_t id)
enum occtl_select_sort_key occtl_select_sort_key_t
struct occtl_select_group_options occtl_select_group_options_t
occtl_status_t occtl_topo_make_wire(occtl_graph_t *graph, const occtl_topo_make_wire_info_t *info, occtl_node_id_t *out_wire)
occtl_status_t occtl_topo_replace_face_surface(occtl_graph_t *graph, occtl_node_id_t face, occtl_rep_id_t surface_id)
occtl_status_t occtl_topo_edge_max_continuity(const occtl_graph_t *const graph, occtl_node_id_t edge, occtl_shape_continuity_t *const out_continuity)
occtl_status_t occtl_topo_set_edge_param_range(occtl_graph_t *graph, occtl_node_id_t edge, double first, double last)
occtl_status_t occtl_topo_set_coedge_uv_box(occtl_graph_t *graph, occtl_node_id_t coedge, occtl_point2_t uv_lo, occtl_point2_t uv_hi)
enum occtl_select_sort_direction occtl_select_sort_direction_t
occtl_status_t occtl_topo_shell_remove_face(occtl_graph_t *graph, occtl_node_id_t shell, occtl_node_id_t face)
@ OCCTL_ORIENTATION_FORWARD
Definition occtl_topo_relation.h:67
occtl_status_t occtl_topo_connected_faces(const occtl_graph_t *graph, occtl_node_id_t seed_face, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
void occtl_topo_touch_iter_free(occtl_topo_touch_iter_t *iter)
occtl_status_t occtl_topo_touch_iter_create(const occtl_graph_t *graph, occtl_node_id_t node_a, occtl_node_id_t node_b, const occtl_topo_relation_options_t *options, occtl_topo_touch_iter_t **out_iter)
occtl_status_t occtl_topo_graph_distance(const occtl_graph_t *graph, occtl_node_id_t root, const occtl_node_id_t *sources, size_t source_count, occtl_node_id_t target, int32_t *out_distance)
occtl_status_t occtl_topo_is_inside(const occtl_graph_t *graph, occtl_node_id_t solid, occtl_point3_t point, double tolerance, int32_t include_boundary, int32_t *out_is_inside)
enum occtl_shape_continuity occtl_shape_continuity_t
enum occtl_relation_kind occtl_relation_kind_t
void occtl_topo_related_iter_free(occtl_topo_related_iter_t *iter)
struct occtl_topo_touch_iter occtl_topo_touch_iter_t
Definition occtl_topo_relation.h:395
occtl_status_t occtl_topo_connected_edges(const occtl_graph_t *graph, occtl_node_id_t seed_edge, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_axis_hit_iter_next(occtl_topo_axis_hit_iter_t *iter, occtl_topo_axis_hit_t *out_hit)
struct occtl_topo_touch_hit occtl_topo_touch_hit_t
struct occtl_topo_distance_pair occtl_topo_distance_pair_t
struct occtl_topo_relation_options occtl_topo_relation_options_t
struct occtl_topo_intersection_iter occtl_topo_intersection_iter_t
Definition occtl_topo_relation.h:406
occtl_status_t occtl_topo_intersection_iter_create(occtl_graph_t *graph, occtl_node_id_t node_a, occtl_node_id_t node_b, const occtl_topo_relation_options_t *options, occtl_topo_intersection_iter_t **out_iter)
occtl_status_t occtl_topo_axis_intersect_faces(const occtl_graph_t *graph, occtl_node_id_t root, occtl_axis1_placement_t axis, double min_parameter, double max_parameter, double tolerance, occtl_topo_axis_hit_iter_t **out_iter)
void occtl_topo_intersection_iter_free(occtl_topo_intersection_iter_t *iter)
occtl_status_t occtl_topo_wire_order_edges(const occtl_graph_t *graph, occtl_node_id_t wire, occtl_oriented_node_t *out_buf, size_t cap, size_t *out_count)
enum occtl_orientation occtl_orientation_t
occtl_status_t occtl_topo_classify_point(const occtl_graph_t *graph, occtl_node_id_t solid, occtl_point3_t point, double tolerance, occtl_topo_point_class_t *out_class)
@ OCCTL_RELATION_BOUNDARY_EDGE
Definition occtl_topo_relation.h:413
struct occtl_topo_axis_hit occtl_topo_axis_hit_t
occtl_status_t occtl_topo_common_vertices(const occtl_graph_t *graph, occtl_node_id_t node_a, occtl_node_id_t node_b, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
occtl_status_t occtl_topo_related_iter_next(occtl_topo_related_iter_t *iter, occtl_node_id_t *out_node, occtl_relation_kind_t *out_kind)
struct occtl_oriented_node occtl_oriented_node_t
@ OCCTL_TOPO_POINT_CLASS_UNKNOWN
Definition occtl_topo_relation.h:434
struct occtl_topo_axis_hit_iter occtl_topo_axis_hit_iter_t
Definition occtl_topo_relation.h:348
occtl_status_t occtl_topo_parent_explorer_create(const occtl_graph_t *graph, occtl_node_id_t node, const occtl_topo_parent_explorer_config_t *config, occtl_topo_explorer_iter_t **out_iter)
void occtl_topo_axis_hit_iter_free(occtl_topo_axis_hit_iter_t *iter)
occtl_status_t occtl_topo_related_iter_create(const occtl_graph_t *graph, occtl_node_id_t node, occtl_topo_related_iter_t **out_iter)
void occtl_topo_explorer_iter_free(occtl_topo_explorer_iter_t *iter)
occtl_status_t occtl_topo_intersection_iter_next(occtl_topo_intersection_iter_t *iter, occtl_node_id_t *out_node)
occtl_status_t occtl_topo_adjacent_edges(const occtl_graph_t *graph, occtl_node_id_t edge, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
enum occtl_topo_point_class occtl_topo_point_class_t
occtl_status_t occtl_topo_touch_iter_next(occtl_topo_touch_iter_t *iter, occtl_topo_touch_hit_t *out_hit)
occtl_status_t occtl_topo_adjacent_faces(const occtl_graph_t *graph, occtl_node_id_t face, occtl_node_id_t *out_buf, size_t cap, size_t *out_count)
struct occtl_topo_related_iter occtl_topo_related_iter_t
Definition occtl_topo_relation.h:337
occtl_status_t occtl_topo_child_explorer_create(const occtl_graph_t *graph, occtl_node_id_t root, const occtl_topo_child_explorer_config_t *config, occtl_topo_explorer_iter_t **out_iter)
struct occtl_topo_explorer_iter occtl_topo_explorer_iter_t
Definition occtl_topo_relation.h:131
occtl_status_t occtl_topo_is_same_geometry(const occtl_graph_t *graph, occtl_node_id_t node_a, occtl_node_id_t node_b, double tolerance, int32_t *out_is_same_geometry)
occtl_status_t occtl_topo_explorer_iter_next(occtl_topo_explorer_iter_t *iter, occtl_node_id_t *out_node, occtl_transform_t *out_transform, occtl_orientation_t *out_orientation)
#define OCCTL_NODE_ID_INVALID
Definition occtl_topo_types.h:138
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Directed line in 3D (origin + unit direction). Mirrors occtl_axis1_placement_t.
Definition geom.hpp:365
const occtl_axis1_placement_t & c_type() const noexcept
Borrows-it view of the underlying C value type.
Definition geom.hpp:379
One yield from an explorer iteration.
Definition topo.hpp:1181
Material-lite data stored on a graph node.
Definition topo.hpp:289
Graph-level length-unit metadata.
Definition topo.hpp:282
One yield from edge_split: the two sub-edges produced at the split point.
Definition topo.hpp:4226
NodeId Edge1
First sub-edge (start → split parameter).
Definition topo.hpp:4227
NodeId Edge2
Second sub-edge (split parameter → end).
Definition topo.hpp:4228
Category roots returned by OCCT hidden-line projection.
Definition topo.hpp:269
2D point value type. Mirrors occtl_point2_t with STL-flavoured access.
Definition geom.hpp:38
3D point value type. Mirrors occtl_point3_t with STL-flavoured access.
Definition geom.hpp:82
const occtl_point3_t & c_type() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition geom.hpp:102
Definition topo.hpp:1314
3-by-4 affine transform value type. Mirrors occtl_transform_t.
Definition geom.hpp:442
static Transform scale(const Point3 &theCenter, const double theFactor)
Returns a uniform-scale transform centred on theCenter.
Definition geom.hpp:469
static Transform rotation(const Axis1Placement &theAxis, const double theAngle)
Returns a rotation transform around theAxis by theAngle radians.
Definition geom.hpp:460
const occtl_transform_t & c_type() const noexcept
Borrows-it view of the underlying C value type.
Definition geom.hpp:495
static Transform translation(const Vector3 &theV) noexcept
Returns a pure-translation transform.
Definition geom.hpp:453
2D free-vector value type. Mirrors occtl_vector2_t.
Definition geom.hpp:128
3D free-vector value type. Mirrors occtl_vector3_t.
Definition geom.hpp:184
Definition occtl_topo_build.h:2096
Definition occtl_topo.h:3902
Definition occtl_topo_build.h:2292
Definition occtl_topo_build.h:2260
Definition occtl_topo_build.h:2274
Definition occtl_topo_types.h:120
uint64_t bits
Definition occtl_topo_types.h:121
Definition occtl_topo_build.h:2165
Definition occtl_topo_build.h:2114
double density
Definition occtl_topo_build.h:2120
occtl_color_rgba_t diffuse_color
Definition occtl_topo_build.h:2122
int32_t has_diffuse_color
Definition occtl_topo_build.h:2121
int32_t has_density
Definition occtl_topo_build.h:2119
occtl_uid_t metadata_uid
Definition occtl_topo_build.h:2123
Definition occtl_topo_types.h:50
uint64_t bits
Definition occtl_topo_types.h:51
Definition occtl_topo_relation.h:81
Definition occtl_geom.h:49
Definition occtl_geom.h:76
Definition occtl_topo_types.h:61
uint64_t bits
Definition occtl_topo_types.h:62
Definition occtl_topo_types.h:76
Definition occtl_core.h:251
uint64_t bits
Definition occtl_core.h:252
Definition occtl_topo_types.h:91
Definition occtl_topo_build.h:2248
Definition occtl_topo_build.h:2551
Definition occtl_topo_build.h:2564
Definition occtl_topo_build.h:2590
Definition occtl_topo_build.h:2525
Definition occtl_topo_build.h:2444
Definition occtl_topo.h:3813
Definition occtl_topo.h:3858
Definition occtl_topo_build.h:2217
Definition occtl_topo_relation.h:460
Definition occtl_topo_algo.h:1018
size_t selection_count
Definition occtl_topo_algo.h:1023
occtl_node_id_t root
Definition occtl_topo_algo.h:1021
int32_t parallel
Definition occtl_topo_algo.h:1024
const occtl_node_id_t * selections
Definition occtl_topo_algo.h:1022
Definition occtl_topo_relation.h:446
Definition occtl_topo_algo.h:324
double chamfer_dist1
Definition occtl_topo_algo.h:332
int32_t chamfer_mode
Definition occtl_topo_algo.h:331
double chamfer_dist2
Definition occtl_topo_algo.h:333
double radius
Definition occtl_topo_algo.h:330
occtl_node_id_t root
Definition occtl_topo_algo.h:327
const occtl_node_id_t * edges
Definition occtl_topo_algo.h:328
size_t edge_count
Definition occtl_topo_algo.h:329
Definition occtl_topo_build.h:161
Definition occtl_topo_algo.h:1522
Definition occtl_topo_build.h:302
Definition occtl_topo_algo.h:849
occtl_node_id_t visible_sharp
Definition occtl_topo_algo.h:853
occtl_node_id_t visible_seam
Definition occtl_topo_algo.h:855
occtl_graph_t * graph
Definition occtl_topo_algo.h:852
occtl_node_id_t hidden_seam
Definition occtl_topo_algo.h:859
occtl_node_id_t hidden_outline
Definition occtl_topo_algo.h:860
occtl_node_id_t hidden_smooth
Definition occtl_topo_algo.h:858
occtl_node_id_t visible_outline
Definition occtl_topo_algo.h:856
occtl_node_id_t hidden_sharp
Definition occtl_topo_algo.h:857
occtl_node_id_t visible_smooth
Definition occtl_topo_algo.h:854
Definition occtl_topo_build.h:419
Definition occtl_topo_algo.h:395
size_t edge_count
Definition occtl_topo_algo.h:400
occtl_node_id_t root
Definition occtl_topo_algo.h:398
const occtl_node_id_t * edges
Definition occtl_topo_algo.h:399
Definition occtl_topo_algo.h:1085
size_t selection_count
Definition occtl_topo_algo.h:1090
double base_offset
Definition occtl_topo_algo.h:1091
double selection_offset
Definition occtl_topo_algo.h:1092
occtl_node_id_t root
Definition occtl_topo_algo.h:1088
const occtl_node_id_t * selections
Definition occtl_topo_algo.h:1089
Definition occtl_topo_relation.h:361
Definition occtl_topo_algo.h:1455
Definition occtl_topo_algo.h:1444
Definition occtl_topo_algo.h:1376
Definition occtl_topo_relation.h:478
Definition occtl_topo_build.h:324
Definition occtl_topo_build.h:266
Definition occtl_topo_build.h:223
Definition occtl_geom.h:171
Definition occtl_core.h:272
Definition occtl_geom.h:56
Definition occtl_geom.h:84
Definition occtl_topo.h:3722
Definition occtl_topo.h:3767
::occtl_select_axis_t SelectAxis
Selector principal axis.
Definition topo.hpp:241
::occtl_joint_kind_t JointKind
Assembly joint kind.
Definition topo.hpp:302
::occtl_select_sort_direction_t SelectSortDirection
Selector output sort direction.
Definition topo.hpp:256
::occtl_select_sort_key_t SelectSortKey
Selector output sort key.
Definition topo.hpp:253
::occtl_select_group_key_t SelectGroupKey
Selector grouping key.
Definition topo.hpp:262
::occtl_topo_point_class_t PointClass
Point classification result for graph topology.
Definition topo.hpp:205
::occtl_surface_kind_t SurfaceKind
Surface kind used by face geometry.
Definition topo.hpp:223
::occtl_orientation_t Orientation
Orientation of a child entity inside its parent.
Definition topo.hpp:196
::occtl_select_axis_position_t SelectAxisPosition
Selector axis-position mode.
Definition topo.hpp:244
::occtl_select_normal_mode_t SelectNormalMode
Selector face-normal predicate.
Definition topo.hpp:247
::occtl_select_bbox_mode_t SelectBBoxMode
Selector bounding-box mode.
Definition topo.hpp:238
::occtl_curve_kind_t CurveKind
3D curve kind used by edge geometry.
Definition topo.hpp:220
::occtl_select_measure_kind_t SelectMeasureKind
Selector OCCT mass-property predicate.
Definition topo.hpp:250
::occtl_node_kind_t NodeKind
Public graph node kind.
Definition topo.hpp:308
::occtl_relation_kind_t RelationKind
Semantic relation kind between two graph nodes.
Definition topo.hpp:202
::occtl_topo_split_keep_t TopoSplitKeep
Plane split side-selection mode.
Definition topo.hpp:311
C++ veneer wrapper for persistent topology UIDs.