forked from tpaviot/pythonocc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBRepTools.i
More file actions
4060 lines (3413 loc) · 115 KB
/
BRepTools.i
File metadata and controls
4060 lines (3413 loc) · 115 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-2025 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
"BRepTools module, see official documentation at
https://dev.opencascade.org/doc/occt-7.9.0/refman/html/package_breptools.html"
%enddef
%module (package="OCC.Core", docstring=BREPTOOLSDOCSTRING) BRepTools
%{
#ifdef WNT
#pragma warning(disable : 4716)
#endif
%}
%include ../common/CommonIncludes.i
%include ../common/ExceptionCatcher.i
%include ../common/FunctionTransformers.i
%include ../common/EnumTemplates.i
%include ../common/Operators.i
%include ../common/OccHandle.i
%include ../common/IOStream.i
%include ../common/ArrayMacros.i
%{
#include<BRepTools_module.hxx>
//Dependencies
#include<Standard_module.hxx>
#include<NCollection_module.hxx>
#include<TopoDS_module.hxx>
#include<Bnd_module.hxx>
#include<TopTools_module.hxx>
#include<Geom_module.hxx>
#include<Geom2d_module.hxx>
#include<OSD_module.hxx>
#include<TopAbs_module.hxx>
#include<BRep_module.hxx>
#include<Message_module.hxx>
#include<GeomAbs_module.hxx>
#include<TopLoc_module.hxx>
#include<gp_module.hxx>
#include<Poly_module.hxx>
#include<TShort_module.hxx>
#include<Poly_module.hxx>
#include<TColgp_module.hxx>
#include<TColStd_module.hxx>
#include<TCollection_module.hxx>
#include<Storage_module.hxx>
%};
%import Standard.i
%import NCollection.i
%import TopoDS.i
%import Bnd.i
%import TopTools.i
%import Geom.i
%import Geom2d.i
%import OSD.i
%import TopAbs.i
%import BRep.i
%import Message.i
%import GeomAbs.i
%import TopLoc.i
%import gp.i
%import Poly.i
%pythoncode {
from enum import IntEnum
from OCC.Core.Exception import *
};
/* public enums */
/* end public enums declaration */
/* python proxy classes for enums */
%pythoncode {
};
/* end python proxy for enums */
/* handles */
%wrap_handle(BRepTools_History)
%wrap_handle(BRepTools_Modification)
%wrap_handle(BRepTools_ReShape)
%wrap_handle(BRepTools_CopyModification)
%wrap_handle(BRepTools_GTrsfModification)
%wrap_handle(BRepTools_TrsfModification)
%wrap_handle(BRepTools_NurbsConvertModification)
/* end handles declaration */
/* templates */
%template(BRepTools_MapOfVertexPnt2d) NCollection_DataMap<TopoDS_Shape,TColgp_SequenceOfPnt2d,TopTools_ShapeMapHasher>;
/* end templates declaration */
/* typedefs */
typedef NCollection_DataMap<TopoDS_Shape, TColgp_SequenceOfPnt2d, TopTools_ShapeMapHasher>::Iterator BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
typedef NCollection_DataMap<TopoDS_Shape, TColgp_SequenceOfPnt2d, TopTools_ShapeMapHasher> BRepTools_MapOfVertexPnt2d;
/* end typedefs declaration */
/******************
* class BRepTools *
******************/
%rename(breptools) BRepTools;
class BRepTools {
public:
/****** BRepTools::ActivateTriangulation ******/
/****** md5 signature: 39a3be4a36dcd05759204a5ec0fdc5af ******/
%feature("compactdefaultargs") ActivateTriangulation;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theTriangulationIdx: int
theToActivateStrictly: bool (optional, default to false)
Return
-------
bool
Description
-----------
Activates triangulation data for each face of the shape from some deferred storage using specified shared input file system
Input parameter: theShape shape to activate triangulations
Input parameter: theTriangulationIdx index defining what triangulation should be activated. Starts from 0. Exception will be thrown in case of invalid negative index
Input parameter: theToActivateStrictly flag to activate exactly triangulation with defined theTriangulationIdx index. In True case if some face doesn't contain triangulation with this index, active triangulation will not be changed for it. Else the last available triangulation will be activated.
Return: True if at least one active triangulation was changed.
") ActivateTriangulation;
static Standard_Boolean ActivateTriangulation(const TopoDS_Shape & theShape, const Standard_Integer theTriangulationIdx, const Standard_Boolean theToActivateStrictly = false);
/****** BRepTools::AddUVBounds ******/
/****** md5 signature: 0f0b092c5bc0e661a6c685d5c94ea9dd ******/
%feature("compactdefaultargs") AddUVBounds;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
B: Bnd_Box2d
Return
-------
None
Description
-----------
Adds to the box <B> the bounding values in the parametric space of F.
") AddUVBounds;
static void AddUVBounds(const TopoDS_Face & F, Bnd_Box2d & B);
/****** BRepTools::AddUVBounds ******/
/****** md5 signature: b2e0e63879ee2bdf9d6eb8f583eef486 ******/
%feature("compactdefaultargs") AddUVBounds;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
W: TopoDS_Wire
B: Bnd_Box2d
Return
-------
None
Description
-----------
Adds to the box <B> the bounding values of the wire in the parametric space of F.
") AddUVBounds;
static void AddUVBounds(const TopoDS_Face & F, const TopoDS_Wire & W, Bnd_Box2d & B);
/****** BRepTools::AddUVBounds ******/
/****** md5 signature: ef861e4c373c52fcf2272133b9ef615f ******/
%feature("compactdefaultargs") AddUVBounds;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
E: TopoDS_Edge
B: Bnd_Box2d
Return
-------
None
Description
-----------
Adds to the box <B> the bounding values of the edge in the parametric space of F.
") AddUVBounds;
static void AddUVBounds(const TopoDS_Face & F, const TopoDS_Edge & E, Bnd_Box2d & B);
/****** BRepTools::CheckLocations ******/
/****** md5 signature: 1df4d13b8eb09af8c12c5590b0f17a8c ******/
%feature("compactdefaultargs") CheckLocations;
%feature("autodoc", "
Parameters
----------
theS: TopoDS_Shape
theProblemShapes: TopTools_ListOfShape
Return
-------
None
Description
-----------
Check all locations of shape according criterium: aTrsf.IsNegative() || (Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()) All sub-shapes having such locations are put in list theProblemShapes.
") CheckLocations;
static void CheckLocations(const TopoDS_Shape & theS, TopTools_ListOfShape & theProblemShapes);
/****** BRepTools::Clean ******/
/****** md5 signature: e69d53fa65ed6662d92131db242c5024 ******/
%feature("compactdefaultargs") Clean;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theForce: bool (optional, default to Standard_False)
Return
-------
None
Description
-----------
Removes all cached polygonal representation of the shape, i.e. the triangulations of the faces of <S> and polygons on triangulations and polygons 3d of the edges. In case polygonal representation is the only available representation for the shape (shape does not have geometry) it is not removed.
Input parameter: theShape the shape to clean
Input parameter: theForce allows removing all polygonal representations from the shape, including polygons on triangulations irrelevant for the faces of the given shape.
") Clean;
static void Clean(const TopoDS_Shape & theShape, const Standard_Boolean theForce = Standard_False);
/****** BRepTools::CleanGeometry ******/
/****** md5 signature: ce6b6e89067b44b9c151c1e43c8e50e5 ******/
%feature("compactdefaultargs") CleanGeometry;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
Return
-------
None
Description
-----------
Removes geometry (curves and surfaces) from all edges and faces of the shape.
") CleanGeometry;
static void CleanGeometry(const TopoDS_Shape & theShape);
/****** BRepTools::Compare ******/
/****** md5 signature: d9864c743fdc9bb7b025a48b72edcbec ******/
%feature("compactdefaultargs") Compare;
%feature("autodoc", "
Parameters
----------
V1: TopoDS_Vertex
V2: TopoDS_Vertex
Return
-------
bool
Description
-----------
Returns True if the distance between the two vertices is lower than their tolerance.
") Compare;
static Standard_Boolean Compare(const TopoDS_Vertex & V1, const TopoDS_Vertex & V2);
/****** BRepTools::Compare ******/
/****** md5 signature: ea251f6848a69bbeaf8009fee744c62d ******/
%feature("compactdefaultargs") Compare;
%feature("autodoc", "
Parameters
----------
E1: TopoDS_Edge
E2: TopoDS_Edge
Return
-------
bool
Description
-----------
Returns True if the distance between the two edges is lower than their tolerance.
") Compare;
static Standard_Boolean Compare(const TopoDS_Edge & E1, const TopoDS_Edge & E2);
/****** BRepTools::DetectClosedness ******/
/****** md5 signature: 6f98ec688487f1becf2d69d2cb328f32 ******/
%feature("compactdefaultargs") DetectClosedness;
%feature("autodoc", "
Parameters
----------
theFace: TopoDS_Face
Return
-------
theUclosed: bool
theVclosed: bool
Description
-----------
Detect closedness of face in U and V directions.
") DetectClosedness;
static void DetectClosedness(const TopoDS_Face & theFace, Standard_Boolean &OutValue, Standard_Boolean &OutValue);
/****** BRepTools::Dump ******/
/****** md5 signature: d8fbac42c489d0bae98b03b1387b21c5 ******/
%feature("compactdefaultargs") Dump;
%feature("autodoc", "
Parameters
----------
Sh: TopoDS_Shape
Return
-------
S: Standard_OStream
Description
-----------
Dumps the topological structure and the geometry of <Sh> on the stream <S>.
") Dump;
static void Dump(const TopoDS_Shape & Sh, std::ostream &OutValue);
/****** BRepTools::EvalAndUpdateTol ******/
/****** md5 signature: 16be652a9c224d56f94960b2cade0539 ******/
%feature("compactdefaultargs") EvalAndUpdateTol;
%feature("autodoc", "
Parameters
----------
theE: TopoDS_Edge
theC3d: Geom_Curve
theC2d: Geom2d_Curve
theS: Geom_Surface
theF: float
theL: float
Return
-------
float
Description
-----------
Evals real tolerance of edge <theE>. <theC3d>, <theC2d>, <theS>, <theF>, <theL> are correspondently 3d curve of edge, 2d curve on surface <theS> and rang of edge If calculated tolerance is more then current edge tolerance, edge is updated. Method returns actual tolerance of edge.
") EvalAndUpdateTol;
static Standard_Real EvalAndUpdateTol(const TopoDS_Edge & theE, const opencascade::handle<Geom_Curve> & theC3d, const opencascade::handle<Geom2d_Curve> & theC2d, const opencascade::handle<Geom_Surface> & theS, const Standard_Real theF, const Standard_Real theL);
/****** BRepTools::IsReallyClosed ******/
/****** md5 signature: d361112f12ce86c3a572783eb22c3dcb ******/
%feature("compactdefaultargs") IsReallyClosed;
%feature("autodoc", "
Parameters
----------
E: TopoDS_Edge
F: TopoDS_Face
Return
-------
bool
Description
-----------
Verifies that the edge <E> is found two times on the face <F> before calling BRep_Tool::IsClosed.
") IsReallyClosed;
static Standard_Boolean IsReallyClosed(const TopoDS_Edge & E, const TopoDS_Face & F);
/****** BRepTools::LoadAllTriangulations ******/
/****** md5 signature: 1466fd44e74f80d49ab3905c6d611afa ******/
%feature("compactdefaultargs") LoadAllTriangulations;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theFileSystem: OSD_FileSystem (optional, default to opencascade::handle<OSD_FileSystem>())
Return
-------
bool
Description
-----------
Loads all available triangulations for each face of the shape from some deferred storage using specified shared input file system
Input parameter: theShape shape to load triangulations
Input parameter: theFileSystem shared file system
Return: True if at least one triangulation is loaded.
") LoadAllTriangulations;
static Standard_Boolean LoadAllTriangulations(const TopoDS_Shape & theShape, const opencascade::handle<OSD_FileSystem> & theFileSystem = opencascade::handle<OSD_FileSystem>());
/****** BRepTools::LoadTriangulation ******/
/****** md5 signature: 2b46d2fac9cc1acb805e26246d213be8 ******/
%feature("compactdefaultargs") LoadTriangulation;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theTriangulationIdx: int (optional, default to -1)
theToSetAsActive: bool (optional, default to Standard_False)
theFileSystem: OSD_FileSystem (optional, default to opencascade::handle<OSD_FileSystem>())
Return
-------
bool
Description
-----------
Loads triangulation data for each face of the shape from some deferred storage using specified shared input file system
Input parameter: theShape shape to load triangulations
Input parameter: theTriangulationIdx index defining what triangulation should be loaded. Starts from 0. -1 is used in specific case to load currently already active triangulation. If some face doesn't contain triangulation with this index, nothing will be loaded for it. Exception will be thrown in case of invalid negative index
Input parameter: theToSetAsActive flag to activate triangulation after its loading
Input parameter: theFileSystem shared file system
Return: True if at least one triangulation is loaded.
") LoadTriangulation;
static Standard_Boolean LoadTriangulation(const TopoDS_Shape & theShape, const Standard_Integer theTriangulationIdx = -1, const Standard_Boolean theToSetAsActive = Standard_False, const opencascade::handle<OSD_FileSystem> & theFileSystem = opencascade::handle<OSD_FileSystem>());
/****** BRepTools::Map3DEdges ******/
/****** md5 signature: affe8cc83d005936d51c3385b6fc5c16 ******/
%feature("compactdefaultargs") Map3DEdges;
%feature("autodoc", "
Parameters
----------
S: TopoDS_Shape
M: TopTools_IndexedMapOfShape
Return
-------
None
Description
-----------
Stores in the map <M> all the 3D topology edges of <S>.
") Map3DEdges;
static void Map3DEdges(const TopoDS_Shape & S, TopTools_IndexedMapOfShape & M);
/****** BRepTools::OriEdgeInFace ******/
/****** md5 signature: 87c7eb8c9c51ee951fa03577413800d5 ******/
%feature("compactdefaultargs") OriEdgeInFace;
%feature("autodoc", "
Parameters
----------
theEdge: TopoDS_Edge
theFace: TopoDS_Face
Return
-------
TopAbs_Orientation
Description
-----------
returns the cumul of the orientation of <Edge> and thc containing wire in <Face>.
") OriEdgeInFace;
static TopAbs_Orientation OriEdgeInFace(const TopoDS_Edge & theEdge, const TopoDS_Face & theFace);
/****** BRepTools::OuterWire ******/
/****** md5 signature: 34752d857d2c349cc92d685bc3ac944f ******/
%feature("compactdefaultargs") OuterWire;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
Return
-------
TopoDS_Wire
Description
-----------
Returns the outer most wire of <F>. Returns a Null wire if <F> has no wires.
") OuterWire;
static TopoDS_Wire OuterWire(const TopoDS_Face & F);
/****** BRepTools::Read ******/
/****** md5 signature: f8f4ebe237e52067b8c32d38777547cb ******/
%feature("compactdefaultargs") Read;
%feature("autodoc", "
Parameters
----------
Sh: TopoDS_Shape
S: str
B: BRep_Builder
theProgress: Message_ProgressRange (optional, default to Message_ProgressRange())
Return
-------
None
Description
-----------
Reads a Shape from <S> in returns it in <Sh>. <B> is used to build the shape.
") Read;
static void Read(TopoDS_Shape & Sh, std::istream & S, const BRep_Builder & B, const Message_ProgressRange & theProgress = Message_ProgressRange());
/****** BRepTools::Read ******/
/****** md5 signature: 5e5d6e702af29b2284954f484072b531 ******/
%feature("compactdefaultargs") Read;
%feature("autodoc", "
Parameters
----------
Sh: TopoDS_Shape
File: str
B: BRep_Builder
theProgress: Message_ProgressRange (optional, default to Message_ProgressRange())
Return
-------
bool
Description
-----------
Reads a Shape from <File>, returns it in <Sh>. <B> is used to build the shape.
") Read;
static Standard_Boolean Read(TopoDS_Shape & Sh, Standard_CString File, const BRep_Builder & B, const Message_ProgressRange & theProgress = Message_ProgressRange());
/****** BRepTools::RemoveInternals ******/
/****** md5 signature: fb7d53f36648eea1919fdf6c0fb177b1 ******/
%feature("compactdefaultargs") RemoveInternals;
%feature("autodoc", "
Parameters
----------
theS: TopoDS_Shape
theForce: bool (optional, default to Standard_False)
Return
-------
None
Description
-----------
Removes internal sub-shapes from the shape. The check on internal status is based on orientation of sub-shapes, classification is not performed. Before removal of internal sub-shapes the algorithm checks if such removal is not going to break topological connectivity between sub-shapes. The flag <theForce> if set to true disables the connectivity check and clears the given shape from all sub-shapes with internal orientation.
") RemoveInternals;
static void RemoveInternals(TopoDS_Shape & theS, const Standard_Boolean theForce = Standard_False);
/****** BRepTools::RemoveUnusedPCurves ******/
/****** md5 signature: eda361bf0d5c24ff50f23619c0d11b07 ******/
%feature("compactdefaultargs") RemoveUnusedPCurves;
%feature("autodoc", "
Parameters
----------
S: TopoDS_Shape
Return
-------
None
Description
-----------
Removes all the pcurves of the edges of <S> that refer to surfaces not belonging to any face of <S>.
") RemoveUnusedPCurves;
static void RemoveUnusedPCurves(const TopoDS_Shape & S);
/****** BRepTools::Triangulation ******/
/****** md5 signature: 972fc5cfded2376997f1670bb657d434 ******/
%feature("compactdefaultargs") Triangulation;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theLinDefl: float
theToCheckFreeEdges: bool (optional, default to Standard_False)
Return
-------
bool
Description
-----------
Verifies that each Face from the shape has got a triangulation with a deflection smaller or equal to specified one and the Edges a discretization on this triangulation.
Input parameter: theShape shape to verify
Input parameter: theLinDefl maximum allowed linear deflection
Input parameter: theToCheckFreeEdges if True, then free Edges are required to have 3D polygon
Return: False if input Shape contains Faces without triangulation, or that triangulation has worse (greater) deflection than specified one, or Edges in Shape lack polygons on triangulation or free Edges in Shape lack 3D polygons.
") Triangulation;
static Standard_Boolean Triangulation(const TopoDS_Shape & theShape, const Standard_Real theLinDefl, const Standard_Boolean theToCheckFreeEdges = Standard_False);
/****** BRepTools::UVBounds ******/
/****** md5 signature: 0269b57f10dffa44e1c436bbfecc00b6 ******/
%feature("compactdefaultargs") UVBounds;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
Return
-------
UMin: float
UMax: float
VMin: float
VMax: float
Description
-----------
Returns in UMin, UMax, VMin, VMax the bounding values in the parametric space of F.
") UVBounds;
static void UVBounds(const TopoDS_Face & F, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue);
/****** BRepTools::UVBounds ******/
/****** md5 signature: cf2651b439566177e86079e036f0f456 ******/
%feature("compactdefaultargs") UVBounds;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
W: TopoDS_Wire
Return
-------
UMin: float
UMax: float
VMin: float
VMax: float
Description
-----------
Returns in UMin, UMax, VMin, VMax the bounding values of the wire in the parametric space of F.
") UVBounds;
static void UVBounds(const TopoDS_Face & F, const TopoDS_Wire & W, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue);
/****** BRepTools::UVBounds ******/
/****** md5 signature: 391e5b8ffac33b45d944cc1daf0ae4d7 ******/
%feature("compactdefaultargs") UVBounds;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
E: TopoDS_Edge
Return
-------
UMin: float
UMax: float
VMin: float
VMax: float
Description
-----------
Returns in UMin, UMax, VMin, VMax the bounding values of the edge in the parametric space of F.
") UVBounds;
static void UVBounds(const TopoDS_Face & F, const TopoDS_Edge & E, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue);
/****** BRepTools::UnloadAllTriangulations ******/
/****** md5 signature: 8efc2f1bae963a37e143369fac101307 ******/
%feature("compactdefaultargs") UnloadAllTriangulations;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
Return
-------
bool
Description
-----------
Releases all available triangulations for each face of the shape if there is deferred storage to load them later
Input parameter: theShape shape to unload triangulations
Return: True if at least one triangulation is unloaded.
") UnloadAllTriangulations;
static Standard_Boolean UnloadAllTriangulations(const TopoDS_Shape & theShape);
/****** BRepTools::UnloadTriangulation ******/
/****** md5 signature: 4cba1ffb2b2a96847b88c3a4736d9bea ******/
%feature("compactdefaultargs") UnloadTriangulation;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theTriangulationIdx: int (optional, default to -1)
Return
-------
bool
Description
-----------
Releases triangulation data for each face of the shape if there is deferred storage to load it later
Input parameter: theShape shape to unload triangulations
Input parameter: theTriangulationIdx index defining what triangulation should be unloaded. Starts from 0. -1 is used in specific case to unload currently already active triangulation. If some face doesn't contain triangulation with this index, nothing will be unloaded for it. Exception will be thrown in case of invalid negative index
Return: True if at least one triangulation is unloaded.
") UnloadTriangulation;
static Standard_Boolean UnloadTriangulation(const TopoDS_Shape & theShape, const Standard_Integer theTriangulationIdx = -1);
/****** BRepTools::Update ******/
/****** md5 signature: 7afb8b0a0ac818d408265e5c3ffb8146 ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
V: TopoDS_Vertex
Return
-------
None
Description
-----------
Update a vertex (nothing is done).
") Update;
static void Update(const TopoDS_Vertex & V);
/****** BRepTools::Update ******/
/****** md5 signature: 75c7d58dbc644899f41cf6f457451a08 ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
E: TopoDS_Edge
Return
-------
None
Description
-----------
Update an edge, compute 2d bounding boxes.
") Update;
static void Update(const TopoDS_Edge & E);
/****** BRepTools::Update ******/
/****** md5 signature: e94ec159f4082b5b4f1a0f416dd78ef6 ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
W: TopoDS_Wire
Return
-------
None
Description
-----------
Update a wire (nothing is done).
") Update;
static void Update(const TopoDS_Wire & W);
/****** BRepTools::Update ******/
/****** md5 signature: 193444ef19754736bfcad5d390c79b81 ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
F: TopoDS_Face
Return
-------
None
Description
-----------
Update a Face, update UV points.
") Update;
static void Update(const TopoDS_Face & F);
/****** BRepTools::Update ******/
/****** md5 signature: cd320ec7b49cbbb658b6ae7b12c77502 ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
S: TopoDS_Shell
Return
-------
None
Description
-----------
Update a shell (nothing is done).
") Update;
static void Update(const TopoDS_Shell & S);
/****** BRepTools::Update ******/
/****** md5 signature: bdc63e26362e00a362c3b8c586bfa0bc ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
S: TopoDS_Solid
Return
-------
None
Description
-----------
Update a solid (nothing is done).
") Update;
static void Update(const TopoDS_Solid & S);
/****** BRepTools::Update ******/
/****** md5 signature: 6ae6e8f41b41837e6e3794345f0c75eb ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
C: TopoDS_CompSolid
Return
-------
None
Description
-----------
Update a composite solid (nothing is done).
") Update;
static void Update(const TopoDS_CompSolid & C);
/****** BRepTools::Update ******/
/****** md5 signature: c12942ef044e979c45933c3cc101f35a ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
C: TopoDS_Compound
Return
-------
None
Description
-----------
Update a compound (nothing is done).
") Update;
static void Update(const TopoDS_Compound & C);
/****** BRepTools::Update ******/
/****** md5 signature: 9df60fcab5eff3782584302cfec917cf ******/
%feature("compactdefaultargs") Update;
%feature("autodoc", "
Parameters
----------
S: TopoDS_Shape
Return
-------
None
Description
-----------
Update a shape, call the correct update.
") Update;
static void Update(const TopoDS_Shape & S);
/****** BRepTools::UpdateFaceUVPoints ******/
/****** md5 signature: e8c9eb4d0ff9126a91f4898669b73d9f ******/
%feature("compactdefaultargs") UpdateFaceUVPoints;
%feature("autodoc", "
Parameters
----------
theF: TopoDS_Face
Return
-------
None
Description
-----------
For each edge of the face <F> reset the UV points to the bounding points of the parametric curve of the edge on the face.
") UpdateFaceUVPoints;
static void UpdateFaceUVPoints(const TopoDS_Face & theF);
/****** BRepTools::Write ******/
/****** md5 signature: 92da105c9c540199f80c0283d45c56e0 ******/
%feature("compactdefaultargs") Write;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theProgress: Message_ProgressRange (optional, default to Message_ProgressRange())
Return
-------
theStream: Standard_OStream
Description
-----------
Writes the shape to the stream in an ASCII format TopTools_FormatVersion_VERSION_1. This alias writes shape with triangulation data.
Input parameter: theShape the shape to write
Input parameter:[out] theStream the stream to output shape into
Parameter theRange the range of progress indicator to fill in.
") Write;
static void Write(const TopoDS_Shape & theShape, std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange());
/****** BRepTools::Write ******/
/****** md5 signature: 9549ae676c065d5541189e667b74dffd ******/
%feature("compactdefaultargs") Write;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theWithTriangles: bool
theWithNormals: bool
theVersion: TopTools_FormatVersion
theProgress: Message_ProgressRange (optional, default to Message_ProgressRange())
Return
-------
theStream: Standard_OStream
Description
-----------
Writes the shape to the stream in an ASCII format of specified version.
Input parameter: theShape the shape to write
Input parameter:[out] theStream the stream to output shape into
Input parameter: theWithTriangles flag which specifies whether to save shape with (True) or without (False) triangles; has no effect on triangulation-only geometry
Input parameter: theWithNormals flag which specifies whether to save triangulation with (True) or without (False) normals; has no effect on triangulation-only geometry
Input parameter: theVersion the TopTools format version
Parameter theProgress the range of progress indicator to fill in.
") Write;
static void Write(const TopoDS_Shape & theShape, std::ostream &OutValue, const Standard_Boolean theWithTriangles, const Standard_Boolean theWithNormals, const TopTools_FormatVersion theVersion, const Message_ProgressRange & theProgress = Message_ProgressRange());
/****** BRepTools::Write ******/
/****** md5 signature: 2b0742433c64d0c04f4d2d4d98afcfa2 ******/
%feature("compactdefaultargs") Write;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theFile: str
theProgress: Message_ProgressRange (optional, default to Message_ProgressRange())
Return
-------
bool
Description
-----------
Writes the shape to the file in an ASCII format TopTools_FormatVersion_VERSION_1. This alias writes shape with triangulation data.
Input parameter: theShape the shape to write
Input parameter: theFile the path to file to output shape into
Parameter theProgress the range of progress indicator to fill in.
") Write;
static Standard_Boolean Write(const TopoDS_Shape & theShape, Standard_CString theFile, const Message_ProgressRange & theProgress = Message_ProgressRange());
/****** BRepTools::Write ******/
/****** md5 signature: 094fc04abd54fdb9dea8b811e19f6844 ******/
%feature("compactdefaultargs") Write;
%feature("autodoc", "
Parameters
----------
theShape: TopoDS_Shape
theFile: str
theWithTriangles: bool
theWithNormals: bool
theVersion: TopTools_FormatVersion
theProgress: Message_ProgressRange (optional, default to Message_ProgressRange())
Return
-------
bool
Description
-----------
Writes the shape to the file in an ASCII format of specified version.
Input parameter: theShape the shape to write
Input parameter: theFile the path to file to output shape into
Input parameter: theWithTriangles flag which specifies whether to save shape with (True) or without (False) triangles; has no effect on triangulation-only geometry
Input parameter: theWithNormals flag which specifies whether to save triangulation with (True) or without (False) normals; has no effect on triangulation-only geometry
Input parameter: theVersion the TopTools format version
Parameter theProgress the range of progress indicator to fill in.
") Write;
static Standard_Boolean Write(const TopoDS_Shape & theShape, Standard_CString theFile, const Standard_Boolean theWithTriangles, const Standard_Boolean theWithNormals, const TopTools_FormatVersion theVersion, const Message_ProgressRange & theProgress = Message_ProgressRange());
%feature("autodoc", "Serializes TopoDS_Shape to string. If full_precision is False, the default precision of std::stringstream is used which regularly causes rounding.") WriteToString;
%extend{
static std::string WriteToString(const TopoDS_Shape & shape, bool full_precision = true) {
std::stringstream s;
if(full_precision) {
s.precision(17);
s.setf(std::ios::scientific);
}
BRepTools::Write(shape, s);
return s.str();}
};
%feature("autodoc", "Deserializes TopoDS_Shape from string. Create and return a new TopoDS_Shape each time the method is called.") ReadFromString;
%extend{
static TopoDS_Shape ReadFromString(const std::string & src) {
std::istringstream s(std::move(src));
TopoDS_Shape shape;
BRep_Builder b;
BRepTools::Read(shape, s, b);
return shape;
}
};
%feature("autodoc", "Deserializes TopoDS_Shape from string. Take a TopoDS_Shape instance by reference to prevent memory increase.") ReadFromString;
%extend{
static void ReadFromString(const std::string & src, TopoDS_Shape& shape) {
std::istringstream s(std::move(src));