[Ma...] Posted November 26 Share Posted November 26 Good morning to all, I have to get the position in the active 3d view of a label. With a dn label this is possible, but with a normal label it seems that it's not possible (the result is None). I am wrong with something? Link to comment Share on other sites More sharing options...
[Ma...] Posted November 26 Author Share Posted November 26 If found the bug: if you just visualize the label, the offset posizion in 3d view is None, if you move the label the property "label_offset_in_3d_view" start to work. I attach a video about this that I think i't a bug. GOMSoftware_pHeRErwJac.mp4 Link to comment Share on other sites More sharing options...
[Ma...] Posted November 27 Share Posted November 27 Hi Marco, Which version (incl. service-pack) of ZEISS INSPECT are you using? Thank you and best regards, Matthias Link to comment Share on other sites More sharing options...
[Ma...] Posted November 27 Author Share Posted November 27 (edited) GOM Inspect (2021 Hotfix 9, Rev. 157193, Build 2022-12-08) Edited November 27 Link to comment Share on other sites More sharing options...
[Ma...] Posted December 4 Author Share Posted December 4 Anyone has an idea? Link to comment Share on other sites More sharing options...
[Ma...] Posted December 5 Share Posted December 5 Sorry, I don't have this version available for testing any more. Link to comment Share on other sites More sharing options...
[Ma...] Posted Tuesday at 10:47 AM Author Share Posted Tuesday at 10:47 AM With your gom versione don't you have this problem? Link to comment Share on other sites More sharing options...
[De...] Posted Tuesday at 09:25 PM Share Posted Tuesday at 09:25 PM maybe try to select that element with the script? https://zeiss.github.io/zeiss-inspect-app-api/2025/howtos/python_api_introduction/selecting_elements.html Link to comment Share on other sites More sharing options...
[Na...] Posted Wednesday at 12:07 PM Share Posted Wednesday at 12:07 PM Hi Marco, I think this is a feature. The offset only exists, if the label was moved from its original 'standard' position. Link to comment Share on other sites More sharing options...
[Ma...] Posted 5 hours ago Author Share Posted 5 hours ago Hi Nanno! My goal is to take the vector and the position in the 3dview of a dn label then create a normal deviation label in the same position of the dn label. Do you know the right way to do it? Link to comment Share on other sites More sharing options...
[De...] Posted 3 hours ago Share Posted 3 hours ago hey marco, to clarify - you want a nominal surface point with dn check instead of a deviation label on the surface comparison? import gom import numpy as np gom_part = gom.app.project.parts[0] label = gom.app.project.inspection['Surface comparison 2'].deviation_label['Surface comparison 2.1'] coord = np.array(label.data.coordinate) normal = np.array(label.data.normal) x, y, z = coord.reshape(-1) nx, ny, nz = normal.reshape(-1) gom.script.cad.show_element_exclusively (elements=gom.ElementSelection ({'category': ['key', 'elements', 'part', gom_part, 'explorer_category', 'nominal_part']})) ##nominal surface pt nominal_surface_pt = gom.script.primitive.create_surface_point ( name_expression='Point_from_label', point={'interpolated': True, 'normal': gom.Vec3d (nx, ny, nz), 'point': gom.Vec3d (x,y,z), 'target': gom_part}) ##make sure its attached to cad surface gom.script.cad.adapt_elements_to_cad ( elements=[nominal_surface_pt], normal_from_cad=True, position_from_cad=True) ##mp MCAD_ELEMENT=gom.script.inspection.measure_by_intersection_with_mesh ( elements=[nominal_surface_pt]) #check MCAD_ELEMENT=gom.script.inspection.inspect_dimension ( csys=gom.app.project.nominal_elements['system_global_coordinate_system'], elements=[nominal_surface_pt], nominal_value=0.0, nominal_value_source='fixed_value', type='normal') Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in