forked from tpaviot/pythonocc-core
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathBRepTools.i
More file actions
1594 lines (1418 loc) · 55.8 KB
/
BRepTools.i
File metadata and controls
1594 lines (1418 loc) · 55.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Copyright 2008-2017 Thomas Paviot (tpaviot@gmail.com)
This file is part of pythonOCC.
pythonOCC is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pythonOCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with pythonOCC. If not, see <http://www.gnu.org/licenses/>.
*/
%define BREPTOOLSDOCSTRING
"-Level : Public.
All methods of all classes will be public.
The BRepTools package provides utilities for BRep
data structures.
* WireExplorer : A tool to explore the topology of
a wire in the order of the edges.
* ShapeSet : Tools used for dumping, writing and
reading.
* UVBounds : Methods to compute the limits of the
boundary of a face, a wire or an edge in the
parametric space of a face.
* Update : Methods to call when a topology has
been created to compute all missing data.
* UpdateFaceUVPoints : Method to update the UV
points stored with the edges on a face. This
method ensure that connected edges have the same
UV point on their common extremity.
* Compare : Method to compare two vertices.
* Compare : Method to compare two edges.
* OuterWire : A method to find the outer wire of a
face.
* Map3DEdges : A method to map all the 3D Edges of
a Shape.
* Dump : A method to dump a BRep object.
"
%enddef
%module (package="OCC.Core", docstring=BREPTOOLSDOCSTRING) BRepTools
#pragma SWIG nowarn=504,325,503
%{
#ifdef WNT
#pragma warning(disable : 4716)
#endif
%}
%include ../common/CommonIncludes.i
%include ../common/ExceptionCatcher.i
%include ../common/FunctionTransformers.i
%include ../common/Operators.i
%include ../common/OccHandle.i
%include BRepTools_headers.i
/* typedefs */
/* end typedefs declaration */
/* public enums */
/* end public enums declaration */
%wrap_handle(BRepTools_DataMapNodeOfMapOfVertexPnt2d)
%wrap_handle(BRepTools_Modification)
%wrap_handle(BRepTools_ReShape)
%wrap_handle(BRepTools_GTrsfModification)
%wrap_handle(BRepTools_NurbsConvertModification)
%wrap_handle(BRepTools_TrsfModification)
%rename(breptools) BRepTools;
class BRepTools {
public:
%feature("compactdefaultargs") UVBounds;
%feature("autodoc", " * Returns in UMin, UMax, VMin, VMax the bounding values in the parametric space of F.
:param F:
:type F: TopoDS_Face &
:param UMin:
:type UMin: float &
:param UMax:
:type UMax: float &
:param VMin:
:type VMin: float &
:param VMax:
:type VMax: float &
:rtype: void
") UVBounds;
static void UVBounds (const TopoDS_Face & F,Standard_Real &OutValue,Standard_Real &OutValue,Standard_Real &OutValue,Standard_Real &OutValue);
%feature("compactdefaultargs") UVBounds;
%feature("autodoc", " * Returns in UMin, UMax, VMin, VMax the bounding values of the wire in the parametric space of F.
:param F:
:type F: TopoDS_Face &
:param W:
:type W: TopoDS_Wire &
:param UMin:
:type UMin: float &
:param UMax:
:type UMax: float &
:param VMin:
:type VMin: float &
:param VMax:
:type VMax: float &
:rtype: void
") UVBounds;
static void UVBounds (const TopoDS_Face & F,const TopoDS_Wire & W,Standard_Real &OutValue,Standard_Real &OutValue,Standard_Real &OutValue,Standard_Real &OutValue);
%feature("compactdefaultargs") UVBounds;
%feature("autodoc", " * Returns in UMin, UMax, VMin, VMax the bounding values of the edge in the parametric space of F.
:param F:
:type F: TopoDS_Face &
:param E:
:type E: TopoDS_Edge &
:param UMin:
:type UMin: float &
:param UMax:
:type UMax: float &
:param VMin:
:type VMin: float &
:param VMax:
:type VMax: float &
:rtype: void
") UVBounds;
static void UVBounds (const TopoDS_Face & F,const TopoDS_Edge & E,Standard_Real &OutValue,Standard_Real &OutValue,Standard_Real &OutValue,Standard_Real &OutValue);
%feature("compactdefaultargs") AddUVBounds;
%feature("autodoc", " * Adds to the box <B> the bounding values in the parametric space of F.
:param F:
:type F: TopoDS_Face &
:param B:
:type B: Bnd_Box2d &
:rtype: void
") AddUVBounds;
static void AddUVBounds (const TopoDS_Face & F,Bnd_Box2d & B);
%feature("compactdefaultargs") AddUVBounds;
%feature("autodoc", " * Adds to the box <B> the bounding values of the wire in the parametric space of F.
:param F:
:type F: TopoDS_Face &
:param W:
:type W: TopoDS_Wire &
:param B:
:type B: Bnd_Box2d &
:rtype: void
") AddUVBounds;
static void AddUVBounds (const TopoDS_Face & F,const TopoDS_Wire & W,Bnd_Box2d & B);
%feature("compactdefaultargs") AddUVBounds;
%feature("autodoc", " * Adds to the box <B> the bounding values of the edge in the parametric space of F.
:param F:
:type F: TopoDS_Face &
:param E:
:type E: TopoDS_Edge &
:param B:
:type B: Bnd_Box2d &
:rtype: void
") AddUVBounds;
static void AddUVBounds (const TopoDS_Face & F,const TopoDS_Edge & E,Bnd_Box2d & B);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a vertex (nothing is done)
:param V:
:type V: TopoDS_Vertex &
:rtype: void
") Update;
static void Update (const TopoDS_Vertex & V);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update an edge, compute 2d bounding boxes.
:param E:
:type E: TopoDS_Edge &
:rtype: void
") Update;
static void Update (const TopoDS_Edge & E);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a wire (nothing is done)
:param W:
:type W: TopoDS_Wire &
:rtype: void
") Update;
static void Update (const TopoDS_Wire & W);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a Face, update UV points.
:param F:
:type F: TopoDS_Face &
:rtype: void
") Update;
static void Update (const TopoDS_Face & F);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a shell (nothing is done)
:param S:
:type S: TopoDS_Shell &
:rtype: void
") Update;
static void Update (const TopoDS_Shell & S);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a solid (nothing is done)
:param S:
:type S: TopoDS_Solid &
:rtype: void
") Update;
static void Update (const TopoDS_Solid & S);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a composite solid (nothing is done)
:param C:
:type C: TopoDS_CompSolid &
:rtype: void
") Update;
static void Update (const TopoDS_CompSolid & C);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a compound (nothing is done)
:param C:
:type C: TopoDS_Compound &
:rtype: void
") Update;
static void Update (const TopoDS_Compound & C);
%feature("compactdefaultargs") Update;
%feature("autodoc", " * Update a shape, call the corect update.
:param S:
:type S: TopoDS_Shape &
:rtype: void
") Update;
static void Update (const TopoDS_Shape & S);
%feature("compactdefaultargs") UpdateFaceUVPoints;
%feature("autodoc", " * For all the edges of the face <F> reset the UV points to ensure that connected faces have the same point at there common extremity.
:param F:
:type F: TopoDS_Face &
:rtype: void
") UpdateFaceUVPoints;
static void UpdateFaceUVPoints (const TopoDS_Face & F);
%feature("compactdefaultargs") Clean;
%feature("autodoc", " * Removes all the triangulations of the faces of <S> and removes all polygons on triangulations of the edges.
:param S:
:type S: TopoDS_Shape &
:rtype: void
") Clean;
static void Clean (const TopoDS_Shape & S);
%feature("compactdefaultargs") RemoveUnusedPCurves;
%feature("autodoc", " * Removes all the pcurves of the edges of <S> that refer to surfaces not belonging to any face of <S>
:param S:
:type S: TopoDS_Shape &
:rtype: void
") RemoveUnusedPCurves;
static void RemoveUnusedPCurves (const TopoDS_Shape & S);
%feature("compactdefaultargs") Triangulation;
%feature("autodoc", " * verifies that each face from the shape <S> has got a triangulation with a deflection <= deflec and the edges a discretisation on this triangulation.
:param S:
:type S: TopoDS_Shape &
:param deflec:
:type deflec: float
:rtype: bool
") Triangulation;
static Standard_Boolean Triangulation (const TopoDS_Shape & S,const Standard_Real deflec);
%feature("compactdefaultargs") Compare;
%feature("autodoc", " * Returns True if the distance between the two vertices is lower than their tolerance.
:param V1:
:type V1: TopoDS_Vertex &
:param V2:
:type V2: TopoDS_Vertex &
:rtype: bool
") Compare;
static Standard_Boolean Compare (const TopoDS_Vertex & V1,const TopoDS_Vertex & V2);
%feature("compactdefaultargs") Compare;
%feature("autodoc", " * Returns True if the distance between the two edges is lower than their tolerance.
:param E1:
:type E1: TopoDS_Edge &
:param E2:
:type E2: TopoDS_Edge &
:rtype: bool
") Compare;
static Standard_Boolean Compare (const TopoDS_Edge & E1,const TopoDS_Edge & E2);
%feature("compactdefaultargs") OuterWire;
%feature("autodoc", " * Returns the outer most wire of <F>. Returns a Null wire if <F> has no wires.
:param F:
:type F: TopoDS_Face &
:rtype: TopoDS_Wire
") OuterWire;
static TopoDS_Wire OuterWire (const TopoDS_Face & F);
%feature("compactdefaultargs") Map3DEdges;
%feature("autodoc", " * Stores in the map <M> all the 3D topology edges of <S>.
:param S:
:type S: TopoDS_Shape &
:param M:
:type M: TopTools_IndexedMapOfShape &
:rtype: void
") Map3DEdges;
static void Map3DEdges (const TopoDS_Shape & S,TopTools_IndexedMapOfShape & M);
%feature("compactdefaultargs") IsReallyClosed;
%feature("autodoc", " * Verifies that the edge <E> is found two times on the face <F> before calling BRep_Tool::IsClosed.
:param E:
:type E: TopoDS_Edge &
:param F:
:type F: TopoDS_Face &
:rtype: bool
") IsReallyClosed;
static Standard_Boolean IsReallyClosed (const TopoDS_Edge & E,const TopoDS_Face & F);
%feature("compactdefaultargs") Dump;
%feature("autodoc", " * Dumps the topological structure and the geometry of <Sh> on the stream <S>.
:param Sh:
:type Sh: TopoDS_Shape &
:param S:
:type S: Standard_OStream &
:rtype: void
") Dump;
static void Dump (const TopoDS_Shape & Sh,Standard_OStream & S);
%feature("compactdefaultargs") Write;
%feature("autodoc", " * Writes <Sh> on <S> in an ASCII format.
:param Sh:
:type Sh: TopoDS_Shape &
:param S:
:type S: Standard_OStream &
:param PR: default value is NULL
:type PR: Handle_Message_ProgressIndicator &
:rtype: void
") Write;
static void Write (const TopoDS_Shape & Sh,Standard_OStream & S,const Handle_Message_ProgressIndicator & PR = NULL);
%feature("compactdefaultargs") Read;
%feature("autodoc", " * Reads a Shape from <S> in returns it in <Sh>. <B> is used to build the shape.
:param Sh:
:type Sh: TopoDS_Shape &
:param S:
:type S: Standard_IStream &
:param B:
:type B: BRep_Builder &
:param PR: default value is NULL
:type PR: Handle_Message_ProgressIndicator &
:rtype: void
") Read;
static void Read (TopoDS_Shape & Sh,Standard_IStream & S,const BRep_Builder & B,const Handle_Message_ProgressIndicator & PR = NULL);
%feature("compactdefaultargs") Write;
%feature("autodoc", " * Writes <Sh> in <File>.
:param Sh:
:type Sh: TopoDS_Shape &
:param File:
:type File: char *
:param PR: default value is NULL
:type PR: Handle_Message_ProgressIndicator &
:rtype: bool
") Write;
static Standard_Boolean Write (const TopoDS_Shape & Sh,const char * File,const Handle_Message_ProgressIndicator & PR = NULL);
%feature("compactdefaultargs") Read;
%feature("autodoc", " * Reads a Shape from <File>, returns it in <Sh>. <B> is used to build the shape.
:param Sh:
:type Sh: TopoDS_Shape &
:param File:
:type File: char *
:param B:
:type B: BRep_Builder &
:param PR: default value is NULL
:type PR: Handle_Message_ProgressIndicator &
:rtype: bool
") Read;
static Standard_Boolean Read (TopoDS_Shape & Sh,const char * File,const BRep_Builder & B,const Handle_Message_ProgressIndicator & PR = NULL);
};
%extend BRepTools {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
class BRepTools_DataMapIteratorOfMapOfVertexPnt2d : public TCollection_BasicMapIterator {
public:
%feature("compactdefaultargs") BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
%feature("autodoc", " :rtype: None
") BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
BRepTools_DataMapIteratorOfMapOfVertexPnt2d ();
%feature("compactdefaultargs") BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
%feature("autodoc", " :param aMap:
:type aMap: BRepTools_MapOfVertexPnt2d &
:rtype: None
") BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
BRepTools_DataMapIteratorOfMapOfVertexPnt2d (const BRepTools_MapOfVertexPnt2d & aMap);
%feature("compactdefaultargs") Initialize;
%feature("autodoc", " :param aMap:
:type aMap: BRepTools_MapOfVertexPnt2d &
:rtype: None
") Initialize;
void Initialize (const BRepTools_MapOfVertexPnt2d & aMap);
%feature("compactdefaultargs") Key;
%feature("autodoc", " :rtype: TopoDS_Shape
") Key;
const TopoDS_Shape Key ();
%feature("compactdefaultargs") Value;
%feature("autodoc", " :rtype: TColgp_SequenceOfPnt2d
") Value;
const TColgp_SequenceOfPnt2d & Value ();
};
%extend BRepTools_DataMapIteratorOfMapOfVertexPnt2d {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_DataMapNodeOfMapOfVertexPnt2d;
class BRepTools_DataMapNodeOfMapOfVertexPnt2d : public TCollection_MapNode {
public:
%feature("compactdefaultargs") BRepTools_DataMapNodeOfMapOfVertexPnt2d;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:param I:
:type I: TColgp_SequenceOfPnt2d
:param n:
:type n: TCollection_MapNodePtr &
:rtype: None
") BRepTools_DataMapNodeOfMapOfVertexPnt2d;
BRepTools_DataMapNodeOfMapOfVertexPnt2d (const TopoDS_Shape & K,const TColgp_SequenceOfPnt2d & I,const TCollection_MapNodePtr & n);
%feature("compactdefaultargs") Key;
%feature("autodoc", " :rtype: TopoDS_Shape
") Key;
TopoDS_Shape Key ();
%feature("compactdefaultargs") Value;
%feature("autodoc", " :rtype: TColgp_SequenceOfPnt2d
") Value;
TColgp_SequenceOfPnt2d & Value ();
};
%make_alias(BRepTools_DataMapNodeOfMapOfVertexPnt2d)
%extend BRepTools_DataMapNodeOfMapOfVertexPnt2d {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_MapOfVertexPnt2d;
class BRepTools_MapOfVertexPnt2d : public TCollection_BasicMap {
public:
%feature("compactdefaultargs") BRepTools_MapOfVertexPnt2d;
%feature("autodoc", " :param NbBuckets: default value is 1
:type NbBuckets: int
:rtype: None
") BRepTools_MapOfVertexPnt2d;
BRepTools_MapOfVertexPnt2d (const Standard_Integer NbBuckets = 1);
%feature("compactdefaultargs") Assign;
%feature("autodoc", " :param Other:
:type Other: BRepTools_MapOfVertexPnt2d &
:rtype: BRepTools_MapOfVertexPnt2d
") Assign;
BRepTools_MapOfVertexPnt2d & Assign (const BRepTools_MapOfVertexPnt2d & Other);
%feature("compactdefaultargs") operator =;
%feature("autodoc", " :param Other:
:type Other: BRepTools_MapOfVertexPnt2d &
:rtype: BRepTools_MapOfVertexPnt2d
") operator =;
BRepTools_MapOfVertexPnt2d & operator = (const BRepTools_MapOfVertexPnt2d & Other);
%feature("compactdefaultargs") ReSize;
%feature("autodoc", " :param NbBuckets:
:type NbBuckets: int
:rtype: None
") ReSize;
void ReSize (const Standard_Integer NbBuckets);
%feature("compactdefaultargs") Clear;
%feature("autodoc", " :rtype: None
") Clear;
void Clear ();
%feature("compactdefaultargs") Bind;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:param I:
:type I: TColgp_SequenceOfPnt2d
:rtype: bool
") Bind;
Standard_Boolean Bind (const TopoDS_Shape & K,const TColgp_SequenceOfPnt2d & I);
%feature("compactdefaultargs") IsBound;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:rtype: bool
") IsBound;
Standard_Boolean IsBound (const TopoDS_Shape & K);
%feature("compactdefaultargs") UnBind;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:rtype: bool
") UnBind;
Standard_Boolean UnBind (const TopoDS_Shape & K);
%feature("compactdefaultargs") Find;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:rtype: TColgp_SequenceOfPnt2d
") Find;
const TColgp_SequenceOfPnt2d & Find (const TopoDS_Shape & K);
%feature("compactdefaultargs") ChangeFind;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:rtype: TColgp_SequenceOfPnt2d
") ChangeFind;
TColgp_SequenceOfPnt2d & ChangeFind (const TopoDS_Shape & K);
%feature("compactdefaultargs") Find1;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:rtype: Standard_Address
") Find1;
Standard_Address Find1 (const TopoDS_Shape & K);
%feature("compactdefaultargs") ChangeFind1;
%feature("autodoc", " :param K:
:type K: TopoDS_Shape &
:rtype: Standard_Address
") ChangeFind1;
Standard_Address ChangeFind1 (const TopoDS_Shape & K);
};
%extend BRepTools_MapOfVertexPnt2d {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_Modification;
class BRepTools_Modification : public MMgt_TShared {
public:
%feature("compactdefaultargs") NewSurface;
%feature("autodoc", " * Returns true if the face, F, has been modified. If the face has been modified: - S is the new geometry of the face, - L is its new location, and - Tol is the new tolerance. The flag, RevWires, is set to true when the modification reverses the normal of the surface, (i.e. the wires have to be reversed). The flag, RevFace, is set to true if the orientation of the modified face changes in the shells which contain it. If the face has not been modified this function returns false, and the values of S, L, Tol, RevWires and RevFace are not significant.
:param F:
:type F: TopoDS_Face &
:param S:
:type S: Handle_Geom_Surface &
:param L:
:type L: TopLoc_Location &
:param Tol:
:type Tol: float &
:param RevWires:
:type RevWires: bool
:param RevFace:
:type RevFace: bool
:rtype: bool
") NewSurface;
virtual Standard_Boolean NewSurface (const TopoDS_Face & F,Handle_Geom_Surface & S,TopLoc_Location & L,Standard_Real &OutValue,Standard_Boolean &OutValue,Standard_Boolean &OutValue);
%feature("compactdefaultargs") NewTriangulation;
%feature("autodoc", " * Returns true if the face has been modified according to changed triangulation. If the face has been modified: - T is a new triangulation on the face
:param F:
:type F: TopoDS_Face &
:param T:
:type T: Handle_Poly_Triangulation &
:rtype: bool
") NewTriangulation;
virtual Standard_Boolean NewTriangulation (const TopoDS_Face & F,Handle_Poly_Triangulation & T);
%feature("compactdefaultargs") NewCurve;
%feature("autodoc", " * Returns true if the edge, E, has been modified. If the edge has been modified: - C is the new geometry associated with the edge, - L is its new location, and - Tol is the new tolerance. If the edge has not been modified, this function returns false, and the values of C, L and Tol are not significant.
:param E:
:type E: TopoDS_Edge &
:param C:
:type C: Handle_Geom_Curve &
:param L:
:type L: TopLoc_Location &
:param Tol:
:type Tol: float &
:rtype: bool
") NewCurve;
virtual Standard_Boolean NewCurve (const TopoDS_Edge & E,Handle_Geom_Curve & C,TopLoc_Location & L,Standard_Real &OutValue);
%feature("compactdefaultargs") NewPoint;
%feature("autodoc", " * Returns true if the vertex V has been modified. If V has been modified: - P is the new geometry of the vertex, and - Tol is the new tolerance. If the vertex has not been modified this function returns false, and the values of P and Tol are not significant.
:param V:
:type V: TopoDS_Vertex &
:param P:
:type P: gp_Pnt
:param Tol:
:type Tol: float &
:rtype: bool
") NewPoint;
virtual Standard_Boolean NewPoint (const TopoDS_Vertex & V,gp_Pnt & P,Standard_Real &OutValue);
%feature("compactdefaultargs") NewCurve2d;
%feature("autodoc", " * Returns true if the edge, E, has a new curve on surface on the face, F. If a new curve exists: - C is the new geometry of the edge, - L is the new location, and - Tol is the new tolerance. NewE is the new edge created from E, and NewF is the new face created from F. If there is no new curve on the face, this function returns false, and the values of C, L and Tol are not significant.
:param E:
:type E: TopoDS_Edge &
:param F:
:type F: TopoDS_Face &
:param NewE:
:type NewE: TopoDS_Edge &
:param NewF:
:type NewF: TopoDS_Face &
:param C:
:type C: Handle_Geom2d_Curve &
:param Tol:
:type Tol: float &
:rtype: bool
") NewCurve2d;
virtual Standard_Boolean NewCurve2d (const TopoDS_Edge & E,const TopoDS_Face & F,const TopoDS_Edge & NewE,const TopoDS_Face & NewF,Handle_Geom2d_Curve & C,Standard_Real &OutValue);
%feature("compactdefaultargs") NewParameter;
%feature("autodoc", " * Returns true if the vertex V has a new parameter on the edge E. If a new parameter exists: - P is the parameter, and - Tol is the new tolerance. If there is no new parameter this function returns false, and the values of P and Tol are not significant.
:param V:
:type V: TopoDS_Vertex &
:param E:
:type E: TopoDS_Edge &
:param P:
:type P: float &
:param Tol:
:type Tol: float &
:rtype: bool
") NewParameter;
virtual Standard_Boolean NewParameter (const TopoDS_Vertex & V,const TopoDS_Edge & E,Standard_Real &OutValue,Standard_Real &OutValue);
%feature("compactdefaultargs") Continuity;
%feature("autodoc", " * Returns the continuity of <NewE> between <NewF1> and <NewF2>. <NewE> is the new edge created from <E>. <NewF1> (resp. <NewF2>) is the new face created from <F1> (resp. <F2>).
:param E:
:type E: TopoDS_Edge &
:param F1:
:type F1: TopoDS_Face &
:param F2:
:type F2: TopoDS_Face &
:param NewE:
:type NewE: TopoDS_Edge &
:param NewF1:
:type NewF1: TopoDS_Face &
:param NewF2:
:type NewF2: TopoDS_Face &
:rtype: GeomAbs_Shape
") Continuity;
virtual GeomAbs_Shape Continuity (const TopoDS_Edge & E,const TopoDS_Face & F1,const TopoDS_Face & F2,const TopoDS_Edge & NewE,const TopoDS_Face & NewF1,const TopoDS_Face & NewF2);
};
%make_alias(BRepTools_Modification)
%extend BRepTools_Modification {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_Modifier;
class BRepTools_Modifier {
public:
%feature("compactdefaultargs") BRepTools_Modifier;
%feature("autodoc", " * Creates an empty Modifier.
:rtype: None
") BRepTools_Modifier;
BRepTools_Modifier ();
%feature("compactdefaultargs") BRepTools_Modifier;
%feature("autodoc", " * Creates a modifier on the shape <S>.
:param S:
:type S: TopoDS_Shape &
:rtype: None
") BRepTools_Modifier;
BRepTools_Modifier (const TopoDS_Shape & S);
%feature("compactdefaultargs") BRepTools_Modifier;
%feature("autodoc", " * Creates a modifier on the shape <S>, and performs the modifications described by <M>.
:param S:
:type S: TopoDS_Shape &
:param M:
:type M: Handle_BRepTools_Modification &
:rtype: None
") BRepTools_Modifier;
BRepTools_Modifier (const TopoDS_Shape & S,const Handle_BRepTools_Modification & M);
%feature("compactdefaultargs") Init;
%feature("autodoc", " * Initializes the modifier with the shape <S>.
:param S:
:type S: TopoDS_Shape &
:rtype: None
") Init;
void Init (const TopoDS_Shape & S);
%feature("compactdefaultargs") Perform;
%feature("autodoc", " * Performs the modifications described by <M>.
:param M:
:type M: Handle_BRepTools_Modification &
:param aProgress: default value is NULL
:type aProgress: Handle_Message_ProgressIndicator &
:rtype: None
") Perform;
void Perform (const Handle_BRepTools_Modification & M,const Handle_Message_ProgressIndicator & aProgress = NULL);
%feature("compactdefaultargs") IsDone;
%feature("autodoc", " * Returns Standard_True if the modification has been computed successfully.
:rtype: bool
") IsDone;
Standard_Boolean IsDone ();
%feature("compactdefaultargs") ModifiedShape;
%feature("autodoc", " * Returns the modified shape corresponding to <S>.
:param S:
:type S: TopoDS_Shape &
:rtype: TopoDS_Shape
") ModifiedShape;
const TopoDS_Shape ModifiedShape (const TopoDS_Shape & S);
};
%extend BRepTools_Modifier {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_Quilt;
class BRepTools_Quilt {
public:
%feature("compactdefaultargs") BRepTools_Quilt;
%feature("autodoc", " :rtype: None
") BRepTools_Quilt;
BRepTools_Quilt ();
%feature("compactdefaultargs") Bind;
%feature("autodoc", " * Binds <Enew> to be the new edge instead of <Eold>. //! The faces of the added shape containing <Eold> will be copied to substitute <Eold> by <Enew>. //! The vertices of <Eold> will be bound to the vertices of <Enew> with the same orientation. //! If <Eold> and <Enew> have different orientations the curves are considered to be opposite and the pcurves of <Eold> will be copied and reversed in the new faces. //! <Eold> must belong to the next added shape, <Enew> must belong to a Shape added before.
:param Eold:
:type Eold: TopoDS_Edge &
:param Enew:
:type Enew: TopoDS_Edge &
:rtype: None
") Bind;
void Bind (const TopoDS_Edge & Eold,const TopoDS_Edge & Enew);
%feature("compactdefaultargs") Bind;
%feature("autodoc", " * Binds <VNew> to be a new vertex instead of <Vold>. //! The faces of the added shape containing <Vold> will be copied to substitute <Vold> by <Vnew>.
:param Vold:
:type Vold: TopoDS_Vertex &
:param Vnew:
:type Vnew: TopoDS_Vertex &
:rtype: None
") Bind;
void Bind (const TopoDS_Vertex & Vold,const TopoDS_Vertex & Vnew);
%feature("compactdefaultargs") Add;
%feature("autodoc", " * Add the faces of <S> to the Quilt, the faces containing bounded edges are copied.
:param S:
:type S: TopoDS_Shape &
:rtype: None
") Add;
void Add (const TopoDS_Shape & S);
%feature("compactdefaultargs") IsCopied;
%feature("autodoc", " * Returns True if <S> has been copied (<S> is a vertex, an edge or a face)
:param S:
:type S: TopoDS_Shape &
:rtype: bool
") IsCopied;
Standard_Boolean IsCopied (const TopoDS_Shape & S);
%feature("compactdefaultargs") Copy;
%feature("autodoc", " * Returns the shape substitued to <S> in the Quilt.
:param S:
:type S: TopoDS_Shape &
:rtype: TopoDS_Shape
") Copy;
const TopoDS_Shape Copy (const TopoDS_Shape & S);
%feature("compactdefaultargs") Shells;
%feature("autodoc", " * Returns a Compound of shells made from the current set of faces. The shells will be flagged as closed or not closed.
:rtype: TopoDS_Shape
") Shells;
TopoDS_Shape Shells ();
};
%extend BRepTools_Quilt {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_ReShape;
class BRepTools_ReShape : public MMgt_TShared {
public:
%feature("compactdefaultargs") BRepTools_ReShape;
%feature("autodoc", " * Returns an empty Reshape
:rtype: None
") BRepTools_ReShape;
BRepTools_ReShape ();
%feature("compactdefaultargs") Clear;
%feature("autodoc", " * Clears all substitutions requests
:rtype: void
") Clear;
virtual void Clear ();
%feature("compactdefaultargs") Remove;
%feature("autodoc", " * Sets a request to Remove a Shape If <oriented> is True, only for a shape with the SAME orientation. Else, whatever the orientation
:param shape:
:type shape: TopoDS_Shape &
:param oriented: default value is Standard_False
:type oriented: bool
:rtype: void
") Remove;
virtual void Remove (const TopoDS_Shape & shape,const Standard_Boolean oriented = Standard_False);
%feature("compactdefaultargs") Replace;
%feature("autodoc", " * Sets a request to Replace a Shape by a new one If <oriented> is True, only if the orientation is the same Else, whatever the orientation, and the new shape takes the same orientation as <newshape> if the replaced one has the same as <shape>, else it is reversed
:param shape:
:type shape: TopoDS_Shape &
:param newshape:
:type newshape: TopoDS_Shape &
:param oriented: default value is Standard_False
:type oriented: bool
:rtype: void
") Replace;
virtual void Replace (const TopoDS_Shape & shape,const TopoDS_Shape & newshape,const Standard_Boolean oriented = Standard_False);
%feature("compactdefaultargs") IsRecorded;
%feature("autodoc", " * Tells if a shape is recorded for Replace/Remove
:param shape:
:type shape: TopoDS_Shape &
:rtype: bool
") IsRecorded;
virtual Standard_Boolean IsRecorded (const TopoDS_Shape & shape);
%feature("compactdefaultargs") Value;
%feature("autodoc", " * Returns the new value for an individual shape If not recorded, returns the original shape itself If to be Removed, returns a Null Shape Else, returns the replacing item
:param shape:
:type shape: TopoDS_Shape &
:rtype: TopoDS_Shape
") Value;
virtual TopoDS_Shape Value (const TopoDS_Shape & shape);
%feature("compactdefaultargs") Status;
%feature("autodoc", " * Returns a complete substitution status for a shape 0 : not recorded, <newsh> = original <shape> < 0: to be removed, <newsh> is NULL > 0: to be replaced, <newsh> is a new item If <last> is False, returns status and new shape recorded in the map directly for the shape, if True and status > 0 then recursively searches for the last status and new shape.
:param shape:
:type shape: TopoDS_Shape &
:param newsh:
:type newsh: TopoDS_Shape &
:param last: default value is Standard_False
:type last: bool
:rtype: int
") Status;
virtual Standard_Integer Status (const TopoDS_Shape & shape,TopoDS_Shape & newsh,const Standard_Boolean last = Standard_False);
%feature("compactdefaultargs") Apply;
%feature("autodoc", " * Applies the substitutions requests to a shape //! <until> gives the level of type until which requests are taken into account. For subshapes of the type <until> no rebuild and futher exploring are done. ACTUALLY, NOT IMPLEMENTED BELOW TopAbs_FACE //! <buildmode> says how to do on a SOLID,SHELL ... if one of its sub-shapes has been changed: 0: at least one Replace or Remove -> COMPOUND, else as such 1: at least one Remove (Replace are ignored) -> COMPOUND 2: Replace and Remove are both ignored If Replace/Remove are ignored or absent, the result as same type as the starting shape
:param shape:
:type shape: TopoDS_Shape &
:param until:
:type until: TopAbs_ShapeEnum
:param buildmode:
:type buildmode: int
:rtype: TopoDS_Shape
") Apply;
virtual TopoDS_Shape Apply (const TopoDS_Shape & shape,const TopAbs_ShapeEnum until,const Standard_Integer buildmode);
%feature("compactdefaultargs") Apply;
%feature("autodoc", " * Applies the substitutions requests to a shape. //! <until> gives the level of type until which requests are taken into account. For subshapes of the type <until> no rebuild and futher exploring are done. //! NOTE: each subshape can be replaced by shape of the same type or by shape containing only shapes of that type (for example, TopoDS_Edge can be replaced by TopoDS_Edge, TopoDS_Wire or TopoDS_Compound containing TopoDS_Edges). If incompatible shape type is encountered, it is ignored and flag FAIL1 is set in Status.
:param shape:
:type shape: TopoDS_Shape &
:param until: default value is TopAbs_SHAPE
:type until: TopAbs_ShapeEnum
:rtype: TopoDS_Shape
") Apply;
virtual TopoDS_Shape Apply (const TopoDS_Shape & shape,const TopAbs_ShapeEnum until = TopAbs_SHAPE);
%feature("compactdefaultargs") ModeConsiderLocation;
%feature("autodoc", " * Returns (modifiable) the flag which defines whether Location of shape take into account during replacing shapes.
:rtype: bool
") ModeConsiderLocation;
virtual Standard_Boolean & ModeConsiderLocation ();
%feature("compactdefaultargs") ModeConsiderOrientation;
%feature("autodoc", " * Returns (modifiable) the flag which defines whether Orientation of shape take into account during replacing shapes.
:rtype: bool
") ModeConsiderOrientation;
virtual Standard_Boolean & ModeConsiderOrientation ();
};
%make_alias(BRepTools_ReShape)
%extend BRepTools_ReShape {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor BRepTools_ShapeSet;
class BRepTools_ShapeSet : public TopTools_ShapeSet {
public:
%feature("compactdefaultargs") BRepTools_ShapeSet;
%feature("autodoc", " * Builds an empty ShapeSet. Parameter <isWithTriangles> is added for XML Persistence
:param isWithTriangles: default value is Standard_True
:type isWithTriangles: bool
:rtype: None
") BRepTools_ShapeSet;
BRepTools_ShapeSet (const Standard_Boolean isWithTriangles = Standard_True);
%feature("compactdefaultargs") BRepTools_ShapeSet;
%feature("autodoc", " * Builds an empty ShapeSet. Parameter <isWithTriangles> is added for XML Persistence
:param B:
:type B: BRep_Builder &
:param isWithTriangles: default value is Standard_True
:type isWithTriangles: bool
:rtype: None
") BRepTools_ShapeSet;
BRepTools_ShapeSet (const BRep_Builder & B,const Standard_Boolean isWithTriangles = Standard_True);
%feature("compactdefaultargs") Clear;
%feature("autodoc", " * Clears the content of the set.
:rtype: void
") Clear;
virtual void Clear ();
%feature("compactdefaultargs") AddGeometry;
%feature("autodoc", " * Stores the goemetry of <S>.
:param S:
:type S: TopoDS_Shape &
:rtype: void
") AddGeometry;
virtual void AddGeometry (const TopoDS_Shape & S);
%feature("autodoc", "1");
%extend{
std::string DumpGeometryToString() {
std::stringstream s;
self->DumpGeometry(s);
return s.str();}
};
%feature("autodoc", "1");
%extend{
std::string WriteGeometryToString() {
std::stringstream s;
self->WriteGeometry(s);
return s.str();}
};
%feature("autodoc", "1");
%extend{
void ReadGeometryFromString(std::string src) {
std::stringstream s(src);
self->ReadGeometry(s);}
};
%feature("compactdefaultargs") DumpGeometry;
%feature("autodoc", " * Dumps the geometry of <S> on the stream <OS>.
:param S:
:type S: TopoDS_Shape &
:param OS:
:type OS: Standard_OStream &
:rtype: void
") DumpGeometry;
virtual void DumpGeometry (const TopoDS_Shape & S,Standard_OStream & OS);
%feature("compactdefaultargs") WriteGeometry;
%feature("autodoc", " * Writes the geometry of <S> on the stream <OS> in a format that can be read back by Read.
:param S:
:type S: TopoDS_Shape &
:param OS:
:type OS: Standard_OStream &
:rtype: void
") WriteGeometry;
virtual void WriteGeometry (const TopoDS_Shape & S,Standard_OStream & OS);
%feature("compactdefaultargs") ReadGeometry;
%feature("autodoc", " * Reads the geometry of a shape of type <T> from the stream <IS> and returns it in <S>.
:param T:
:type T: TopAbs_ShapeEnum
:param IS:
:type IS: Standard_IStream &
:param S:
:type S: TopoDS_Shape &
:rtype: void
") ReadGeometry;
virtual void ReadGeometry (const TopAbs_ShapeEnum T,Standard_IStream & IS,TopoDS_Shape & S);