Skip to content

FTA_NonSemanticGDT has no usable properties & FTA_NonSemanticDimension.has_dimension #236

@HotWheelsNL

Description

@HotWheelsNL

I am trying to capture all requirements from a Catia V5 Part for a work related project. All tolerances are set in 3D using the FTA module. Sadly some are not directly connected to features (NonSemantic). I can access most type however for the FTA_NonSemantic* types I have some problems. I'm a bit lost and can not find any examples that try the same. Can someone tell me if this is a bug or that I am doing something wrong?

Description

I have problems with three distinct classes, I think I am not getting the right Annotation class, but my understanding of package does not go that deep:

FTA_NonSemanticDimension
A dimension with the type FTA_NonSemanticDimension returns a DimensionLimit object while the .has_dimension_limit() returns false. I am not sure if this is a bug or that I am using the wrong interface.

FTA_NonSemanticGDT & FTA_NonSemanticTarget
I cannot get the annotation object to return anything. None of the functions in pycatia/cat_tps_interfaces_annotation returns a result. They all give the same generic error.
I noticed that in pycatia/cat_tps_interfaces_annotations it states that Annotation.item()(CATIAAnnotation interface) is deprecated and that item2 (CATIAAnnotation2 interface) should be used. If I manually try that using 'annotations.item2(x)' I get an AnyObject, which is not the expected Annotation2 object. It does seem that Annotation2 has functions related to the FTA_NonSemanticDimension types.

To Reproduce

FTA_NonSemanticDimension
A dimension with the type FTA_NonSemanticDimension returns a DimensionLimit object while the Annotation.has_dimension_limit() function returns False.

from pycatia import catia # Initialize CATIA application
caa = catia() # Open the desired CATPart document 
document = caa.documents.open('path_to_your_catpart.CATPart') 
part = document.part # Get the annotations 
annotations = part.annotation_sets[0].annotations #Your annotation set
annotation = annotations[0] #Select an annotation with the type FTA_NonSemanticDimension

print(annotation.has_dimension_limit()) #Returns False
print(annotation.dimension_limit() #Returns a filled DimensionLimit object

FTA_NonSemanticGDT

from pycatia import catia # Initialize CATIA application
caa = catia() # Open the desired CATPart document 
document = caa.documents.open('path_to_your_catpart.CATPart') 
part = document.part # Get the annotations 
annotations = part.annotation_sets[0].annotations #Your annotation set
annotation = annotations[0] #Select an annotation with the type FTA_NonSemanticDimension

annotation.datum_simple() #Whichever function I use here it results in the same

The generic error is:

    annotation.datum_simple()
    Traceback (most recent call last():
      File "C:\xxx\xxxx\AppData\Roaming\Python\Python310\site-packages\pycatia\cat_tps_interfaces\annotations.py", line 311, in datum_simple
        return DatumSimple(sef.annotation.DatumSimple())
      File "<COMObject.item>", line 2, in DatumSimple
    pywintypes.com_error:  (-2147352567, 'Exception occured.', (0, 'CATIAAnnotation', 'The method DatumSimple failed', None, 0,-2147467259), None)

Screenshots
Below is a generic picture a found that looks very much like the 3D non semantic tolerance but in 2D instead of 3D.
image

Desktop (please complete the following information):

  • OS: Windows 10
  • CATIA V5 version V5-6R2020
  • pycatia version pycatia 0.8.0

Additional context
I can not attach the CATParts as they are work related, sorry.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions