Skip to content

Commit 940d682

Browse files
committed
Merge branch 'developement'
2 parents 3418deb + 3829d00 commit 940d682

File tree

13 files changed

+323
-27
lines changed

13 files changed

+323
-27
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 0.8.1
4+
5+
* updated Part.annotation_sets return type to be AnnotationSets in lieu of the
6+
generic Collection object.
7+
* updated Annotations.item2 to return an Annotation2 object. Was AnyObject. Issue #236.
8+
* added CATIA version checks for several tps_interfaces.
9+
310
## 0.8.0
411

512
* New Classes, methods, properties and enums added.

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __getattr__(cls, name):
3636
author = 'Paul Bourne'
3737

3838
# The short X.Y version
39-
version = '0.8.0'
39+
version = '0.8.1'
4040
# The full version, including alpha/beta/rc tags
4141
release = version
4242

@@ -101,7 +101,6 @@ def __getattr__(cls, name):
101101
'github_user': 'evereux',
102102
'github_repo': 'pycatia',
103103
'github_button': True,
104-
'analytics_id': 'G-HZ9RD8KHJK'
105104
}
106105

107106
# Add any paths that contain custom static files (such as style sheets) here,

pycatia/cat_tps_interfaces/annotation_2.py

Lines changed: 143 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636

3737
class Annotation2(AnyObject):
3838
"""
39+
40+
Introduced in V5-6R2017.
41+
3942
.. note::
4043
:class: toggle
4144
@@ -79,7 +82,11 @@ def super_type(self) -> str:
7982
8083
:rtype: str
8184
"""
82-
85+
self.release_check(
86+
self.application.system_configuration.release,
87+
27,
88+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
89+
)
8390
return self.annotation_2.SuperType
8491

8592
@property
@@ -100,7 +107,11 @@ def tps_status(self) -> str:
100107
101108
:rtype: str
102109
"""
103-
110+
self.release_check(
111+
self.application.system_configuration.release,
112+
27,
113+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
114+
)
104115
return self.annotation_2.TPSStatus
105116

106117
@property
@@ -121,7 +132,11 @@ def type(self) -> str:
121132
122133
:rtype: str
123134
"""
124-
135+
self.release_check(
136+
self.application.system_configuration.release,
137+
27,
138+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
139+
)
125140
return self.annotation_2.Type
126141

127142
@property
@@ -143,7 +158,11 @@ def z(self) -> float:
143158
144159
:rtype: float
145160
"""
146-
161+
self.release_check(
162+
self.application.system_configuration.release,
163+
27,
164+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
165+
)
147166
return self.annotation_2.Z
148167

149168
@z.setter
@@ -166,6 +185,11 @@ def add_leader(self) -> None:
166185
167186
:rtype: None
168187
"""
188+
self.release_check(
189+
self.application.system_configuration.release,
190+
27,
191+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
192+
)
169193
return self.annotation_2.AddLeader()
170194

171195
def coordinate_dimension(self) -> CoordDim:
@@ -202,7 +226,11 @@ def datum_simple(self) -> DatumSimple:
202226
203227
:rtype: DatumSimple
204228
"""
205-
229+
self.release_check(
230+
self.application.system_configuration.release,
231+
27,
232+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
233+
)
206234
return DatumSimple(self.annotation_2.DatumSimple())
207235

208236
def datum_target(self) -> DatumTarget:
@@ -217,7 +245,11 @@ def datum_target(self) -> DatumTarget:
217245
218246
:rtype: DatumTarget
219247
"""
220-
248+
self.release_check(
249+
self.application.system_configuration.release,
250+
27,
251+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
252+
)
221253
return DatumTarget(self.annotation_2.DatumTarget())
222254

223255
def default_annotation(self) -> DefaultAnnotation:
@@ -232,7 +264,11 @@ def default_annotation(self) -> DefaultAnnotation:
232264
233265
:rtype: DefaultAnnotation
234266
"""
235-
267+
self.release_check(
268+
self.application.system_configuration.release,
269+
27,
270+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
271+
)
236272
return DefaultAnnotation(self.annotation_2.DefaultAnnotation())
237273

238274
def dimension_3d(self) -> Dimension3D:
@@ -252,7 +288,11 @@ def dimension_3d(self) -> Dimension3D:
252288
253289
:rtype: Dimension3D
254290
"""
255-
291+
self.release_check(
292+
self.application.system_configuration.release,
293+
27,
294+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
295+
)
256296
return Dimension3D(self.annotation_2.Dimension3D())
257297

258298
def flag_note(self) -> FlagNote:
@@ -272,6 +312,11 @@ def flag_note(self) -> FlagNote:
272312
273313
:rtype: FlagNote
274314
"""
315+
self.release_check(
316+
self.application.system_configuration.release,
317+
27,
318+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
319+
)
275320
return FlagNote(self.annotation_2.FlagNote())
276321

277322
def get_surfaces(self, o_safe_array: tuple) -> None:
@@ -287,6 +332,11 @@ def get_surfaces(self, o_safe_array: tuple) -> None:
287332
:param tuple o_safe_array:
288333
:rtype: None
289334
"""
335+
self.release_check(
336+
self.application.system_configuration.release,
337+
27,
338+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
339+
)
290340
return self.annotation_2.GetSurfaces(o_safe_array)
291341
# # # # Autogenerated comment:
292342
# # some methods require a system service call as the methods expects a vb array object
@@ -316,6 +366,11 @@ def get_surfaces_count(self) -> int:
316366
317367
:rtype: int
318368
"""
369+
self.release_check(
370+
self.application.system_configuration.release,
371+
27,
372+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
373+
)
319374
return self.annotation_2.GetSurfacesCount()
320375

321376
def has_a_visualization_dimension(self) -> bool:
@@ -331,6 +386,11 @@ def has_a_visualization_dimension(self) -> bool:
331386
332387
:rtype: bool
333388
"""
389+
self.release_check(
390+
self.application.system_configuration.release,
391+
27,
392+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
393+
)
334394
return self.annotation_2.HasAVisualizationDimension()
335395

336396
def is_a_consumable_annotation(self) -> bool:
@@ -347,7 +407,6 @@ def is_a_consumable_annotation(self) -> bool:
347407
348408
:rtype: bool
349409
"""
350-
351410
self.release_check(
352411
self.application.system_configuration.release,
353412
29,
@@ -368,6 +427,11 @@ def is_a_default_annotation(self) -> bool:
368427
369428
:rtype: bool
370429
"""
430+
self.release_check(
431+
self.application.system_configuration.release,
432+
27,
433+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
434+
)
371435
return self.annotation_2.IsADefaultAnnotation()
372436

373437
def modify_visu(self) -> None:
@@ -382,6 +446,11 @@ def modify_visu(self) -> None:
382446
383447
:rtype: None
384448
"""
449+
self.release_check(
450+
self.application.system_configuration.release,
451+
27,
452+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
453+
)
385454
return self.annotation_2.ModifyVisu()
386455

387456
def noa(self) -> Noa:
@@ -396,7 +465,11 @@ def noa(self) -> Noa:
396465
397466
:rtype: Noa
398467
"""
399-
468+
self.release_check(
469+
self.application.system_configuration.release,
470+
27,
471+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
472+
)
400473
return Noa(self.annotation_2.Noa())
401474

402475
def non_semantic_datum(self) -> NonSemanticDatum:
@@ -411,6 +484,11 @@ def non_semantic_datum(self) -> NonSemanticDatum:
411484
412485
:rtype: NonSemanticDatum
413486
"""
487+
self.release_check(
488+
self.application.system_configuration.release,
489+
27,
490+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
491+
)
414492
return NonSemanticDatum(self.annotation_2.NonSemanticDatum())
415493

416494
def non_semantic_datum_target(self) -> NonSemanticDatumTarget:
@@ -425,7 +503,11 @@ def non_semantic_datum_target(self) -> NonSemanticDatumTarget:
425503
426504
:rtype: NonSemanticDatumTarget
427505
"""
428-
506+
self.release_check(
507+
self.application.system_configuration.release,
508+
27,
509+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
510+
)
429511
return NonSemanticDatumTarget(self.annotation_2.NonSemanticDatumTarget())
430512

431513
def non_semantic_dimension(self) -> NonSemanticDimension:
@@ -440,6 +522,11 @@ def non_semantic_dimension(self) -> NonSemanticDimension:
440522
441523
:rtype: NonSemanticDimension
442524
"""
525+
self.release_check(
526+
self.application.system_configuration.release,
527+
27,
528+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
529+
)
443530
return NonSemanticDimension(self.annotation_2.NonSemanticDimension())
444531

445532
def non_semantic_gdt(self) -> NonSemanticGDT:
@@ -454,7 +541,11 @@ def non_semantic_gdt(self) -> NonSemanticGDT:
454541
455542
:rtype: NonSemanticGDT
456543
"""
457-
544+
self.release_check(
545+
self.application.system_configuration.release,
546+
27,
547+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
548+
)
458549
return NonSemanticGDT(self.annotation_2.NonSemanticGDT())
459550

460551
def reference_frame(self) -> 'ReferenceFrame':
@@ -469,6 +560,11 @@ def reference_frame(self) -> 'ReferenceFrame':
469560
470561
:rtype: ReferenceFrame
471562
"""
563+
self.release_check(
564+
self.application.system_configuration.release,
565+
27,
566+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
567+
)
472568
from pycatia.cat_tps_interfaces.reference_frame import ReferenceFrame
473569
return ReferenceFrame(self.annotation_2.ReferenceFrame())
474570

@@ -484,7 +580,11 @@ def roughness(self) -> Roughness:
484580
485581
:rtype: Roughness
486582
"""
487-
583+
self.release_check(
584+
self.application.system_configuration.release,
585+
27,
586+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
587+
)
488588
return Roughness(self.annotation_2.Roughness())
489589

490590
def semantic_gdt(self) -> SemanticGDT:
@@ -499,6 +599,11 @@ def semantic_gdt(self) -> SemanticGDT:
499599
500600
:rtype: SemanticGDT
501601
"""
602+
self.release_check(
603+
self.application.system_configuration.release,
604+
27,
605+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
606+
)
502607
return SemanticGDT(self.annotation_2.SemanticGDT())
503608

504609
def set_xy(self, i_x: float, i_y: float) -> None:
@@ -524,6 +629,11 @@ def set_xy(self, i_x: float, i_y: float) -> None:
524629
:param float i_y:
525630
:rtype: None
526631
"""
632+
self.release_check(
633+
self.application.system_configuration.release,
634+
27,
635+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
636+
)
527637
return self.annotation_2.SetXY(i_x, i_y)
528638

529639
def text(self) -> Text:
@@ -543,6 +653,11 @@ def text(self) -> Text:
543653
544654
:rtype: Text
545655
"""
656+
self.release_check(
657+
self.application.system_configuration.release,
658+
27,
659+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
660+
)
546661
return Text(self.annotation_2.Text())
547662

548663
def transfert_to_view(self, i_view: TPSView) -> None:
@@ -563,6 +678,11 @@ def transfert_to_view(self, i_view: TPSView) -> None:
563678
:param TPSView i_view:
564679
:rtype: None
565680
"""
681+
self.release_check(
682+
self.application.system_configuration.release,
683+
27,
684+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
685+
)
566686
return self.annotation_2.TransfertToView(i_view.com_object)
567687
# # # # Autogenerated comment:
568688
# # some methods require a system service call as the methods expects a vb array object
@@ -599,6 +719,11 @@ def visualization_dimension(self) -> Dimension3D:
599719
600720
:rtype: Dimension3D
601721
"""
722+
self.release_check(
723+
self.application.system_configuration.release,
724+
27,
725+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
726+
)
602727
return Dimension3D(self.annotation_2.VisualizationDimension())
603728

604729
def weld(self) -> Weld:
@@ -613,7 +738,11 @@ def weld(self) -> Weld:
613738
614739
:rtype: Weld
615740
"""
616-
741+
self.release_check(
742+
self.application.system_configuration.release,
743+
27,
744+
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
745+
)
617746
return Weld(self.annotation_2.Weld())
618747

619748
def __repr__(self):

0 commit comments

Comments
 (0)