[Mi...] Posted July 11 Share Posted July 11 Hi all, we are running a lot of sheetmetal parts in ScanBox-KIOSK and are mainly focusing on the surfaces (+alignment-holes) to keep the measuring time as short as possible. If we would teach for all holes, the time would be significantly longer and sometimes it's impossible to compute some holes if some properties of the part change slightly. We don't need to check the holes position or diameter in this cases but it would be realy helpful to check if there "is" a hole or "is not" a hole. For this evaluation it wouldn't be necessary to use a lot of scans as no edges are needed. I already tried to create surface points at the middle of a hole to cut with the mesh, so if it's calculated, something should be wrong, if it's not calculated everything's fine. But the result is unsteady, as it is possible that there is some mesh left of the background (fixture f.e.) It should be a super simple inspection, as usually no additional scans are necessary, but i don't find the right measuring principle to do it. Anyone who already had the same problem or any ideas how to check this? I'm looking forward to any food for thought. Best Regards Michael Link to comment Share on other sites More sharing options...
[Na...] Posted July 11 Share Posted July 11 Hello, maybe constructing a silhouette and circles + measuring principle fitting element works for this. This would only require the surface data. You could also uncheck the box "consider element" in the element's properties -> Teaching Settings, so no positions will be created for this element. If the rest of the measurement positions are sufficient depends on the part and data of course. Contacting the support with the concrete project is of course also an option 🙂 There is a keyword for the computation status for the next step available. Nanno Link to comment Share on other sites More sharing options...
[Mi...] Posted July 19 Author Share Posted July 19 Hi Nanno, thx a lot for your hints. I didn't work with silhouettes before, but this could be a good solution. I used to create a circle on my CAD element at the beginning as a basic element, select a sphere +2mm arround the basic element to create the silhouette with referenced measuring principle and in the end another fitting circle with referenced principle. This seems to work greate if there is no edge <1mm next to the hole. I tried with a few parts without any errors or wrong results untill now. Maybe i need to check the "only outer silhouett" box to avoid errors if there is any surface on the backside. The result will be a flag with a red or green dot: format(((computation_status.status)=='computed')?("██") : "",color='#00ff00') format(((computation_status.status)=="not_computed")?("██ Loch überprüfen") : "",color='#FF0000') format(((computation_status.status)=="partly_not_computed")?("██ Loch überprüfen") : "",color='#FF0000') This priciple can also be useful to check inner threads, as i always do have problems with correct results when using intersection point cylinder/plane measuring principle. For anyone who wants to try or optimize, i made a "check holes"- script for easier/faster usage (it's not perfect and finished at all, but seems to work): # -*- coding: utf-8 -*- # Skript zum Prüfen von Löchern auf vorhandensein (nur Oberflächenerfassung) - Ergebnis: Vorhanden (grün) / nicht Vorhanden (rot) # Position + Durchmesser abhängig von der Erfassung ungenau/falsch! import gom #Elementeigenschaften abfragen und Element interaktiv konstruieren DIALOG=gom.script.sys.create_user_defined_dialog (dialog={ "content": [ [ { "columns": 2, "name": "label", "rows": 1, "text": { "id": "", "text": "Elementtyp und -name festlegen", "translatable": True }, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "label", "word_wrap": False }, { } ], [ { "columns": 1, "name": "label_1", "rows": 1, "text": { "id": "", "text": "Typ", "translatable": True }, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "label", "word_wrap": False }, { "columns": 1, "default": "Loch", "items": [ { "id": "", "text": "Loch", "translatable": True }, { "id": "", "text": "Langloch", "translatable": True }, { "id": "", "text": "Formloch", "translatable": True } ], "name": "list", "rows": 1, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "input::list" } ], [ { "columns": 1, "name": "label_2", "rows": 1, "text": { "id": "", "text": "Name", "translatable": True }, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "label", "word_wrap": False }, { "basename": { "id": "", "text": "P", "translatable": True }, "columns": 1, "mode": "manually", "name": "elementname", "numbering": True, "read_only": False, "rows": 1, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "input::elementname" } ] ], "control": { "id": "OkCancel" }, "embedding": "always_toplevel", "position": "automatic", "size": { "height": 172, "width": 220 }, "sizemode": "automatic", "style": "", "title": { "id": "", "text": "Elementname festlegen", "translatable": True } }) def dialog_event_handler (widget): pass DIALOG.handler = dialog_event_handler RESULT=gom.script.sys.show_user_defined_dialog (dialog=DIALOG) print (RESULT.list) print (RESULT.elementname) elementname = RESULT.elementname gom.script.selection3d.deselect_all () if RESULT.list == 'Loch': MCAD_ELEMENT=gom.interactive.primitive.create_auto_nominal_circle ( name=elementname, properties=gom.Binary ('eAHEmF1sW2cZx38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WunRYqntG2eNnEsc+VTmMc3jKkvW7ZrIVGx9pkYN5Yiliz4FL954ytMvikhPtxlLOEuAS8MCkjY/3HXYYRzUaRM7tMyYamR6g/vSPZPj8eoVrotqjnY6t23rR09YWDZG3Y5KtO5RoCZdIskidgia65G2GHH446zYtipWMn0z/vaaYxwrl1psOzf7u25efP7JaXol6bm3oZP7c/924zPf9rhJvNQZdhneUFOdEU+mvxRljQbA45C6rhGdhBRuk30t5K9b69f2994+rxc87VjerY9cFzu6Xjuu23flnqyOEarxg6oP4O+NHZlgTr3HGb9aascj/0CYdl4eMEPDUlMaJzH4C66H60y1O+Ezb3WzvB+Omwnj5NALmimneoEhEvTTnFTPUhmOw1jtJy7ERxMiv0RTRKjubsrqadUqTDVpWDb7ck2Mcumg2OGroDUY3vjUqMrx/PsVRZ7nfGkLPVMcD2PRlJa2bwb3/Ykmm+ySJh+gkqglARP6VY6bu8tSWRw+6EGhMpalCxc7iKLm3MVJgo3zUbHE4/f1XiO4D3GSvQ09/9wvvfBox2/RcAAP//AwAhf49ZAZvK')) if RESULT.list == 'Langloch': MCAD_ELEMENT=gom.interactive.primitive.create_auto_nominal_slotted_hole ( name=elementname, properties=gom.Binary ('eAHEmF1sW2cZx3+ZupGVpV1GGWuFwEoDC9ucr6Zp6nY0dM3WjrREbZZNFcw49kni1bFd20mawZjLkAYIVO2CDbhhEmNcVCrqBRpfEuUCCaGpuwKmoV0gkECiiGkXDCGtRf/nPW/OceKknlBFojjvOec9z/fzf/6vJ0vzyandvWc4PPapQ2PHmaxk8rVqKjVWCOaDYm2iUioHlVo+qOJ+2riVjs1spoPNHcDPyy/MzAEnx46cOJE4cuzExNgDk4nB/sFdiRNBZTGfDRITmewpLp9vZ5e9/15+2j4OTD9++Xwbg8CHoB5QIGCeNAtUCUgzQ4kKafIUqVImIEuNPCWKdP798vmbuA3YBPVpSpQo8PgFSTRT6u1aHgISUC+QYRqpSFMzNWV0T+s0ZTJkOUWGWbuuEDBDYP+LZAl4vlfq7g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Z7nvGkLPVMcD2PRlJa2bwqz9uyTTfZJEwfQUVQaiIn1Ks9F3ZsbFI6u3/BQAA//8DAKygeWMBX+4=')) if RESULT.list == 'Formloch': RESULT=gom.script.sys.execute_user_defined_dialog (dialog={ "content": [ [ { "columns": 1, "default_font_family": "", "default_font_size": 0, "name": "text", "rows": 1, "text": { "id": "", "text": "<html><p>Skriptfunktion unterstützt aktuell noch keine Formlöcher.</p><p>Bitte manuell konstruieren oder wenn möglich als \"Kreis\" auswerten</p></html>", "translatable": True }, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "display::text", "wordwrap": False } ] ], "control": { "id": "OkCancel" }, "embedding": "always_toplevel", "position": "automatic", "size": { "height": 155, "width": 409 }, "sizemode": "automatic", "style": "", "title": { "id": "", "text": "Hinweis", "translatable": True } }) #Selektionsdurchmesser der Kugel festlegen + Silhouette erzeugen try: Durchmesser = gom.app.project.inspection[elementname].length Radius = Durchmesser/2 print (Radius) except: Durchmesser = gom.app.project.inspection[elementname].diameter Radius = Durchmesser/2 print (Radius) gom.script.inspection.measure_by_no_measuring_principle (elements=[gom.app.project.inspection[elementname]]) gom.script.selection3d.select_inside_sphere ( center=gom.app.project.inspection[elementname], radius=Radius+2) MCAD_ELEMENT=gom.script.section.create_silhouette_by_plane ( only_outer_curves=False, position=0.5, properties=gom.Binary ('eAHEmE1sXFcVx3+u0uKGuGmgFFohGDkG3KbjrziuO0lIcOMqCUmwGtepwscwH2/sweOZycw4jls1faELQEIqLCioG5D4EkQkyqqAkMgGCbFIV0BV1A0gEFIRqAuKkJqi/7nvet6MZ2xXKGIs23fePfd8n/85981WlpJz+4YucHT6E0emH2e2lik26qnUdClYCsqNmVqlGtQaxaCO+/RwJ33b2U4f2/uAr118obAAnJ0+dvp04tip0zPTj84mxkbG9iZOB7XzxVyQmMnkFrlxuZe9dv4dffqB7L03LvcwCdwPYYkMWQJKpMlRoUyZgBwNKtRIU6JoT9KsUCRPgwWeuuPG5dtIAHdB+Oi6U2fWKH/7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369/Q+aNgdaJ1CnjfGqUwc9VwUxWj2a85G3oJ8c+V13d+WFzGgPdDqC7vTmrSkVVpihQiDBB2qw6XjX+e6wfiEeyawhPAfRBWqRu7MQN3OUWNTkObRtfmmNocUcYWJcCnsy9ijauucYw+KeXf49LD3KHEAd4+dOm7H9P3QdB+i6tbA9yUdvLl/1XaAdCoHHOja2EepNS6/DqwMLkhVYOAgnPmWWngS97b+ymyfCGClvWQdeJB2anEV8HEbxO7zCMDoN02Dzj4nKdGxUKb56WkZJ8CPtICHY/ZWDJmMHJiLZ2myFgb0FOt27k1Y3TpVz4O0kQyel2M9AkX2p9oNPheN73d8OCvN85nL091itqc0ewlz7k94qZC19VJa5Xf1R//Jf/pP565/rerU3Onzl68/pMffb5QKOy5/sDQ8efi0os2ZKaNU2s5LZv9yR9Kui/0TUugOzvfFnxqLFOiQZ3n7tuSAEFCP4RbEaDiVcRdq1w1kNPovBjB879e25LIEYd0LYnlE6oa3QDSJsT3/zxv/HJj1j3hl+V9X/FNOPLu+dM3t8TgOLB7U93qLFKkan1b4fW3TYf8HpDqnPtdXOj6TqVMPtwTT5s47rrUafXDXw3lN02bTu3JsatSsUbqq+APb4qh95tHjs2qwBXh+k8vr1kchqLmst4c5ZCuy2oMVdKcp0jACrsWboUeqtydHfWIX3mff+tWyO7UQVwMdA1WsTax6M/lW6FBJwR3GtSj66MrtspvJN2PQHkrRFd435pVNJu4+89D+8ON45uNMN1FVpnmOD3/sGRsmrjdE0fvoPQGSio7A1QZAT/90pYY60XUDrNOWrkrgRBMGj5FwDNzYqMh7N0QHmmh8oPaWeuYW3ul5XG1mzxhp0wpRq9d4uOS+oN8pvwQwAxad+/uuwj8/Hu91nEpb+OD+kP74CQokArqFjvObCwiulR0nsi6i2hC4dMHNxYQ2eDD1ARwNztq8pam3z8sNj5V/SCkJHZvA6MxLqTnvwAAAP//AwCbXyl+Afpm'), reference_plane=gom.app.project.inspection[elementname]) gom.script.inspection.inspect_by_referenced_construction (elements=[gom.app.project.inspection[elementname+' +0.50 mm']]) gom.script.selection3d.deselect_all () gom.script.cad.show_element_exclusively (elements=[gom.app.project.inspection[elementname+' +0.50 mm']]) gom.script.selection3d.select_all () # neues Element aus Silhouette erzeugen + Ergebnis anzeigen if RESULT.list == 'Loch': MCAD_ELEMENT=gom.script.primitive.create_auto_nominal_circle ( name=elementname+'_', properties=gom.Binary ('eAHEmG2IXFcZx39b05rGpHFrrG0QHTbRrG1n37LZbCaJWdNsSeomrsk2LUEdZmfu7k533jIzu5ut1k7aQqsopR+0pV8qaOuHQCQfpCqCERRUSoof1FIpKAoKRiwFrQhN5P+ce/be2Z3dTJHghsyce++5z/vzf/5nJsrF5MldPWc4PPqpQ6PHmahm8vVaKjVaCIpBqT5eLVeCaj0f1HB/HdzMpg1sYBMbNgH/nH12agY4NXrkxInEkWMnxkfvmUgM9A3sTJwIqvP5bJAYz2RnuXRuPTvt/Xfz17EDmDx26VwHA8CHoBFQIKBImjlqBKSZokyVNHlK1KgQkKVOnjIlOv926dwNbATWQWOSMmUKfOG8JJopjfVaHgIS0CiQYRKpSFM3NRV0T+s0FTJkmSXDtF1XCZgisO8SWQK+2SN1dwNboDFNmSI9jDe9d3zFW4e/JhsOAHuBS+fW0Q+8NP/Cjz/9+tjl7z1/4Ss/+vfLB2+ERj899NHDMO+FxpEmh3lt+L5NEnQ7sKGFM2eoc/U/MvD9wE3QqFGnanGbpvs1vXvlRnjnBhr7mKFOkQKfROuADDlbFwmokyFB1iKs0OhzP13000WCEhnbpTunTX7WpAXIgi6TIs2LlsmErZQ17fe7eslSo2a7K9xNggJ5EnyRBAvMkLedScu3khKQIkHFUpFkgSoZKuwlwSPsozemT9p7mzxSVeRYJBHbJVtUV/JM8gLyTJsXKQbpo89kRzsif1KUrB6LZCiwN/RXEZsM/Z1k2mJXsH3StI2p2D/FUDZVyVlxaYeLrPwsUDCfc+TCzOl5X9NzH5XoeTKUENmpt+JakjGbUmwjS9/Sf/navDeSk6JmvuTJ2T75XWXadCepU6Z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6Ji8AfPjvQGHmi+5ePxbXnjWOmTVJzSbszYPK70u6bbdUyHALuMLRdTZwfKL405ihQp8bjd7SlQG3Z1aYCNZAyrs8siwhoxJxnQ4j81xttqexzaNNUWL6gKoao06RNiR//Od76ydqiw3HpezAalz48f3q2LQH3AduuaVuNWfJUjHQqvf6w6eioJxg1Tv82rnTltFA9j3TEyyaOfa50muPwF0Paa5bNSmh0rE0G5o2liDULLtV/ztga/V+ScD+OcpYQl4DnJmRkrP+43TCi1ShyZlco29D0CPX7tyXb58cjVBvdFvV8bLWeNyzfPeEgWRk2+apTuYZAhTTz5AlYoHPmetjhh6NO86JY6djJ9I97WmmMcG6V6fDVv17d8tPHd8tLUa/NLb2Mn9uffqeVnv81wq3moMuwzvKCnGgK/bl0PSxoNYecBbXwDOwgo/wraW+net88sLexdvX4OefqRnXs+uDp3dJxzfZbvSx15HCNVwodUH8H/ODJtgTr3LHRelNWuR/6hMOy8GECHjkpMaJz74OG6H60y1O+Uzb32zvB+Omwmj5NALmimneoEhEvTTnFTPUhmOw2jtJ27ERxMkv0RTRKjubsrqadUqTDVo1Db7Yl2Mcumg2OGroDUZ0XRyTG14/nWKos9ztjyNkaGGD7noyktTL4le+3ZZpvskiYfoKKIFTETylW+i5vbUvkoDuhxkSKGlTtHK6iSxszFSbKd80Gh9PPXJH4DcB7jBXo6a9/5v3vAEY6/wsAAP//AwBCwI4+Adjd')) if RESULT.list == 'Langloch': MCAD_ELEMENT=gom.script.primitive.create_auto_nominal_slotted_hole ( name=elementname+'_', properties=gom.Binary ('eAHEmF1sW2cZx3+ZupGVpV1GGWuFwEoDC9ucr6Zp6nY0dM3WjrREbZZNFcw49kni1bFd20mawZjLkAYIVO2CDbhhEmNcVCrqBRpfEuUCCaGpuwKmoV0gkECiiGkXDCGtRf/nPW/OceKknlBFojjvOec9z/fzf/6vJ0vzyandvWc4PPapQ2PHmaxk8rVqKjVWCOaDYm2iUioHlVo+qOJ+2riVjs1spoPNHcDPyy/MzAEnx46cOJ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+rxc87VjerY9cG5PdJx3fZbvyx15HCNVwwdUH8H/OTZlgTr3HGb9aascl/0CYdl4ZMEPDUlMaJz74e66H60y1O+kzb3WzvB+Omwnj5NALmimneoEhEvTTnFTPUhmOwxjtJy7ERxMiv0RTRKjubsrqadUqTDVpVDb7Uk2Mcumg2OGroDUY0fjEqMrx/PsVRZ7nvGkLPVMcD2PRlJa2bwqz9uyTTfZJEwfQUVQaiIn1Ks9F3ZsbFI6u3/BQAA//8DAKygeWMBX+4=')) MCAD_ELEMENT=gom.script.inspection.measure_by_fitting_element ( actual=gom.ActualReference (gom.app.project.inspection[elementname+' +0.50 mm']), elements=[gom.app.project.inspection[elementname+'_']], limit_selection_depending_on_geometry=False, max_normal_angle=0.0872664626, method='best_fit', properties=gom.Binary ('eAHsmm2IXGcVx3+xsW5j0xgbqw1Fh01qY9vZ7G626WaSmJgmJalJXbKbtATsMDv37u4kszOTmdlkU0k7UaEKlmpBq6VUQVs/BCJBpL6B+SKI1PSDqFXpB1EQsWDpByuCjfzPc5+9d152d9okFHQ3ZOfuvc89z3n5n5fnnBkrT6cP39U3y949n9i95yBj1VyhXstk9hTD6bBUH6mWK2G1XghruJ9lXMfKFaxgJStWAtcUn5qYAo7s2Tc6mtp3/+jInnvGUoP9g5tSo2H1RCEfpkZy+WNcPNvDJnv/rfws+ygw/tDFs8tIATdAI6RIyDRZCpSoU7XPGgXynHn+4tl3cRC4DRpjlJkmQ4b9hEwSUiJg0O7spsC03dGbZUrsa6OmdWNUyVGgzuxj4kL89AK6/hCwAhoFqlRxfJ0gZ3SO3nT4ca25HbgRGkVyjNuaLHXjv4Lu6TrLDDMUCPjdAfF/E3BdE/+HOMQ+AjI/Es0jwOGIh/3AemgMEDBAnmH66ScgzSDDTHA3aYbIE7CJNFvYxGYGSXMXmxlimJBhtjBAyBABIY/0P/sN0f0wsLKF7xOEVOf0ld8sXq8HlkND/EvuB8/r7eWRoXeu1l/ecgvp4PxGUXsfcC00anN2nWTDy6LxfuA90Bgx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A8f64qwar/rTTpx5b6AofgoDh8m5PRhkVGZ9V5o6Csi8Spfih2xfNxdFemj9nz7KTJLFGFelkgWRMo+0pnwofC1wWqHRXXnAedeF8w0TFfe8c7lgorayd///cIko2A75CrmDiSTZwmXDpKnjydvWZh8lDu9tVUs5eYKIbm+TBPzL1C5weXu17oi7K0dZxlXZPqu8XM7RcYj3ldrksN95SSq/hpY6G8vY53vaKrsKbrkfty+zKOrgNzprlj1ISpmtZM2XvzBwsRo9PwXAAD//wMAFlIOXgHTTw=='), restrict_actual_selection_to_nominal=False) try: gom.script.cad.show_element (elements=gom.ElementSelection (gom.app.project.inspection[elementname+'_'], {'category': ['key', 'elements', 'part', gom.app.project.parts[0], 'explorer_category', 'nominal_part']})) gom.script.cad.show_element (elements=gom.ElementSelection (gom.app.project.inspection[elementname+'_'], {'category': ['key', 'elements', 'part', gom.app.project.parts[1], 'explorer_category', 'nominal_part']})) gom.script.cad.show_element (elements=gom.ElementSelection (gom.app.project.inspection[elementname+'_'], {'category': ['key', 'elements', 'part', gom.app.project.parts[2], 'explorer_category', 'nominal_part']})) gom.script.cad.show_element (elements=gom.ElementSelection (gom.app.project.inspection[elementname+'_'], {'category': ['key', 'elements', 'part', gom.app.project.parts[3], 'explorer_category', 'nominal_part']})) gom.script.cad.show_element (elements=gom.ElementSelection (gom.app.project.inspection[elementname+'_'], {'category': ['key', 'elements', 'part', gom.app.project.parts[4], 'explorer_category', 'nominal_part']})) gom.script.cad.show_element (elements=gom.ElementSelection (gom.app.project.inspection[elementname+'_'], {'category': ['key', 'elements', 'part', gom.app.project.parts[5], 'explorer_category', 'nominal_part']})) gom.script.cad.show_element (elements=gom.ElementSelection (gom.app.project.inspection[elementname+'_'], {'category': ['key', 'elements', 'part', gom.app.project.parts[6], 'explorer_category', 'nominal_part']})) except: pass gom.script.sys.edit_properties ( data=[gom.app.project.inspection[elementname+'_']], label_show=True, label_template='Vorhandensein') #Fähnchenvorlage: # #format(((computation_status.status)=='computed')?("██") : "",color='#00ff00') #format(((computation_status.status)=="not_computed")?("██ Loch überprüfen") : "",color='#FF0000') #format(((computation_status.status)=="partly_not_computed")?("██ Loch überprüfen") : "",color='#FF0000') Grüße Michael Link to comment Share on other sites More sharing options...
[Mi...] Posted August 7 Author Share Posted August 7 I've changed the selection a little by deselecting behind plane after the 'selection via sphere' part to make sure there is no background selected, which could be used for creating an element even if there is no hole in the part (if the distance from part to the background is less than holes radius+offset) gom.script.selection3d.deselect_above_plane ( invert_normal=True, offset=-2.0, plane=gom.app.project.inspection[elementname]) 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