Jump to content

Changing in automatic script point from pre alignment


---
 Share

Recommended Posts

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
Link to comment
Share on other sites

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. 
image.thumb.png.e7aafc216808f6c4e1f639a338c6c2f7.png

Link to comment
Share on other sites

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

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

This is the CAD model

image.png.6e81d4695c08e3d6ba301e7f5ba1923d.png

The scan part

image.png.d4904286cd41472bd37d2dd96b833375.png

if i do pre-alignment the part turns 180° it's not always correct.

Bad pre-alignment

image.png.863301465e83ec8fe37a6af2203bad1d.png

 

Good pre-alignment

image.png.98861787971ea8b1cabf2576a18c1dd7.png

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

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

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

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)

image.png.a0785cebca5ccbb0eefaff08adee3ef0.png

Link to comment
Share on other sites

 Share

×
×
  • Create New...