fake-bpy-module 20240411__py3-none-any.whl → 20240418__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fake-bpy-module might be problematic. Click here for more details.
- _bpy_internal/__init__.pyi +4 -0
- _bpy_internal/freedesktop/__init__.pyi +88 -0
- _bpy_internal/freedesktop/py.typed +0 -0
- _bpy_internal/py.typed +0 -0
- aud/__init__.pyi +121 -48
- bgl/__init__.pyi +2443 -1265
- bl_math/__init__.pyi +19 -3
- bl_operators/presets/__init__.pyi +7 -0
- bl_ui/node_add_menu/__init__.pyi +1 -1
- bl_ui/properties_data_lightprobe/__init__.pyi +1134 -0
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +3 -0
- bl_ui/properties_physics_fluid/__init__.pyi +3 -0
- bl_ui/space_toolsystem_toolbar/__init__.pyi +17 -0
- bl_ui/space_userpref/__init__.pyi +13 -4
- bl_ui/space_view3d/__init__.pyi +190 -0
- blf/__init__.pyi +63 -13
- bmesh/__init__.pyi +13 -0
- bmesh/geometry/__init__.pyi +5 -0
- bmesh/ops/__init__.pyi +157 -68
- bmesh/types/__init__.pyi +109 -62
- bmesh/utils/__init__.pyi +11 -2
- bpy/__init__.pyi +7 -0
- bpy/app/__init__.pyi +13 -0
- bpy/app/handlers/__init__.pyi +41 -0
- bpy/app/icons/__init__.pyi +4 -2
- bpy/app/timers/__init__.pyi +38 -2
- bpy/app/translations/__init__.pyi +59 -1
- bpy/msgbus/__init__.pyi +46 -0
- bpy/ops/__init__.pyi +151 -0
- bpy/ops/action/__init__.pyi +76 -76
- bpy/ops/anim/__init__.pyi +104 -104
- bpy/ops/armature/__init__.pyi +96 -96
- bpy/ops/asset/__init__.pyi +32 -32
- bpy/ops/boid/__init__.pyi +16 -16
- bpy/ops/brush/__init__.pyi +18 -18
- bpy/ops/buttons/__init__.pyi +12 -12
- bpy/ops/cachefile/__init__.pyi +10 -10
- bpy/ops/camera/__init__.pyi +4 -4
- bpy/ops/clip/__init__.pyi +184 -184
- bpy/ops/cloth/__init__.pyi +2 -2
- bpy/ops/collection/__init__.pyi +18 -18
- bpy/ops/console/__init__.pyi +42 -42
- bpy/ops/constraint/__init__.pyi +36 -36
- bpy/ops/curve/__init__.pyi +102 -102
- bpy/ops/curves/__init__.pyi +132 -50
- bpy/ops/cycles/__init__.pyi +6 -6
- bpy/ops/dpaint/__init__.pyi +10 -10
- bpy/ops/ed/__init__.pyi +24 -24
- bpy/ops/export_anim/__init__.pyi +2 -2
- bpy/ops/export_mesh/__init__.pyi +2 -2
- bpy/ops/export_scene/__init__.pyi +11 -8
- bpy/ops/file/__init__.pyi +80 -80
- bpy/ops/fluid/__init__.pyi +28 -28
- bpy/ops/font/__init__.pyi +46 -46
- bpy/ops/geometry/__init__.pyi +20 -20
- bpy/ops/gizmogroup/__init__.pyi +4 -4
- bpy/ops/gpencil/__init__.pyi +300 -300
- bpy/ops/graph/__init__.pyi +130 -130
- bpy/ops/grease_pencil/__init__.pyi +139 -110
- bpy/ops/image/__init__.pyi +92 -92
- bpy/ops/import_anim/__init__.pyi +2 -2
- bpy/ops/import_curve/__init__.pyi +2 -2
- bpy/ops/import_mesh/__init__.pyi +2 -2
- bpy/ops/import_scene/__init__.pyi +6 -6
- bpy/ops/info/__init__.pyi +14 -14
- bpy/ops/lattice/__init__.pyi +16 -16
- bpy/ops/marker/__init__.pyi +22 -22
- bpy/ops/mask/__init__.pyi +78 -78
- bpy/ops/material/__init__.pyi +6 -6
- bpy/ops/mball/__init__.pyi +16 -16
- bpy/ops/mesh/__init__.pyi +327 -327
- bpy/ops/nla/__init__.pyi +80 -80
- bpy/ops/node/__init__.pyi +203 -203
- bpy/ops/object/__init__.pyi +496 -508
- bpy/ops/outliner/__init__.pyi +139 -139
- bpy/ops/paint/__init__.pyi +104 -104
- bpy/ops/paintcurve/__init__.pyi +16 -16
- bpy/ops/palette/__init__.pyi +14 -14
- bpy/ops/particle/__init__.pyi +72 -72
- bpy/ops/pose/__init__.pyi +78 -78
- bpy/ops/poselib/__init__.pyi +18 -18
- bpy/ops/preferences/__init__.pyi +77 -77
- bpy/ops/ptcache/__init__.pyi +14 -14
- bpy/ops/render/__init__.pyi +24 -24
- bpy/ops/rigidbody/__init__.pyi +26 -26
- bpy/ops/scene/__init__.pyi +78 -78
- bpy/ops/screen/__init__.pyi +78 -78
- bpy/ops/script/__init__.pyi +6 -6
- bpy/ops/sculpt/__init__.pyi +68 -62
- bpy/ops/sculpt_curves/__init__.pyi +8 -8
- bpy/ops/sequencer/__init__.pyi +170 -170
- bpy/ops/sound/__init__.pyi +14 -14
- bpy/ops/spreadsheet/__init__.pyi +8 -8
- bpy/ops/surface/__init__.pyi +12 -12
- bpy/ops/text/__init__.pyi +86 -86
- bpy/ops/text_editor/__init__.pyi +2 -2
- bpy/ops/texture/__init__.pyi +8 -8
- bpy/ops/transform/__init__.pyi +54 -54
- bpy/ops/ui/__init__.pyi +64 -64
- bpy/ops/uilist/__init__.pyi +6 -6
- bpy/ops/uv/__init__.pyi +98 -98
- bpy/ops/view2d/__init__.pyi +28 -28
- bpy/ops/view3d/__init__.pyi +134 -134
- bpy/ops/wm/__init__.pyi +225 -225
- bpy/ops/workspace/__init__.pyi +14 -14
- bpy/ops/world/__init__.pyi +2 -2
- bpy/path/__init__.pyi +6 -0
- bpy/props/__init__.pyi +141 -29
- bpy/types/__init__.pyi +101773 -5222
- bpy/utils/__init__.pyi +18 -3
- bpy/utils/previews/__init__.pyi +15 -0
- bpy/utils/units/__init__.pyi +11 -3
- bpy_extras/__init__.pyi +19 -0
- bpy_extras/asset_utils/__init__.pyi +5 -0
- {fake_bpy_module-20240411.dist-info → fake_bpy_module-20240418.dist-info}/METADATA +1 -1
- {fake_bpy_module-20240411.dist-info → fake_bpy_module-20240418.dist-info}/RECORD +145 -141
- {fake_bpy_module-20240411.dist-info → fake_bpy_module-20240418.dist-info}/top_level.txt +1 -0
- freestyle/__init__.pyi +18 -0
- freestyle/chainingiterators/__init__.pyi +20 -5
- freestyle/functions/__init__.pyi +151 -155
- freestyle/predicates/__init__.pyi +53 -46
- freestyle/shaders/__init__.pyi +91 -32
- freestyle/types/__init__.pyi +362 -120
- freestyle/utils/ContextFunctions/__init__.pyi +32 -7
- freestyle/utils/__init__.pyi +13 -1
- gpu/__init__.pyi +225 -0
- gpu/capabilities/__init__.pyi +37 -15
- gpu/matrix/__init__.pyi +7 -1
- gpu/platform/__init__.pyi +5 -0
- gpu/select/__init__.pyi +5 -0
- gpu/shader/__init__.pyi +77 -0
- gpu/state/__init__.pyi +15 -4
- gpu/texture/__init__.pyi +5 -0
- gpu/types/__init__.pyi +91 -33
- gpu_extras/__init__.pyi +15 -0
- gpu_extras/presets/__init__.pyi +16 -4
- imbuf/__init__.pyi +13 -0
- imbuf/types/__init__.pyi +20 -5
- mathutils/__init__.pyi +349 -227
- mathutils/bvhtree/__init__.pyi +21 -8
- mathutils/geometry/__init__.pyi +23 -9
- mathutils/interpolate/__init__.pyi +5 -0
- mathutils/kdtree/__init__.pyi +19 -5
- mathutils/noise/__init__.pyi +87 -41
- {fake_bpy_module-20240411.dist-info → fake_bpy_module-20240418.dist-info}/WHEEL +0 -0
freestyle/types/__init__.pyi
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module contains core classes of the Freestyle Python API,
|
|
3
|
+
including data types of view map components (0D and 1D elements), base
|
|
4
|
+
classes for user-defined line stylization rules (predicates,
|
|
5
|
+
functions, chaining iterators, and stroke shaders), and operators.
|
|
6
|
+
|
|
7
|
+
Class hierarchy:
|
|
8
|
+
|
|
9
|
+
* BBox
|
|
10
|
+
* BinaryPredicate0D
|
|
11
|
+
* BinaryPredicate1D
|
|
12
|
+
* Id
|
|
13
|
+
* Interface0D
|
|
14
|
+
* CurvePoint
|
|
15
|
+
* StrokeVertex
|
|
16
|
+
* SVertex
|
|
17
|
+
* ViewVertex
|
|
18
|
+
* NonTVertex
|
|
19
|
+
* TVertex
|
|
20
|
+
* Interface1D
|
|
21
|
+
* Curve
|
|
22
|
+
* Chain
|
|
23
|
+
* FEdge
|
|
24
|
+
* FEdgeSharp
|
|
25
|
+
* FEdgeSmooth
|
|
26
|
+
* Stroke
|
|
27
|
+
* ViewEdge
|
|
28
|
+
* Iterator
|
|
29
|
+
* AdjacencyIterator
|
|
30
|
+
* CurvePointIterator
|
|
31
|
+
* Interface0DIterator
|
|
32
|
+
* SVertexIterator
|
|
33
|
+
* StrokeVertexIterator
|
|
34
|
+
* ViewEdgeIterator
|
|
35
|
+
* ChainingIterator
|
|
36
|
+
* orientedViewEdgeIterator
|
|
37
|
+
* Material
|
|
38
|
+
* Noise
|
|
39
|
+
* Operators
|
|
40
|
+
* SShape
|
|
41
|
+
* StrokeAttribute
|
|
42
|
+
* StrokeShader
|
|
43
|
+
* UnaryFunction0D
|
|
44
|
+
* UnaryFunction0DDouble
|
|
45
|
+
* UnaryFunction0DEdgeNature
|
|
46
|
+
* UnaryFunction0DFloat
|
|
47
|
+
* UnaryFunction0DId
|
|
48
|
+
* UnaryFunction0DMaterial
|
|
49
|
+
* UnaryFunction0DUnsigned
|
|
50
|
+
* UnaryFunction0DVec2f
|
|
51
|
+
* UnaryFunction0DVec3f
|
|
52
|
+
* UnaryFunction0DVectorViewShape
|
|
53
|
+
* UnaryFunction0DViewShape
|
|
54
|
+
* UnaryFunction1D
|
|
55
|
+
* UnaryFunction1DDouble
|
|
56
|
+
* UnaryFunction1DEdgeNature
|
|
57
|
+
* UnaryFunction1DFloat
|
|
58
|
+
* UnaryFunction1DUnsigned
|
|
59
|
+
* UnaryFunction1DVec2f
|
|
60
|
+
* UnaryFunction1DVec3f
|
|
61
|
+
* UnaryFunction1DVectorViewShape
|
|
62
|
+
* UnaryFunction1DVoid
|
|
63
|
+
* UnaryPredicate0D
|
|
64
|
+
* UnaryPredicate1D
|
|
65
|
+
* ViewMap
|
|
66
|
+
* ViewShape
|
|
67
|
+
* IntegrationType
|
|
68
|
+
* MediumType
|
|
69
|
+
* Nature
|
|
70
|
+
|
|
71
|
+
"""
|
|
72
|
+
|
|
1
73
|
import typing
|
|
2
74
|
import mathutils
|
|
3
75
|
|
|
@@ -84,7 +156,7 @@ class BinaryPredicate0D:
|
|
|
84
156
|
"""Default constructor."""
|
|
85
157
|
...
|
|
86
158
|
|
|
87
|
-
def __call__(self, inter1: Interface0D, inter2: Interface0D) ->
|
|
159
|
+
def __call__(self, inter1: Interface0D, inter2: Interface0D) -> bool:
|
|
88
160
|
"""Must be overload by inherited classes. It evaluates a relation
|
|
89
161
|
between two Interface0D objects.
|
|
90
162
|
|
|
@@ -115,7 +187,7 @@ class BinaryPredicate1D:
|
|
|
115
187
|
"""Default constructor."""
|
|
116
188
|
...
|
|
117
189
|
|
|
118
|
-
def __call__(self, inter1: Interface1D, inter2: Interface1D) ->
|
|
190
|
+
def __call__(self, inter1: Interface1D, inter2: Interface1D) -> bool:
|
|
119
191
|
"""Must be overload by inherited classes. It evaluates a relation
|
|
120
192
|
between two Interface1D objects.
|
|
121
193
|
|
|
@@ -250,7 +322,7 @@ class ChainingIterator:
|
|
|
250
322
|
"""
|
|
251
323
|
...
|
|
252
324
|
|
|
253
|
-
def traverse(self, it: AdjacencyIterator)
|
|
325
|
+
def traverse(self, it: AdjacencyIterator):
|
|
254
326
|
"""This method iterates over the potential next ViewEdges and returns
|
|
255
327
|
the one that will be followed next. Returns the next ViewEdge to
|
|
256
328
|
follow or None when the end of the chain is reached.
|
|
@@ -275,8 +347,11 @@ class Curve:
|
|
|
275
347
|
:type: bool
|
|
276
348
|
"""
|
|
277
349
|
|
|
278
|
-
segments_size:
|
|
279
|
-
""" The number of segments in the polyline constituting the Curve.
|
|
350
|
+
segments_size: int
|
|
351
|
+
""" The number of segments in the polyline constituting the Curve.
|
|
352
|
+
|
|
353
|
+
:type: int
|
|
354
|
+
"""
|
|
280
355
|
|
|
281
356
|
def __init__(self):
|
|
282
357
|
"""Builds a `FrsCurve` using a default constructor,
|
|
@@ -349,8 +424,11 @@ A shortcut for CurvePoint.first_svertex.get_fedge(CurvePoint.second_svertex).
|
|
|
349
424
|
:type: SVertex
|
|
350
425
|
"""
|
|
351
426
|
|
|
352
|
-
t2d:
|
|
353
|
-
""" The 2D interpolation parameter.
|
|
427
|
+
t2d: float
|
|
428
|
+
""" The 2D interpolation parameter.
|
|
429
|
+
|
|
430
|
+
:type: float
|
|
431
|
+
"""
|
|
354
432
|
|
|
355
433
|
def __init__(self):
|
|
356
434
|
"""Builds a CurvePoint using the default constructor, copy constructor,
|
|
@@ -372,7 +450,7 @@ A shortcut for CurvePoint.first_svertex.get_fedge(CurvePoint.second_svertex).
|
|
|
372
450
|
"""
|
|
373
451
|
...
|
|
374
452
|
|
|
375
|
-
def __init__(self, first_vertex: SVertex, second_vertex: SVertex, t2d):
|
|
453
|
+
def __init__(self, first_vertex: SVertex, second_vertex: SVertex, t2d: float):
|
|
376
454
|
"""Builds a CurvePoint using the default constructor, copy constructor,
|
|
377
455
|
or one of the overloaded constructors. The over loaded constructors
|
|
378
456
|
can either take two `SVertex` or two `CurvePoint`
|
|
@@ -384,10 +462,11 @@ A shortcut for CurvePoint.first_svertex.get_fedge(CurvePoint.second_svertex).
|
|
|
384
462
|
:type second_vertex: SVertex
|
|
385
463
|
:param t2d: A 2D interpolation parameter used to linearly interpolate
|
|
386
464
|
first_vertex and second_vertex or first_point and second_point.
|
|
465
|
+
:type t2d: float
|
|
387
466
|
"""
|
|
388
467
|
...
|
|
389
468
|
|
|
390
|
-
def __init__(self, first_point: CurvePoint, second_point: CurvePoint, t2d):
|
|
469
|
+
def __init__(self, first_point: CurvePoint, second_point: CurvePoint, t2d: float):
|
|
391
470
|
"""Builds a CurvePoint using the default constructor, copy constructor,
|
|
392
471
|
or one of the overloaded constructors. The over loaded constructors
|
|
393
472
|
can either take two `SVertex` or two `CurvePoint`
|
|
@@ -399,6 +478,7 @@ A shortcut for CurvePoint.first_svertex.get_fedge(CurvePoint.second_svertex).
|
|
|
399
478
|
:type second_point: CurvePoint
|
|
400
479
|
:param t2d: A 2D interpolation parameter used to linearly interpolate
|
|
401
480
|
first_vertex and second_vertex or first_point and second_point.
|
|
481
|
+
:type t2d: float
|
|
402
482
|
"""
|
|
403
483
|
...
|
|
404
484
|
|
|
@@ -414,11 +494,17 @@ class CurvePointIterator:
|
|
|
414
494
|
:type: CurvePoint
|
|
415
495
|
"""
|
|
416
496
|
|
|
417
|
-
t:
|
|
418
|
-
""" The curvilinear abscissa of the current point.
|
|
497
|
+
t: float
|
|
498
|
+
""" The curvilinear abscissa of the current point.
|
|
419
499
|
|
|
420
|
-
|
|
421
|
-
"""
|
|
500
|
+
:type: float
|
|
501
|
+
"""
|
|
502
|
+
|
|
503
|
+
u: float
|
|
504
|
+
""" The point parameter at the current point in the stroke (0 <= u <= 1).
|
|
505
|
+
|
|
506
|
+
:type: float
|
|
507
|
+
"""
|
|
422
508
|
|
|
423
509
|
def __init__(self):
|
|
424
510
|
"""Builds a CurvePointIterator object using either the default constructor,
|
|
@@ -436,13 +522,14 @@ class CurvePointIterator:
|
|
|
436
522
|
"""
|
|
437
523
|
...
|
|
438
524
|
|
|
439
|
-
def __init__(self, step=0.0):
|
|
525
|
+
def __init__(self, step: float = 0.0):
|
|
440
526
|
"""Builds a CurvePointIterator object using either the default constructor,
|
|
441
527
|
copy constructor, or the overloaded constructor.
|
|
442
528
|
|
|
443
529
|
:param step: A resampling resolution with which the curve is resampled.
|
|
444
530
|
If zero, no resampling is done (i.e., the iterator iterates over
|
|
445
531
|
initial vertices).
|
|
532
|
+
:type step: float
|
|
446
533
|
"""
|
|
447
534
|
...
|
|
448
535
|
|
|
@@ -547,13 +634,19 @@ false.
|
|
|
547
634
|
:type: bool
|
|
548
635
|
"""
|
|
549
636
|
|
|
550
|
-
material_index_left:
|
|
551
|
-
""" The index of the material of the face lying on the left of the FEdge.
|
|
637
|
+
material_index_left: int
|
|
638
|
+
""" The index of the material of the face lying on the left of the FEdge.
|
|
552
639
|
|
|
553
|
-
|
|
640
|
+
:type: int
|
|
641
|
+
"""
|
|
642
|
+
|
|
643
|
+
material_index_right: int
|
|
554
644
|
""" The index of the material of the face lying on the right of the FEdge.
|
|
555
645
|
If this FEdge is a border, it has no Face on its right and therefore
|
|
556
|
-
no material.
|
|
646
|
+
no material.
|
|
647
|
+
|
|
648
|
+
:type: int
|
|
649
|
+
"""
|
|
557
650
|
|
|
558
651
|
material_left: Material
|
|
559
652
|
""" The material of the face lying on the left of the FEdge.
|
|
@@ -626,8 +719,11 @@ class FEdgeSmooth:
|
|
|
626
719
|
:type: Material
|
|
627
720
|
"""
|
|
628
721
|
|
|
629
|
-
material_index:
|
|
630
|
-
""" The index of the material of the face that this FEdge is running across.
|
|
722
|
+
material_index: int
|
|
723
|
+
""" The index of the material of the face that this FEdge is running across.
|
|
724
|
+
|
|
725
|
+
:type: int
|
|
726
|
+
"""
|
|
631
727
|
|
|
632
728
|
normal: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
633
729
|
""" The normal of the face that this FEdge is running across.
|
|
@@ -665,11 +761,17 @@ class FEdgeSmooth:
|
|
|
665
761
|
class Id:
|
|
666
762
|
"""Class for representing an object Id."""
|
|
667
763
|
|
|
668
|
-
first:
|
|
669
|
-
""" The first number constituting the Id.
|
|
764
|
+
first: int
|
|
765
|
+
""" The first number constituting the Id.
|
|
670
766
|
|
|
671
|
-
|
|
672
|
-
"""
|
|
767
|
+
:type: int
|
|
768
|
+
"""
|
|
769
|
+
|
|
770
|
+
second: int
|
|
771
|
+
""" The second number constituting the Id.
|
|
772
|
+
|
|
773
|
+
:type: int
|
|
774
|
+
"""
|
|
673
775
|
|
|
674
776
|
def __init__(self, brother):
|
|
675
777
|
"""Build the Id from two numbers or another `Id` using the copy constructor.
|
|
@@ -678,11 +780,13 @@ class Id:
|
|
|
678
780
|
"""
|
|
679
781
|
...
|
|
680
782
|
|
|
681
|
-
def __init__(self, first=0, second=0):
|
|
783
|
+
def __init__(self, first: int = 0, second: int = 0):
|
|
682
784
|
"""Build the Id from two numbers or another `Id` using the copy constructor.
|
|
683
785
|
|
|
684
786
|
:param first:
|
|
787
|
+
:type first: int
|
|
685
788
|
:param second: The second number.
|
|
789
|
+
:type second: int
|
|
686
790
|
"""
|
|
687
791
|
...
|
|
688
792
|
|
|
@@ -727,20 +831,29 @@ class Interface0D:
|
|
|
727
831
|
:type: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
728
832
|
"""
|
|
729
833
|
|
|
730
|
-
projected_x:
|
|
731
|
-
""" The X coordinate of the projected 3D point of this 0D element.
|
|
834
|
+
projected_x: float
|
|
835
|
+
""" The X coordinate of the projected 3D point of this 0D element.
|
|
732
836
|
|
|
733
|
-
|
|
734
|
-
"""
|
|
837
|
+
:type: float
|
|
838
|
+
"""
|
|
839
|
+
|
|
840
|
+
projected_y: float
|
|
841
|
+
""" The Y coordinate of the projected 3D point of this 0D element.
|
|
735
842
|
|
|
736
|
-
|
|
737
|
-
"""
|
|
843
|
+
:type: float
|
|
844
|
+
"""
|
|
845
|
+
|
|
846
|
+
projected_z: float
|
|
847
|
+
""" The Z coordinate of the projected 3D point of this 0D element.
|
|
848
|
+
|
|
849
|
+
:type: float
|
|
850
|
+
"""
|
|
738
851
|
|
|
739
852
|
def __init__(self):
|
|
740
853
|
"""Default constructor."""
|
|
741
854
|
...
|
|
742
855
|
|
|
743
|
-
def get_fedge(self, inter: Interface0D) ->
|
|
856
|
+
def get_fedge(self, inter: Interface0D) -> FEdge:
|
|
744
857
|
"""Returns the FEdge that lies between this 0D element and the 0D
|
|
745
858
|
element given as the argument.
|
|
746
859
|
|
|
@@ -772,11 +885,17 @@ class, the .object property refers to a `StrokeVertex` object.
|
|
|
772
885
|
:type: Interface0D
|
|
773
886
|
"""
|
|
774
887
|
|
|
775
|
-
t:
|
|
776
|
-
""" The curvilinear abscissa of the current point.
|
|
888
|
+
t: float
|
|
889
|
+
""" The curvilinear abscissa of the current point.
|
|
890
|
+
|
|
891
|
+
:type: float
|
|
892
|
+
"""
|
|
893
|
+
|
|
894
|
+
u: float
|
|
895
|
+
""" The point parameter at the current point in the 1D element (0 <= u <= 1).
|
|
777
896
|
|
|
778
|
-
|
|
779
|
-
"""
|
|
897
|
+
:type: float
|
|
898
|
+
"""
|
|
780
899
|
|
|
781
900
|
def __init__(self, brother: Interface0DIterator):
|
|
782
901
|
"""Construct a nested Interface0DIterator using either the copy constructor
|
|
@@ -805,8 +924,11 @@ class Interface1D:
|
|
|
805
924
|
:type: Id
|
|
806
925
|
"""
|
|
807
926
|
|
|
808
|
-
length_2d:
|
|
809
|
-
""" The 2D length of this Interface1D.
|
|
927
|
+
length_2d: float
|
|
928
|
+
""" The 2D length of this Interface1D.
|
|
929
|
+
|
|
930
|
+
:type: float
|
|
931
|
+
"""
|
|
810
932
|
|
|
811
933
|
name: str
|
|
812
934
|
""" The string of the name of the 1D element.
|
|
@@ -820,14 +942,17 @@ class Interface1D:
|
|
|
820
942
|
:type: Nature
|
|
821
943
|
"""
|
|
822
944
|
|
|
823
|
-
time_stamp:
|
|
824
|
-
""" The time stamp of the 1D element, mainly used for selection.
|
|
945
|
+
time_stamp: int
|
|
946
|
+
""" The time stamp of the 1D element, mainly used for selection.
|
|
947
|
+
|
|
948
|
+
:type: int
|
|
949
|
+
"""
|
|
825
950
|
|
|
826
951
|
def __init__(self):
|
|
827
952
|
"""Default constructor."""
|
|
828
953
|
...
|
|
829
954
|
|
|
830
|
-
def points_begin(self, t=0.0):
|
|
955
|
+
def points_begin(self, t: float = 0.0) -> Interface0DIterator:
|
|
831
956
|
"""Returns an iterator over the Interface1D points, pointing to the
|
|
832
957
|
first point. The difference with vertices_begin() is that here we can
|
|
833
958
|
iterate over points of the 1D element at a any given sampling.
|
|
@@ -835,12 +960,13 @@ class Interface1D:
|
|
|
835
960
|
|
|
836
961
|
:param t: A sampling with which we want to iterate over points of
|
|
837
962
|
this 1D element.
|
|
963
|
+
:type t: float
|
|
838
964
|
:return: An Interface0DIterator pointing to the first point.
|
|
839
965
|
:rtype: Interface0DIterator
|
|
840
966
|
"""
|
|
841
967
|
...
|
|
842
968
|
|
|
843
|
-
def points_end(self, t=0.0):
|
|
969
|
+
def points_end(self, t: float = 0.0) -> Interface0DIterator:
|
|
844
970
|
"""Returns an iterator over the Interface1D points, pointing after the
|
|
845
971
|
last point. The difference with vertices_end() is that here we can
|
|
846
972
|
iterate over points of the 1D element at a given sampling. Indeed,
|
|
@@ -848,6 +974,7 @@ class Interface1D:
|
|
|
848
974
|
|
|
849
975
|
:param t: A sampling with which we want to iterate over points of
|
|
850
976
|
this 1D element.
|
|
977
|
+
:type t: float
|
|
851
978
|
:return: An Interface0DIterator pointing after the last point.
|
|
852
979
|
:rtype: Interface0DIterator
|
|
853
980
|
"""
|
|
@@ -931,11 +1058,17 @@ class Material:
|
|
|
931
1058
|
:type: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
932
1059
|
"""
|
|
933
1060
|
|
|
934
|
-
priority:
|
|
935
|
-
""" Line color priority of the material.
|
|
1061
|
+
priority: int
|
|
1062
|
+
""" Line color priority of the material.
|
|
936
1063
|
|
|
937
|
-
|
|
938
|
-
"""
|
|
1064
|
+
:type: int
|
|
1065
|
+
"""
|
|
1066
|
+
|
|
1067
|
+
shininess: float
|
|
1068
|
+
""" Shininess coefficient of the material.
|
|
1069
|
+
|
|
1070
|
+
:type: float
|
|
1071
|
+
"""
|
|
939
1072
|
|
|
940
1073
|
specular: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
941
1074
|
""" RGBA components of the specular color of the material.
|
|
@@ -966,8 +1099,8 @@ class Material:
|
|
|
966
1099
|
ambient: typing.Union[typing.Sequence[float], mathutils.Vector, list],
|
|
967
1100
|
specular: typing.Union[typing.Sequence[float], mathutils.Vector, list],
|
|
968
1101
|
emission: typing.Union[typing.Sequence[float], mathutils.Vector, list],
|
|
969
|
-
shininess,
|
|
970
|
-
priority,
|
|
1102
|
+
shininess: float,
|
|
1103
|
+
priority: int,
|
|
971
1104
|
):
|
|
972
1105
|
"""Creates a `FrsMaterial` using either default constructor,
|
|
973
1106
|
copy constructor, or an overloaded constructor
|
|
@@ -983,7 +1116,9 @@ class Material:
|
|
|
983
1116
|
:param emission: The emissive color.
|
|
984
1117
|
:type emission: typing.Union[typing.Sequence[float], mathutils.Vector, list]
|
|
985
1118
|
:param shininess: The shininess coefficient.
|
|
1119
|
+
:type shininess: float
|
|
986
1120
|
:param priority: The line color priority.
|
|
1121
|
+
:type priority: int
|
|
987
1122
|
"""
|
|
988
1123
|
...
|
|
989
1124
|
|
|
@@ -1002,89 +1137,107 @@ class Nature:
|
|
|
1002
1137
|
class Noise:
|
|
1003
1138
|
"""Class to provide Perlin noise functionalities.Undocumented, consider contributing.Undocumented, consider contributing."""
|
|
1004
1139
|
|
|
1005
|
-
def __init__(self, seed
|
|
1140
|
+
def __init__(self, seed: int = -1):
|
|
1006
1141
|
"""Builds a Noise object. Seed is an optional argument. The seed value is used
|
|
1007
1142
|
as a seed for random number generation if it is equal to or greater than zero;
|
|
1008
1143
|
otherwise, time is used as a seed.
|
|
1009
1144
|
|
|
1010
1145
|
:param seed: Seed for random number generation.
|
|
1146
|
+
:type seed: int
|
|
1011
1147
|
"""
|
|
1012
1148
|
...
|
|
1013
1149
|
|
|
1014
|
-
def smoothNoise1(self, v):
|
|
1150
|
+
def smoothNoise1(self, v: float) -> float:
|
|
1015
1151
|
"""Returns a smooth noise value for a 1D element.
|
|
1016
1152
|
|
|
1017
1153
|
:param v: One-dimensional sample point.
|
|
1154
|
+
:type v: float
|
|
1018
1155
|
:return: A smooth noise value.
|
|
1156
|
+
:rtype: float
|
|
1019
1157
|
"""
|
|
1020
1158
|
...
|
|
1021
1159
|
|
|
1022
1160
|
def smoothNoise2(
|
|
1023
1161
|
self, v: typing.Union[typing.Sequence[float], mathutils.Vector, list]
|
|
1024
|
-
) ->
|
|
1162
|
+
) -> float:
|
|
1025
1163
|
"""Returns a smooth noise value for a 2D element.
|
|
1026
1164
|
|
|
1027
1165
|
:param v: Two-dimensional sample point.
|
|
1028
1166
|
:type v: typing.Union[typing.Sequence[float], mathutils.Vector, list]
|
|
1029
1167
|
:return: A smooth noise value.
|
|
1168
|
+
:rtype: float
|
|
1030
1169
|
"""
|
|
1031
1170
|
...
|
|
1032
1171
|
|
|
1033
1172
|
def smoothNoise3(
|
|
1034
1173
|
self, v: typing.Union[typing.Sequence[float], mathutils.Vector, list]
|
|
1035
|
-
) ->
|
|
1174
|
+
) -> float:
|
|
1036
1175
|
"""Returns a smooth noise value for a 3D element.
|
|
1037
1176
|
|
|
1038
1177
|
:param v: Three-dimensional sample point.
|
|
1039
1178
|
:type v: typing.Union[typing.Sequence[float], mathutils.Vector, list]
|
|
1040
1179
|
:return: A smooth noise value.
|
|
1180
|
+
:rtype: float
|
|
1041
1181
|
"""
|
|
1042
1182
|
...
|
|
1043
1183
|
|
|
1044
|
-
def turbulence1(self, v, freq, amp, oct=4):
|
|
1184
|
+
def turbulence1(self, v: float, freq: float, amp: float, oct: int = 4) -> float:
|
|
1045
1185
|
"""Returns a noise value for a 1D element.
|
|
1046
1186
|
|
|
1047
1187
|
:param v: One-dimensional sample point.
|
|
1188
|
+
:type v: float
|
|
1048
1189
|
:param freq: Noise frequency.
|
|
1190
|
+
:type freq: float
|
|
1049
1191
|
:param amp: Amplitude.
|
|
1192
|
+
:type amp: float
|
|
1050
1193
|
:param oct: Number of octaves.
|
|
1194
|
+
:type oct: int
|
|
1051
1195
|
:return: A noise value.
|
|
1196
|
+
:rtype: float
|
|
1052
1197
|
"""
|
|
1053
1198
|
...
|
|
1054
1199
|
|
|
1055
1200
|
def turbulence2(
|
|
1056
1201
|
self,
|
|
1057
1202
|
v: typing.Union[typing.Sequence[float], mathutils.Vector, list],
|
|
1058
|
-
freq,
|
|
1059
|
-
amp,
|
|
1060
|
-
oct=4,
|
|
1061
|
-
):
|
|
1203
|
+
freq: float,
|
|
1204
|
+
amp: float,
|
|
1205
|
+
oct: int = 4,
|
|
1206
|
+
) -> float:
|
|
1062
1207
|
"""Returns a noise value for a 2D element.
|
|
1063
1208
|
|
|
1064
1209
|
:param v: Two-dimensional sample point.
|
|
1065
1210
|
:type v: typing.Union[typing.Sequence[float], mathutils.Vector, list]
|
|
1066
1211
|
:param freq: Noise frequency.
|
|
1212
|
+
:type freq: float
|
|
1067
1213
|
:param amp: Amplitude.
|
|
1214
|
+
:type amp: float
|
|
1068
1215
|
:param oct: Number of octaves.
|
|
1216
|
+
:type oct: int
|
|
1069
1217
|
:return: A noise value.
|
|
1218
|
+
:rtype: float
|
|
1070
1219
|
"""
|
|
1071
1220
|
...
|
|
1072
1221
|
|
|
1073
1222
|
def turbulence3(
|
|
1074
1223
|
self,
|
|
1075
1224
|
v: typing.Union[typing.Sequence[float], mathutils.Vector, list],
|
|
1076
|
-
freq,
|
|
1077
|
-
amp,
|
|
1078
|
-
oct=4,
|
|
1079
|
-
):
|
|
1225
|
+
freq: float,
|
|
1226
|
+
amp: float,
|
|
1227
|
+
oct: int = 4,
|
|
1228
|
+
) -> float:
|
|
1080
1229
|
"""Returns a noise value for a 3D element.
|
|
1081
1230
|
|
|
1082
1231
|
:param v: Three-dimensional sample point.
|
|
1083
1232
|
:type v: typing.Union[typing.Sequence[float], mathutils.Vector, list]
|
|
1084
1233
|
:param freq: Noise frequency.
|
|
1234
|
+
:type freq: float
|
|
1085
1235
|
:param amp: Amplitude.
|
|
1236
|
+
:type amp: float
|
|
1086
1237
|
:param oct: Number of octaves.
|
|
1238
|
+
:type oct: int
|
|
1087
1239
|
:return: A noise value.
|
|
1240
|
+
:rtype: float
|
|
1088
1241
|
"""
|
|
1089
1242
|
...
|
|
1090
1243
|
|
|
@@ -1216,54 +1369,60 @@ class Operators:
|
|
|
1216
1369
|
...
|
|
1217
1370
|
|
|
1218
1371
|
@staticmethod
|
|
1219
|
-
def get_chain_from_index(i):
|
|
1372
|
+
def get_chain_from_index(i: int) -> Chain:
|
|
1220
1373
|
"""Returns the Chain at the index in the current set of Chains.
|
|
1221
1374
|
|
|
1222
1375
|
:param i: index (0 <= i < Operators.get_chains_size()).
|
|
1376
|
+
:type i: int
|
|
1223
1377
|
:return: The Chain object.
|
|
1224
1378
|
:rtype: Chain
|
|
1225
1379
|
"""
|
|
1226
1380
|
...
|
|
1227
1381
|
|
|
1228
1382
|
@staticmethod
|
|
1229
|
-
def get_chains_size() ->
|
|
1383
|
+
def get_chains_size() -> int:
|
|
1230
1384
|
"""Returns the number of Chains.
|
|
1231
1385
|
|
|
1232
1386
|
:return: The number of Chains.
|
|
1387
|
+
:rtype: int
|
|
1233
1388
|
"""
|
|
1234
1389
|
...
|
|
1235
1390
|
|
|
1236
1391
|
@staticmethod
|
|
1237
|
-
def get_stroke_from_index(i):
|
|
1392
|
+
def get_stroke_from_index(i: int) -> Stroke:
|
|
1238
1393
|
"""Returns the Stroke at the index in the current set of Strokes.
|
|
1239
1394
|
|
|
1240
1395
|
:param i: index (0 <= i < Operators.get_strokes_size()).
|
|
1396
|
+
:type i: int
|
|
1241
1397
|
:return: The Stroke object.
|
|
1242
1398
|
:rtype: Stroke
|
|
1243
1399
|
"""
|
|
1244
1400
|
...
|
|
1245
1401
|
|
|
1246
1402
|
@staticmethod
|
|
1247
|
-
def get_strokes_size() ->
|
|
1403
|
+
def get_strokes_size() -> int:
|
|
1248
1404
|
"""Returns the number of Strokes.
|
|
1249
1405
|
|
|
1250
1406
|
:return: The number of Strokes.
|
|
1407
|
+
:rtype: int
|
|
1251
1408
|
"""
|
|
1252
1409
|
...
|
|
1253
1410
|
|
|
1254
1411
|
@staticmethod
|
|
1255
|
-
def get_view_edges_size():
|
|
1412
|
+
def get_view_edges_size() -> int:
|
|
1256
1413
|
"""Returns the number of ViewEdges.
|
|
1257
1414
|
|
|
1258
1415
|
:return: The number of ViewEdges.
|
|
1416
|
+
:rtype: int
|
|
1259
1417
|
"""
|
|
1260
1418
|
...
|
|
1261
1419
|
|
|
1262
1420
|
@staticmethod
|
|
1263
|
-
def get_viewedge_from_index(i):
|
|
1421
|
+
def get_viewedge_from_index(i: int) -> ViewEdge:
|
|
1264
1422
|
"""Returns the ViewEdge at the index in the current set of ViewEdges.
|
|
1265
1423
|
|
|
1266
1424
|
:param i: index (0 <= i < Operators.get_view_edges_size()).
|
|
1425
|
+
:type i: int
|
|
1267
1426
|
:return: The ViewEdge object.
|
|
1268
1427
|
:rtype: ViewEdge
|
|
1269
1428
|
"""
|
|
@@ -1271,7 +1430,7 @@ class Operators:
|
|
|
1271
1430
|
|
|
1272
1431
|
@staticmethod
|
|
1273
1432
|
def recursive_split(
|
|
1274
|
-
func: UnaryFunction0DDouble, pred_1d: UnaryPredicate1D, sampling=0.0
|
|
1433
|
+
func: UnaryFunction0DDouble, pred_1d: UnaryPredicate1D, sampling: float = 0.0
|
|
1275
1434
|
):
|
|
1276
1435
|
"""Splits the current set of chains in a recursive way. We process the
|
|
1277
1436
|
points of each chain (with a specified sampling) to find the point
|
|
@@ -1294,6 +1453,7 @@ class Operators:
|
|
|
1294
1453
|
predicates evaluation. (The chain is not actually resampled; a
|
|
1295
1454
|
virtual point only progresses along the curve using this
|
|
1296
1455
|
resolution.)
|
|
1456
|
+
:type sampling: float
|
|
1297
1457
|
"""
|
|
1298
1458
|
...
|
|
1299
1459
|
|
|
@@ -1302,7 +1462,7 @@ class Operators:
|
|
|
1302
1462
|
func: UnaryFunction0DDouble,
|
|
1303
1463
|
pred_0d: UnaryPredicate0D,
|
|
1304
1464
|
pred_1d: UnaryPredicate1D,
|
|
1305
|
-
sampling=0.0,
|
|
1465
|
+
sampling: float = 0.0,
|
|
1306
1466
|
):
|
|
1307
1467
|
"""Splits the current set of chains in a recursive way. We process the
|
|
1308
1468
|
points of each chain (with a specified sampling) to find the point
|
|
@@ -1331,6 +1491,7 @@ class Operators:
|
|
|
1331
1491
|
predicates evaluation. (The chain is not actually resampled; a
|
|
1332
1492
|
virtual point only progresses along the curve using this
|
|
1333
1493
|
resolution.)
|
|
1494
|
+
:type sampling: float
|
|
1334
1495
|
"""
|
|
1335
1496
|
...
|
|
1336
1497
|
|
|
@@ -1356,7 +1517,9 @@ class Operators:
|
|
|
1356
1517
|
|
|
1357
1518
|
@staticmethod
|
|
1358
1519
|
def sequential_split(
|
|
1359
|
-
starting_pred: UnaryPredicate0D,
|
|
1520
|
+
starting_pred: UnaryPredicate0D,
|
|
1521
|
+
stopping_pred: UnaryPredicate0D,
|
|
1522
|
+
sampling: float = 0.0,
|
|
1360
1523
|
):
|
|
1361
1524
|
"""Splits each chain of the current set of chains in a sequential way.
|
|
1362
1525
|
The points of each chain are processed (with a specified sampling)
|
|
@@ -1374,11 +1537,12 @@ class Operators:
|
|
|
1374
1537
|
predicates evaluation. (The chain is not actually resampled;
|
|
1375
1538
|
a virtual point only progresses along the curve using this
|
|
1376
1539
|
resolution.)
|
|
1540
|
+
:type sampling: float
|
|
1377
1541
|
"""
|
|
1378
1542
|
...
|
|
1379
1543
|
|
|
1380
1544
|
@staticmethod
|
|
1381
|
-
def sequential_split(pred: UnaryPredicate0D, sampling=0.0):
|
|
1545
|
+
def sequential_split(pred: UnaryPredicate0D, sampling: float = 0.0):
|
|
1382
1546
|
"""Splits each chain of the current set of chains in a sequential way.
|
|
1383
1547
|
The points of each chain are processed (with a specified sampling)
|
|
1384
1548
|
sequentially. The first point of the initial chain is the
|
|
@@ -1393,6 +1557,7 @@ class Operators:
|
|
|
1393
1557
|
predicates evaluation. (The chain is not actually resampled;
|
|
1394
1558
|
a virtual point only progresses along the curve using this
|
|
1395
1559
|
resolution.)
|
|
1560
|
+
:type sampling: float
|
|
1396
1561
|
"""
|
|
1397
1562
|
...
|
|
1398
1563
|
|
|
@@ -1502,8 +1667,11 @@ derivative of the radial curvature at this SVertex, respectively.
|
|
|
1502
1667
|
has exactly one normal. In a smooth surface, an SVertex can have any
|
|
1503
1668
|
number of normals."""
|
|
1504
1669
|
|
|
1505
|
-
normals_size:
|
|
1506
|
-
""" The number of different normals for this SVertex.
|
|
1670
|
+
normals_size: int
|
|
1671
|
+
""" The number of different normals for this SVertex.
|
|
1672
|
+
|
|
1673
|
+
:type: int
|
|
1674
|
+
"""
|
|
1507
1675
|
|
|
1508
1676
|
point_2d: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1509
1677
|
""" The projected 3D coordinates of the SVertex.
|
|
@@ -1584,11 +1752,17 @@ class SVertexIterator:
|
|
|
1584
1752
|
:type: SVertex
|
|
1585
1753
|
"""
|
|
1586
1754
|
|
|
1587
|
-
t:
|
|
1588
|
-
""" The curvilinear abscissa of the current point.
|
|
1755
|
+
t: float
|
|
1756
|
+
""" The curvilinear abscissa of the current point.
|
|
1589
1757
|
|
|
1590
|
-
|
|
1591
|
-
"""
|
|
1758
|
+
:type: float
|
|
1759
|
+
"""
|
|
1760
|
+
|
|
1761
|
+
u: float
|
|
1762
|
+
""" The point parameter at the current point in the 1D element (0 <= u <= 1).
|
|
1763
|
+
|
|
1764
|
+
:type: float
|
|
1765
|
+
"""
|
|
1592
1766
|
|
|
1593
1767
|
def __init__(self):
|
|
1594
1768
|
"""Build an SVertexIterator using either the default constructor, copy constructor,or the overloaded constructor that starts iteration from an SVertex object vertex."""
|
|
@@ -1603,7 +1777,12 @@ class SVertexIterator:
|
|
|
1603
1777
|
...
|
|
1604
1778
|
|
|
1605
1779
|
def __init__(
|
|
1606
|
-
self,
|
|
1780
|
+
self,
|
|
1781
|
+
vertex: SVertex,
|
|
1782
|
+
begin: SVertex,
|
|
1783
|
+
previous_edge: FEdge,
|
|
1784
|
+
next_edge: FEdge,
|
|
1785
|
+
t: float,
|
|
1607
1786
|
):
|
|
1608
1787
|
"""Build an SVertexIterator using either the default constructor, copy constructor,or the overloaded constructor that starts iteration from an SVertex object vertex.
|
|
1609
1788
|
|
|
@@ -1616,6 +1795,7 @@ class SVertexIterator:
|
|
|
1616
1795
|
:param next_edge: The next FEdge going out from vertex.
|
|
1617
1796
|
:type next_edge: FEdge
|
|
1618
1797
|
:param t: The curvilinear abscissa at vertex.
|
|
1798
|
+
:type t: float
|
|
1619
1799
|
"""
|
|
1620
1800
|
...
|
|
1621
1801
|
|
|
@@ -1632,8 +1812,11 @@ class Stroke:
|
|
|
1632
1812
|
:type: Id
|
|
1633
1813
|
"""
|
|
1634
1814
|
|
|
1635
|
-
length_2d:
|
|
1636
|
-
""" The 2D length of the Stroke.
|
|
1815
|
+
length_2d: float
|
|
1816
|
+
""" The 2D length of the Stroke.
|
|
1817
|
+
|
|
1818
|
+
:type: float
|
|
1819
|
+
"""
|
|
1637
1820
|
|
|
1638
1821
|
medium_type: MediumType
|
|
1639
1822
|
""" The MediumType used for this Stroke.
|
|
@@ -1641,8 +1824,11 @@ class Stroke:
|
|
|
1641
1824
|
:type: MediumType
|
|
1642
1825
|
"""
|
|
1643
1826
|
|
|
1644
|
-
texture_id:
|
|
1645
|
-
""" The ID of the texture used to simulate th marks system for this Stroke.
|
|
1827
|
+
texture_id: int
|
|
1828
|
+
""" The ID of the texture used to simulate th marks system for this Stroke.
|
|
1829
|
+
|
|
1830
|
+
:type: int
|
|
1831
|
+
"""
|
|
1646
1832
|
|
|
1647
1833
|
tips: bool
|
|
1648
1834
|
""" True if this Stroke uses a texture with tips, and false otherwise.
|
|
@@ -1661,7 +1847,7 @@ class Stroke:
|
|
|
1661
1847
|
"""
|
|
1662
1848
|
...
|
|
1663
1849
|
|
|
1664
|
-
def compute_sampling(self, n):
|
|
1850
|
+
def compute_sampling(self, n: int) -> float:
|
|
1665
1851
|
"""Compute the sampling needed to get N vertices. If the
|
|
1666
1852
|
specified number of vertices is less than the actual number of
|
|
1667
1853
|
vertices, the actual sampling value is returned. (To remove Vertices,
|
|
@@ -1669,8 +1855,10 @@ class Stroke:
|
|
|
1669
1855
|
|
|
1670
1856
|
:param n: The number of stroke vertices we eventually want
|
|
1671
1857
|
in our Stroke.
|
|
1858
|
+
:type n: int
|
|
1672
1859
|
:return: The sampling that must be used in the Resample(float)
|
|
1673
1860
|
method.
|
|
1861
|
+
:rtype: float
|
|
1674
1862
|
"""
|
|
1675
1863
|
...
|
|
1676
1864
|
|
|
@@ -1700,7 +1888,7 @@ class Stroke:
|
|
|
1700
1888
|
"""
|
|
1701
1889
|
...
|
|
1702
1890
|
|
|
1703
|
-
def resample(self, n):
|
|
1891
|
+
def resample(self, n: int):
|
|
1704
1892
|
"""Resamples the stroke so using one of two methods with the goal
|
|
1705
1893
|
of creating a stroke with fewer points and the same shape.
|
|
1706
1894
|
|
|
@@ -1708,25 +1896,28 @@ class Stroke:
|
|
|
1708
1896
|
it is going to add N-vertices_size, where vertices_size is the
|
|
1709
1897
|
number of points we already have. If vertices_size >= N, no
|
|
1710
1898
|
resampling is done.
|
|
1899
|
+
:type n: int
|
|
1711
1900
|
"""
|
|
1712
1901
|
...
|
|
1713
1902
|
|
|
1714
|
-
def resample(self, sampling):
|
|
1903
|
+
def resample(self, sampling: float):
|
|
1715
1904
|
"""Resamples the stroke so using one of two methods with the goal
|
|
1716
1905
|
of creating a stroke with fewer points and the same shape.
|
|
1717
1906
|
|
|
1718
1907
|
:param sampling: Resamples the stroke with a given sampling value. If the
|
|
1719
1908
|
sampling is smaller than the actual sampling value, no resampling is done.
|
|
1909
|
+
:type sampling: float
|
|
1720
1910
|
"""
|
|
1721
1911
|
...
|
|
1722
1912
|
|
|
1723
|
-
def stroke_vertices_begin(self, t=0.0):
|
|
1913
|
+
def stroke_vertices_begin(self, t: float = 0.0) -> StrokeVertexIterator:
|
|
1724
1914
|
"""Returns a StrokeVertexIterator pointing on the first StrokeVertex of
|
|
1725
1915
|
the Stroke. One can specify a sampling value to re-sample the Stroke
|
|
1726
1916
|
on the fly if needed.
|
|
1727
1917
|
|
|
1728
1918
|
:param t: The resampling value with which we want our Stroke to be
|
|
1729
1919
|
resampled. If 0 is specified, no resampling is done.
|
|
1920
|
+
:type t: float
|
|
1730
1921
|
:return: A StrokeVertexIterator pointing on the first StrokeVertex.
|
|
1731
1922
|
:rtype: StrokeVertexIterator
|
|
1732
1923
|
"""
|
|
@@ -1741,10 +1932,11 @@ class Stroke:
|
|
|
1741
1932
|
"""
|
|
1742
1933
|
...
|
|
1743
1934
|
|
|
1744
|
-
def stroke_vertices_size(self) ->
|
|
1935
|
+
def stroke_vertices_size(self) -> int:
|
|
1745
1936
|
"""Returns the number of StrokeVertex constituting the Stroke.
|
|
1746
1937
|
|
|
1747
1938
|
:return: The number of stroke vertices.
|
|
1939
|
+
:rtype: int
|
|
1748
1940
|
"""
|
|
1749
1941
|
...
|
|
1750
1942
|
|
|
@@ -1758,8 +1950,11 @@ class StrokeAttribute:
|
|
|
1758
1950
|
Vertex.
|
|
1759
1951
|
"""
|
|
1760
1952
|
|
|
1761
|
-
alpha:
|
|
1762
|
-
""" Alpha component of the stroke color.
|
|
1953
|
+
alpha: float
|
|
1954
|
+
""" Alpha component of the stroke color.
|
|
1955
|
+
|
|
1956
|
+
:type: float
|
|
1957
|
+
"""
|
|
1763
1958
|
|
|
1764
1959
|
color: typing.Union[typing.Sequence[float], mathutils.Color]
|
|
1765
1960
|
""" RGB components of the stroke color.
|
|
@@ -1799,21 +1994,37 @@ when following the stroke.
|
|
|
1799
1994
|
"""
|
|
1800
1995
|
...
|
|
1801
1996
|
|
|
1802
|
-
def __init__(
|
|
1997
|
+
def __init__(
|
|
1998
|
+
self,
|
|
1999
|
+
red: float,
|
|
2000
|
+
green: float,
|
|
2001
|
+
blue: float,
|
|
2002
|
+
alpha: float,
|
|
2003
|
+
thickness_right: float,
|
|
2004
|
+
thickness_left: float,
|
|
2005
|
+
):
|
|
1803
2006
|
"""Creates a `StrokeAttribute` object using either a default constructor,
|
|
1804
2007
|
copy constructor, overloaded constructor, or and interpolation constructor
|
|
1805
2008
|
to interpolate between two `StrokeAttribute` objects.
|
|
1806
2009
|
|
|
1807
2010
|
:param red: Red component of a stroke color.
|
|
2011
|
+
:type red: float
|
|
1808
2012
|
:param green: Green component of a stroke color.
|
|
2013
|
+
:type green: float
|
|
1809
2014
|
:param blue: Blue component of a stroke color.
|
|
2015
|
+
:type blue: float
|
|
1810
2016
|
:param alpha: Alpha component of a stroke color.
|
|
2017
|
+
:type alpha: float
|
|
1811
2018
|
:param thickness_right: Stroke thickness on the right.
|
|
2019
|
+
:type thickness_right: float
|
|
1812
2020
|
:param thickness_left: Stroke thickness on the left.
|
|
2021
|
+
:type thickness_left: float
|
|
1813
2022
|
"""
|
|
1814
2023
|
...
|
|
1815
2024
|
|
|
1816
|
-
def __init__(
|
|
2025
|
+
def __init__(
|
|
2026
|
+
self, attribute1: StrokeAttribute, attribute2: StrokeAttribute, t: float
|
|
2027
|
+
):
|
|
1817
2028
|
"""Creates a `StrokeAttribute` object using either a default constructor,
|
|
1818
2029
|
copy constructor, overloaded constructor, or and interpolation constructor
|
|
1819
2030
|
to interpolate between two `StrokeAttribute` objects.
|
|
@@ -1823,19 +2034,21 @@ when following the stroke.
|
|
|
1823
2034
|
:param attribute2: The second StrokeAttribute object.
|
|
1824
2035
|
:type attribute2: StrokeAttribute
|
|
1825
2036
|
:param t: The interpolation parameter (0 <= t <= 1).
|
|
2037
|
+
:type t: float
|
|
1826
2038
|
"""
|
|
1827
2039
|
...
|
|
1828
2040
|
|
|
1829
|
-
def get_attribute_real(self, name: str) ->
|
|
2041
|
+
def get_attribute_real(self, name: str) -> float:
|
|
1830
2042
|
"""Returns an attribute of float type.
|
|
1831
2043
|
|
|
1832
2044
|
:param name: The name of the attribute.
|
|
1833
2045
|
:type name: str
|
|
1834
2046
|
:return: The attribute value.
|
|
2047
|
+
:rtype: float
|
|
1835
2048
|
"""
|
|
1836
2049
|
...
|
|
1837
2050
|
|
|
1838
|
-
def get_attribute_vec2(self, name: str) ->
|
|
2051
|
+
def get_attribute_vec2(self, name: str) -> mathutils.Vector:
|
|
1839
2052
|
"""Returns an attribute of two-dimensional vector type.
|
|
1840
2053
|
|
|
1841
2054
|
:param name: The name of the attribute.
|
|
@@ -1845,7 +2058,7 @@ when following the stroke.
|
|
|
1845
2058
|
"""
|
|
1846
2059
|
...
|
|
1847
2060
|
|
|
1848
|
-
def get_attribute_vec3(self, name: str) ->
|
|
2061
|
+
def get_attribute_vec3(self, name: str) -> mathutils.Vector:
|
|
1849
2062
|
"""Returns an attribute of three-dimensional vector type.
|
|
1850
2063
|
|
|
1851
2064
|
:param name: The name of the attribute.
|
|
@@ -1855,7 +2068,7 @@ when following the stroke.
|
|
|
1855
2068
|
"""
|
|
1856
2069
|
...
|
|
1857
2070
|
|
|
1858
|
-
def has_attribute_real(self, name: str) ->
|
|
2071
|
+
def has_attribute_real(self, name: str) -> bool:
|
|
1859
2072
|
"""Checks whether the attribute name of float type is available.
|
|
1860
2073
|
|
|
1861
2074
|
:param name: The name of the attribute.
|
|
@@ -1865,7 +2078,7 @@ when following the stroke.
|
|
|
1865
2078
|
"""
|
|
1866
2079
|
...
|
|
1867
2080
|
|
|
1868
|
-
def has_attribute_vec2(self, name: str) ->
|
|
2081
|
+
def has_attribute_vec2(self, name: str) -> bool:
|
|
1869
2082
|
"""Checks whether the attribute name of two-dimensional vector type
|
|
1870
2083
|
is available.
|
|
1871
2084
|
|
|
@@ -1876,7 +2089,7 @@ when following the stroke.
|
|
|
1876
2089
|
"""
|
|
1877
2090
|
...
|
|
1878
2091
|
|
|
1879
|
-
def has_attribute_vec3(self, name: str) ->
|
|
2092
|
+
def has_attribute_vec3(self, name: str) -> bool:
|
|
1880
2093
|
"""Checks whether the attribute name of three-dimensional vector
|
|
1881
2094
|
type is available.
|
|
1882
2095
|
|
|
@@ -1887,7 +2100,7 @@ when following the stroke.
|
|
|
1887
2100
|
"""
|
|
1888
2101
|
...
|
|
1889
2102
|
|
|
1890
|
-
def set_attribute_real(self, name: str, value):
|
|
2103
|
+
def set_attribute_real(self, name: str, value: float):
|
|
1891
2104
|
"""Adds a user-defined attribute of float type. If there is no
|
|
1892
2105
|
attribute of the given name, it is added. Otherwise, the new value
|
|
1893
2106
|
replaces the old one.
|
|
@@ -1895,6 +2108,7 @@ when following the stroke.
|
|
|
1895
2108
|
:param name: The name of the attribute.
|
|
1896
2109
|
:type name: str
|
|
1897
2110
|
:param value: The attribute value.
|
|
2111
|
+
:type value: float
|
|
1898
2112
|
"""
|
|
1899
2113
|
...
|
|
1900
2114
|
|
|
@@ -1967,8 +2181,11 @@ class StrokeVertex:
|
|
|
1967
2181
|
:type: StrokeAttribute
|
|
1968
2182
|
"""
|
|
1969
2183
|
|
|
1970
|
-
curvilinear_abscissa:
|
|
1971
|
-
""" Curvilinear abscissa of this StrokeVertex in the Stroke.
|
|
2184
|
+
curvilinear_abscissa: float
|
|
2185
|
+
""" Curvilinear abscissa of this StrokeVertex in the Stroke.
|
|
2186
|
+
|
|
2187
|
+
:type: float
|
|
2188
|
+
"""
|
|
1972
2189
|
|
|
1973
2190
|
point: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1974
2191
|
""" 2D point coordinates.
|
|
@@ -1976,12 +2193,18 @@ class StrokeVertex:
|
|
|
1976
2193
|
:type: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
1977
2194
|
"""
|
|
1978
2195
|
|
|
1979
|
-
stroke_length:
|
|
2196
|
+
stroke_length: float
|
|
1980
2197
|
""" Stroke length (it is only a value retained by the StrokeVertex,
|
|
1981
|
-
and it won't change the real stroke length).
|
|
2198
|
+
and it won't change the real stroke length).
|
|
1982
2199
|
|
|
1983
|
-
|
|
1984
|
-
"""
|
|
2200
|
+
:type: float
|
|
2201
|
+
"""
|
|
2202
|
+
|
|
2203
|
+
u: float
|
|
2204
|
+
""" Curvilinear abscissa of this StrokeVertex in the Stroke.
|
|
2205
|
+
|
|
2206
|
+
:type: float
|
|
2207
|
+
"""
|
|
1985
2208
|
|
|
1986
2209
|
def __init__(self):
|
|
1987
2210
|
"""Builds a `StrokeVertex` using the default constructor,
|
|
@@ -2001,7 +2224,9 @@ and it won't change the real stroke length)."""
|
|
|
2001
2224
|
"""
|
|
2002
2225
|
...
|
|
2003
2226
|
|
|
2004
|
-
def __init__(
|
|
2227
|
+
def __init__(
|
|
2228
|
+
self, first_vertex: StrokeVertex, second_vertex: StrokeVertex, t3d: float
|
|
2229
|
+
):
|
|
2005
2230
|
"""Builds a `StrokeVertex` using the default constructor,
|
|
2006
2231
|
copy constructor, from 2 `StrokeVertex` and an interpolation parameter,
|
|
2007
2232
|
from a CurvePoint, from a SVertex, or a `SVertex` and a `StrokeAttribute` object.
|
|
@@ -2011,6 +2236,7 @@ and it won't change the real stroke length)."""
|
|
|
2011
2236
|
:param second_vertex: The second StrokeVertex.
|
|
2012
2237
|
:type second_vertex: StrokeVertex
|
|
2013
2238
|
:param t3d: An interpolation parameter.
|
|
2239
|
+
:type t3d: float
|
|
2014
2240
|
"""
|
|
2015
2241
|
...
|
|
2016
2242
|
|
|
@@ -2075,11 +2301,17 @@ For its counterpart (pointing to the first valid element), use it.is_begin.
|
|
|
2075
2301
|
:type: StrokeVertex
|
|
2076
2302
|
"""
|
|
2077
2303
|
|
|
2078
|
-
t:
|
|
2079
|
-
""" The curvilinear abscissa of the current point.
|
|
2304
|
+
t: float
|
|
2305
|
+
""" The curvilinear abscissa of the current point.
|
|
2306
|
+
|
|
2307
|
+
:type: float
|
|
2308
|
+
"""
|
|
2080
2309
|
|
|
2081
|
-
u:
|
|
2082
|
-
""" The point parameter at the current point in the stroke (0 <= u <= 1).
|
|
2310
|
+
u: float
|
|
2311
|
+
""" The point parameter at the current point in the stroke (0 <= u <= 1).
|
|
2312
|
+
|
|
2313
|
+
:type: float
|
|
2314
|
+
"""
|
|
2083
2315
|
|
|
2084
2316
|
def __init__(self):
|
|
2085
2317
|
"""Creates a `StrokeVertexIterator` using either the
|
|
@@ -2164,7 +2396,7 @@ class TVertex:
|
|
|
2164
2396
|
"""
|
|
2165
2397
|
...
|
|
2166
2398
|
|
|
2167
|
-
def get_svertex(self, fedge: FEdge) ->
|
|
2399
|
+
def get_svertex(self, fedge: FEdge) -> SVertex:
|
|
2168
2400
|
"""Returns the SVertex (among the 2) belonging to the given FEdge.
|
|
2169
2401
|
|
|
2170
2402
|
:param fedge: An FEdge object.
|
|
@@ -2533,7 +2765,7 @@ class UnaryPredicate0D:
|
|
|
2533
2765
|
"""Default constructor."""
|
|
2534
2766
|
...
|
|
2535
2767
|
|
|
2536
|
-
def __call__(self, it: Interface0DIterator) ->
|
|
2768
|
+
def __call__(self, it: Interface0DIterator) -> bool:
|
|
2537
2769
|
"""Must be overload by inherited classes.
|
|
2538
2770
|
|
|
2539
2771
|
:param it: The Interface0DIterator pointing onto the Interface0D at
|
|
@@ -2563,7 +2795,7 @@ class UnaryPredicate1D:
|
|
|
2563
2795
|
"""Default constructor."""
|
|
2564
2796
|
...
|
|
2565
2797
|
|
|
2566
|
-
def __call__(self, inter: Interface1D) ->
|
|
2798
|
+
def __call__(self, inter: Interface1D) -> bool:
|
|
2567
2799
|
"""Must be overload by inherited classes.
|
|
2568
2800
|
|
|
2569
2801
|
:param inter: The Interface1D on which we wish to evaluate the predicate.
|
|
@@ -2579,8 +2811,11 @@ class ViewEdge:
|
|
|
2579
2811
|
a set of FEdges.
|
|
2580
2812
|
"""
|
|
2581
2813
|
|
|
2582
|
-
chaining_time_stamp:
|
|
2583
|
-
""" The time stamp of this ViewEdge.
|
|
2814
|
+
chaining_time_stamp: int
|
|
2815
|
+
""" The time stamp of this ViewEdge.
|
|
2816
|
+
|
|
2817
|
+
:type: int
|
|
2818
|
+
"""
|
|
2584
2819
|
|
|
2585
2820
|
first_fedge: FEdge
|
|
2586
2821
|
""" The first FEdge that constitutes this ViewEdge.
|
|
@@ -2631,8 +2866,11 @@ belongs to. If no object is occluded, this property is set to None.
|
|
|
2631
2866
|
:type: ViewShape
|
|
2632
2867
|
"""
|
|
2633
2868
|
|
|
2634
|
-
qi:
|
|
2635
|
-
""" The quantitative invisibility.
|
|
2869
|
+
qi: int
|
|
2870
|
+
""" The quantitative invisibility.
|
|
2871
|
+
|
|
2872
|
+
:type: int
|
|
2873
|
+
"""
|
|
2636
2874
|
|
|
2637
2875
|
viewshape: ViewShape
|
|
2638
2876
|
""" The ViewShape to which this ViewEdge belongs to.
|
|
@@ -2730,21 +2968,25 @@ class ViewMap:
|
|
|
2730
2968
|
"""Default constructor."""
|
|
2731
2969
|
...
|
|
2732
2970
|
|
|
2733
|
-
def get_closest_fedge(self, x, y):
|
|
2971
|
+
def get_closest_fedge(self, x: float, y: float) -> FEdge:
|
|
2734
2972
|
"""Gets the FEdge nearest to the 2D point specified as arguments.
|
|
2735
2973
|
|
|
2736
2974
|
:param x: X coordinate of a 2D point.
|
|
2975
|
+
:type x: float
|
|
2737
2976
|
:param y: Y coordinate of a 2D point.
|
|
2977
|
+
:type y: float
|
|
2738
2978
|
:return: The FEdge nearest to the specified 2D point.
|
|
2739
2979
|
:rtype: FEdge
|
|
2740
2980
|
"""
|
|
2741
2981
|
...
|
|
2742
2982
|
|
|
2743
|
-
def get_closest_viewedge(self, x, y):
|
|
2983
|
+
def get_closest_viewedge(self, x: float, y: float) -> ViewEdge:
|
|
2744
2984
|
"""Gets the ViewEdge nearest to the 2D point specified as arguments.
|
|
2745
2985
|
|
|
2746
2986
|
:param x: X coordinate of a 2D point.
|
|
2987
|
+
:type x: float
|
|
2747
2988
|
:param y: Y coordinate of a 2D point.
|
|
2989
|
+
:type y: float
|
|
2748
2990
|
:return: The ViewEdge nearest to the specified 2D point.
|
|
2749
2991
|
:rtype: ViewEdge
|
|
2750
2992
|
"""
|
|
@@ -2850,7 +3092,7 @@ class ViewVertex:
|
|
|
2850
3092
|
:type: Nature
|
|
2851
3093
|
"""
|
|
2852
3094
|
|
|
2853
|
-
def edges_begin(self) ->
|
|
3095
|
+
def edges_begin(self) -> orientedViewEdgeIterator:
|
|
2854
3096
|
"""Returns an iterator over the ViewEdges that goes to or comes from
|
|
2855
3097
|
this ViewVertex pointing to the first ViewEdge of the list. The
|
|
2856
3098
|
orientedViewEdgeIterator allows to iterate in CCW order over these
|
|
@@ -2871,7 +3113,7 @@ class ViewVertex:
|
|
|
2871
3113
|
"""
|
|
2872
3114
|
...
|
|
2873
3115
|
|
|
2874
|
-
def edges_iterator(self, edge: ViewEdge) ->
|
|
3116
|
+
def edges_iterator(self, edge: ViewEdge) -> orientedViewEdgeIterator:
|
|
2875
3117
|
"""Returns an orientedViewEdgeIterator pointing to the ViewEdge given
|
|
2876
3118
|
as argument.
|
|
2877
3119
|
|