[ma...] Posted October 1 Share Posted October 1 (edited) gom.script.sys.edit_creation_parameters (element=gom.app.project.alignments['Prealignment']) gom.script.sys.edit_creation_parameters ( actual_point_1={'interpolated': True, 'normal': gom.Vec3d (0.3390497863, 0.9389895797, -0.05782522634), 'point': gom.Vec3d (16.2586519, -1.642760776, 6.281157939), 'target': gom.app.project.parts['Part'].actual}, element=gom.app.project.alignments['Prealignment'], nominal_point_1={'interpolated': True, 'normal': gom.Vec3d (-1.0, 0.0, 0.0), 'point': gom.Vec3d (-0.8499999983, -0.01679463386, -0.3046244892), 'target': gom.app.project.parts['Part'].nominal}) gom.script.manage_alignment.set_alignment_active (cad_alignment=gom.app.project.alignments['Prealignment']) I'd like to change the point (which is in red at the top here) in my script. Because the scans are not always in the same place when they are loaded into the gom inspect software. The question is how can I change this. Now I can't do this Edited October 1 Link to comment Share on other sites More sharing options...
[De...] Posted October 2 Share Posted October 2 Hi Marc, Not sure if this will help or not, but have you explored using a nominal and actual point for the pre-alignment help point? Then maybe just change the actual point through your script somehow? Without more context its hard to recommend the best approach, but hope this helps. Link to comment Share on other sites More sharing options...
[De...] Posted October 2 Share Posted October 2 sorry after re-reading your post, it seems like this is what you are doing, but just trying to edit the actual point through your script? How do you plan to create this actual point through your script? Please add more context so we can help! Link to comment Share on other sites More sharing options...
[Ja...] Posted October 2 Share Posted October 2 i would be looking for solutions where this help point is not required . Working in this way kind of negates the architecture of parametrics and having the stable alignment structure in the project template rather than creating on the fly. Im assuming rotational.symmetry or large discrepencies between actual and nominal , but there will likely be a better solution than coding to acheive your end goal. As stated , more context , images etc will help understand . Link to comment Share on other sites More sharing options...
[ma...] Posted October 3 Author Share Posted October 3 This is the CAD model The scan part if i do pre-alignment the part turns 180° it's not always correct. Bad pre-alignment Good pre-alignment The problem is that no scan is on the same place. I do this with scripting there are to many parts. If i do it with point next scan part is the point in the pre alignment not correct so he must first turn 180 degrees . Link to comment Share on other sites More sharing options...
[Ja...] Posted October 3 Share Posted October 3 Few ideas 1. What happens if you change the search to 'long' ? Is this more stable in finding correct orientation ? 2. If you split out the central feature that has more unique geometry into a seperate part , try to pre align to this ( can target another part ) 3. Similar to 2 but after making a correction to alignment of any mesh , take a copy , import as a nominal model and align to this. Maybe cutting out the central piece might work out better Failing this id look into methods to control the start point of the scan , for example via a reference frame . There are combinations with the methods above where reference point cloud can be used to control an orientation at the scanning stage . Link to comment Share on other sites More sharing options...
[ma...] Posted October 4 Author Share Posted October 4 1 2 3 doesn't work Failing this id look into methods to control the start point of the scan , for example via a reference frame . There are combinations with the methods above where reference point cloud can be used to control an orientation at the scanning stage . How do you do this? Link to comment Share on other sites More sharing options...
[Na...] Posted October 7 Share Posted October 7 Hello, here is a techguide article for the alignment with reference points: ZEISS Quality Tech Guide Another idea could be the cutout at the Z+ end of the part, which could be used for an alignment by geometry elements though. A nominal surface point (intersection with mesh) at this position will intersect the mesh no matter if the part is "flipped" 180° or not. An alignment with a cylinder with Z-axis, plane with Z normal and the point as third element should align the cutout correctly. It will not be 100% perfect but you can use this alignment as a starting point. (The actual surface point should have alignment required active) Link to comment Share on other sites More sharing options...
[Ja...] Posted October 10 Share Posted October 10 (edited) Nice idea nanno, but i think part of the issue here is that there is no stable start alignment in which to pick up these geometries from in order to lock to the target. Here is an off the wall idea involving code building on this concept .... Create the geometries as suggested and make a prealignment . Create an alignment using plane described and cylinder that will be picked up and any surface point random point In code evaluate the dn of the value in the pocket. If greater than a certain value , say half the height of the pocket it would be reasonable to assume the part is 180 degrees out of rotation . Create a further alignment flipped by 180, locking to the cylinder axis Mesh can be exported , then brought into project template with starting alignment as original alignment , then jump directly to the geometrical alignment described. A bit long winded and unconventional but maybe might give you some possibilities! Edited October 10 Link to comment Share on other sites More sharing options...
[Ti...] Posted October 13 Share Posted October 13 (edited) I would use target surfaces. From my experience less is more, and sometimes I've spent 10 hours on finding the correct surfaces to click as a target surface. Below you can see I am selecting a unique key cutter on one cylinder so they don't get confused and a nice large plane to level on. One you create the nominal surface, you apply a 'no measuring principle' to it. Here is the secret sauce, there is a bug in the software. If you have a mesh loaded in your program and try to create a 'prealignment' then inside the prealignment select the 'target element' checkbox and use this surface you created the program will error out and not let the part align. The workaround for this bug is to delete the mesh and do this prealignment without a mesh. Then you will get a yellow error message but it will allow you to create the prealignment...then you bring in your mesh and it will work. I suggest using long for these most of the time, but play with short, medium and long, and play with the surfaces you think are unique and at least one robust surface. Edited October 13 Link to comment Share on other sites More sharing options...
[De...] Posted October 16 Share Posted October 16 Assuming you always scan the part in a similar way: Throw some targets down on the plate you use to scan the part. Make a rough outline of the part w a pencil Scan & manually align the part with the help point so it aligns correctly. export the reference points that you placed on the table as a refxml. import those back into the project as a nominal pt cloud / component. replace the initial alignment with a best fit by reference pt alignment from here you have a few options subsequent local best fit with large search radius create help point using touch pt disc & large offset & radius use that as the help pt for your prealignment. etc save as template just make sure to scan the part in the same starting position & orientation with respect to those dots you placed on the table. (eg. #2) hope it helps. 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