[An...] Posted July 5 Share Posted July 5 Hallo allerseits, kann man in Inspect über die Patches eines Bauteils iterieren? Kann man dann innerhalb dieser Schleife informationen über das aktuelle Patch abfragen (Flächeninhalt, Krümmung usw.).? Danke für die Hilfe! Hello everyone, is it possible to iterate over the patches of a part in Inspect? Is it then possible to query information about the current patch (area, curvature, etc.) within this loop? Thanks for the help! Link to comment Share on other sites More sharing options...
[An...] Posted September 25 Author Share Posted September 25 (edited) Es macht keinen Sinn, etwas in diesem Forum zu posten mit der Bitte um Beantwortung (letztendlich durch die Firma ZEISS) und mit dem Zweck, dass auch andere Anwender von einer Antwort profitieren können, wenn auch nach Wochen nichts beantwortet wird. Und selbst der Hinweis an den ZEISS Support auf unbeantwortete Posts scheint nichts daran zu ändern. Schade. Die GOM GmbH war in diesem Sinne ein Schnellboot, ZEISS scheint ein Tanker zu sein. Nein, ich muss mich korrigieren, eher schon ein U-Boot. ---------------------- It makes no sense to post something in this forum with the request for an answer (ultimately from ZEISS) and with the purpose that other users can also benefit from an answer, if nothing is answered even after weeks. And even the reference to ZEISS support to unanswered posts does not seem to change anything. What a pity. GOM GmbH was a speedboat in this sense, ZEISS seems to be a tanker. No, I have to correct myself, more like a submarine. Edited September 25 Link to comment Share on other sites More sharing options...
[Ma...] Posted September 26 Share Posted September 26 Dear Mr. Gallasch, you can iterate over the patches of a CAD body: import gom print(gom.app.project.nominal_elements['zeiss_training_object_scaled'].file['zeiss_training_object_scaled'].bodies['GRUNDPLATTE_PMI/GRUNDPLATTE_PMI'].num_patches) print(gom.app.project.nominal_elements['zeiss_training_object_scaled'].file['zeiss_training_object_scaled'].bodies['GRUNDPLATTE_PMI/GRUNDPLATTE_PMI'].patch[0].name) print(gom.app.project.nominal_elements['zeiss_training_object_scaled'].file['zeiss_training_object_scaled'].bodies['GRUNDPLATTE_PMI/GRUNDPLATTE_PMI'].patch[0].color) cad_body = gom.app.project.nominal_elements['zeiss_training_object_scaled'].file['zeiss_training_object_scaled'].bodies['GRUNDPLATTE_PMI/GRUNDPLATTE_PMI'] for index in range(cad_body.num_patches): point = cad_body.patch[index].single_point gom.script.selection3d.select_patch ( coordinate=point, target=gom.app.project.parts['Training Object'].nominal) # Delay to make current selection visible gom.script.sys.delay_script (time=0.1) gom.script.selection3d.deselect_patch ( coordinate=point, target=gom.app.project.parts['Training Object'].nominal) The number of available patch properties is rather limited, but it is possible to retrieve more information (like the area) by converting a patch to a surface element (Construct-> Surface-> Patch Compound from CAD...; this command can also be recorded to a script). Best regards, Matthias Prinke 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