Skip to content

Commit

Permalink
Merge branch 'developement'
Browse files Browse the repository at this point in the history
  • Loading branch information
evereux committed Mar 2, 2025
2 parents 3418deb + 3829d00 commit 940d682
Show file tree
Hide file tree
Showing 13 changed files with 323 additions and 27 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.8.1

* updated Part.annotation_sets return type to be AnnotationSets in lieu of the
generic Collection object.
* updated Annotations.item2 to return an Annotation2 object. Was AnyObject. Issue #236.
* added CATIA version checks for several tps_interfaces.

## 0.8.0

* New Classes, methods, properties and enums added.
Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __getattr__(cls, name):
author = 'Paul Bourne'

# The short X.Y version
version = '0.8.0'
version = '0.8.1'
# The full version, including alpha/beta/rc tags
release = version

Expand Down Expand Up @@ -101,7 +101,6 @@ def __getattr__(cls, name):
'github_user': 'evereux',
'github_repo': 'pycatia',
'github_button': True,
'analytics_id': 'G-HZ9RD8KHJK'
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
157 changes: 143 additions & 14 deletions pycatia/cat_tps_interfaces/annotation_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

class Annotation2(AnyObject):
"""
Introduced in V5-6R2017.
.. note::
:class: toggle
Expand Down Expand Up @@ -79,7 +82,11 @@ def super_type(self) -> str:
:rtype: str
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.SuperType

@property
Expand All @@ -100,7 +107,11 @@ def tps_status(self) -> str:
:rtype: str
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.TPSStatus

@property
Expand All @@ -121,7 +132,11 @@ def type(self) -> str:
:rtype: str
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.Type

@property
Expand All @@ -143,7 +158,11 @@ def z(self) -> float:
:rtype: float
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.Z

@z.setter
Expand All @@ -166,6 +185,11 @@ def add_leader(self) -> None:
:rtype: None
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.AddLeader()

def coordinate_dimension(self) -> CoordDim:
Expand Down Expand Up @@ -202,7 +226,11 @@ def datum_simple(self) -> DatumSimple:
:rtype: DatumSimple
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return DatumSimple(self.annotation_2.DatumSimple())

def datum_target(self) -> DatumTarget:
Expand All @@ -217,7 +245,11 @@ def datum_target(self) -> DatumTarget:
:rtype: DatumTarget
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return DatumTarget(self.annotation_2.DatumTarget())

def default_annotation(self) -> DefaultAnnotation:
Expand All @@ -232,7 +264,11 @@ def default_annotation(self) -> DefaultAnnotation:
:rtype: DefaultAnnotation
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return DefaultAnnotation(self.annotation_2.DefaultAnnotation())

def dimension_3d(self) -> Dimension3D:
Expand All @@ -252,7 +288,11 @@ def dimension_3d(self) -> Dimension3D:
:rtype: Dimension3D
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return Dimension3D(self.annotation_2.Dimension3D())

def flag_note(self) -> FlagNote:
Expand All @@ -272,6 +312,11 @@ def flag_note(self) -> FlagNote:
:rtype: FlagNote
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return FlagNote(self.annotation_2.FlagNote())

def get_surfaces(self, o_safe_array: tuple) -> None:
Expand All @@ -287,6 +332,11 @@ def get_surfaces(self, o_safe_array: tuple) -> None:
:param tuple o_safe_array:
:rtype: None
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.GetSurfaces(o_safe_array)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
Expand Down Expand Up @@ -316,6 +366,11 @@ def get_surfaces_count(self) -> int:
:rtype: int
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.GetSurfacesCount()

def has_a_visualization_dimension(self) -> bool:
Expand All @@ -331,6 +386,11 @@ def has_a_visualization_dimension(self) -> bool:
:rtype: bool
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.HasAVisualizationDimension()

def is_a_consumable_annotation(self) -> bool:
Expand All @@ -347,7 +407,6 @@ def is_a_consumable_annotation(self) -> bool:
:rtype: bool
"""

self.release_check(
self.application.system_configuration.release,
29,
Expand All @@ -368,6 +427,11 @@ def is_a_default_annotation(self) -> bool:
:rtype: bool
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.IsADefaultAnnotation()

def modify_visu(self) -> None:
Expand All @@ -382,6 +446,11 @@ def modify_visu(self) -> None:
:rtype: None
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.ModifyVisu()

def noa(self) -> Noa:
Expand All @@ -396,7 +465,11 @@ def noa(self) -> Noa:
:rtype: Noa
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return Noa(self.annotation_2.Noa())

def non_semantic_datum(self) -> NonSemanticDatum:
Expand All @@ -411,6 +484,11 @@ def non_semantic_datum(self) -> NonSemanticDatum:
:rtype: NonSemanticDatum
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return NonSemanticDatum(self.annotation_2.NonSemanticDatum())

def non_semantic_datum_target(self) -> NonSemanticDatumTarget:
Expand All @@ -425,7 +503,11 @@ def non_semantic_datum_target(self) -> NonSemanticDatumTarget:
:rtype: NonSemanticDatumTarget
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return NonSemanticDatumTarget(self.annotation_2.NonSemanticDatumTarget())

def non_semantic_dimension(self) -> NonSemanticDimension:
Expand All @@ -440,6 +522,11 @@ def non_semantic_dimension(self) -> NonSemanticDimension:
:rtype: NonSemanticDimension
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return NonSemanticDimension(self.annotation_2.NonSemanticDimension())

def non_semantic_gdt(self) -> NonSemanticGDT:
Expand All @@ -454,7 +541,11 @@ def non_semantic_gdt(self) -> NonSemanticGDT:
:rtype: NonSemanticGDT
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return NonSemanticGDT(self.annotation_2.NonSemanticGDT())

def reference_frame(self) -> 'ReferenceFrame':
Expand All @@ -469,6 +560,11 @@ def reference_frame(self) -> 'ReferenceFrame':
:rtype: ReferenceFrame
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
from pycatia.cat_tps_interfaces.reference_frame import ReferenceFrame
return ReferenceFrame(self.annotation_2.ReferenceFrame())

Expand All @@ -484,7 +580,11 @@ def roughness(self) -> Roughness:
:rtype: Roughness
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return Roughness(self.annotation_2.Roughness())

def semantic_gdt(self) -> SemanticGDT:
Expand All @@ -499,6 +599,11 @@ def semantic_gdt(self) -> SemanticGDT:
:rtype: SemanticGDT
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return SemanticGDT(self.annotation_2.SemanticGDT())

def set_xy(self, i_x: float, i_y: float) -> None:
Expand All @@ -524,6 +629,11 @@ def set_xy(self, i_x: float, i_y: float) -> None:
:param float i_y:
:rtype: None
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.SetXY(i_x, i_y)

def text(self) -> Text:
Expand All @@ -543,6 +653,11 @@ def text(self) -> Text:
:rtype: Text
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return Text(self.annotation_2.Text())

def transfert_to_view(self, i_view: TPSView) -> None:
Expand All @@ -563,6 +678,11 @@ def transfert_to_view(self, i_view: TPSView) -> None:
:param TPSView i_view:
:rtype: None
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return self.annotation_2.TransfertToView(i_view.com_object)
# # # # Autogenerated comment:
# # some methods require a system service call as the methods expects a vb array object
Expand Down Expand Up @@ -599,6 +719,11 @@ def visualization_dimension(self) -> Dimension3D:
:rtype: Dimension3D
"""
self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return Dimension3D(self.annotation_2.VisualizationDimension())

def weld(self) -> Weld:
Expand All @@ -613,7 +738,11 @@ def weld(self) -> Weld:
:rtype: Weld
"""

self.release_check(
self.application.system_configuration.release,
27,
f'{self.__class__.__name__}.{inspect.stack()[0][3]}',
)
return Weld(self.annotation_2.Weld())

def __repr__(self):
Expand Down
Loading

0 comments on commit 940d682

Please sign in to comment.