Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a table of X,YZ Points for Inpection? 1

Status
Not open for further replies.

rlara

Mechanical
Jun 17, 2002
37
US

Hi all:

Im trying to create a table of X,Y,Z points in solidworks so we can inspect a surface.

Optimally im looking for some way of placing grid points on the surface, then creating a table of X,Y,Z coordinates so our inspection department can inspect from this table.

Ideas I have is to make a 3D sketch an place points on the surface. The problem is how to transfer that information in to table format.

Any other ideas?

Thanks

rlara
 
Replies continue below

Recommended for you

After placing the points on the surface, can you not glean their coordinates? Select the point and check the Parameters window in the Feature pane for respective coordinates.

Jeff Mowry
Reason trumps all. And awe trumps reason.
 
Theophilus:

First nice website, looks clean..

Well i could do that maybe put the model next to the CMM and have the inspector check each point as he goes. Or maybe copy/paste that into excel and print out a table. But that it self would be a lot of work.

Do you know of a way of retrieving the X,Y,Z data from the parameters window? maybe a macro that grabs the X,Y,Z info as a pick a point?

Thanks

rlara
 
I don't know if this helps:
thread559-137637


Chris
Systems Analyst, I.S.
SolidWorks 06 4.1/PDMWorks 06
AutoCAD 06
ctopher's home (updated 06-21-06)
 
Thanks for the compliment, rlara. "Clean" was certainly a goal in the redesign. (Now to find time to fill in the rest of the content. ..too busy working.)

What you're trying to do sounds like plenty of work to me. Macros aren't my sort of gig, but perhaps someone else here could chime in with something helpful, if Chris' post below doesn't help. Or perhaps try working with a macro of your own and see if you can get it to work. Otherwise, this process will be quite tedious if you have lots of points.

Jeff Mowry
Reason trumps all. And awe trumps reason.
 
Can you bring the SolidWorks model or a step, iges translation into your CMM software package? Have the CMM operators get their nominals from the math data.

PC/DMIS and Calypso can both import math data. The help files for both packages can give insight as to what math data types they can read.

Regards,

Anna Wood
SW06 SP4.1 x64, WinXP x64
Dell Precision 380, Pentium D940, 4 Gigs RAM, FX3450
 
Take a peek at thread559-155117. It may help you out a bit. Are you just looking for a standalone table, or do you need to have a drawing to be able to match the points up with the table values?
 
Anna:

Our CMM system is kind of outdated so there is no option for import of iges file.

Handleman:

Ran the macro and it works great although its still a lot a work as we are talking about 1760 points or so.

I think best option would be to have some one else laser scan the component and then compare the data to the cad model.

Thanks for all the comments.
 
Wow! 1760 points? Were you planning on placing each one individually with a 3D sketch?
 

Handleman:

Actually I was looking for a way to select several points and get the coordinates from them. The macro you sent seems like it would work well for small number of points but for this application it would take for ever.

The only thing ive done until now is made a Grid on the surface using split lines, so I have a .250 X .250 grid on a on a surface where I can pick intersection points and measure them.

rlara
 
This will export coordinates for all sketch points in a 3D sketch to an Excel file. To run it, select one point of the 3d sketch and then run the macro. I'm not sure of a good way to go from intersections of split lines to sketch points.

Code:
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Public Pfx As String
Dim myNote As SldWorks.Note
Dim SelMgr As SldWorks.SelectionMgr
Dim mySketchPoint As SldWorks.SketchPoint
Dim mySketch As SldWorks.Sketch
Dim AllSketchPoints As Variant
Const FMAT As String = "0.00"
Const SF As Double = 1000
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Const FirstRow As Long = 4
Const FirstCol As Long = 2
Dim CurRow As Long
Dim IDCol As Long
Dim Xcol As Long
Dim Ycol As Long
Dim Zcol As Long
Dim PtID As Variant
Dim i As Long

Sub main()

Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager

If (SelMgr.GetSelectedObjectType3(1, -1) <> 11) And (SelMgr.GetSelectedObjectType3(1, -1) <> 25) Then
    MsgBox "Select a sketch point of a 3D sketch and run macro again"
    Exit Sub
End If

Set mySketchPoint = SelMgr.GetSelectedObject6(1, -1)
Set mySketch = mySketchPoint.GetSketch
AllSketchPoints = mySketch.GetSketchPoints2

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets("Sheet1")

CurRow = FirstRow
IDCol = FirstCol
Xcol = FirstCol + 1
Ycol = FirstCol + 2
Zcol = FirstCol + 3
xlSheet.Cells(CurRow, IDCol).Value = "'Point ID"
xlSheet.Cells(CurRow, Xcol).Value = "'X Coord"
xlSheet.Cells(CurRow, Ycol).Value = "'Y Coord"
xlSheet.Cells(CurRow, Zcol).Value = "'Z Coord"
CurRow = CurRow + 1

For i = 0 To UBound(AllSketchPoints)
    PtID = AllSketchPoints(i).GetID
    xlSheet.Cells(CurRow, IDCol).Value = PtID(0) & "," & PtID(1)
    xlSheet.Cells(CurRow, Xcol).Value = Format(AllSketchPoints(i).X * SF, FMAT)
    xlSheet.Cells(CurRow, Ycol).Value = Format(AllSketchPoints(i).Y * SF, FMAT)
    xlSheet.Cells(CurRow, Zcol).Value = Format(AllSketchPoints(i).Z * SF, FMAT)
    CurRow = CurRow + 1
Next i


Part.ClearSelection
Part.WindowRedraw

End Sub
 
Also, I'm not too familiar with CMMs. Wouldn't it also take fivever (that's even longer than forever. Get it, 4ever, 5ever?) for the CMM operator to measure 1760 points? Our inspection dept. may be behind the times, but I'm pretty sure the guy would slit my throat in my sleep if I told him to inspect 1760 points.
 

Yes exactly Fivever for me to get a table and then for the inspector to punch in each number in to check it so I guess that would total sixever.

So knowing this i will have to convince my boss to try something new like a laser scan instead of having us do all this number typing.

If I can’t convince him then Ill post some good finger stretch exercises for jobs requiring large amounts of clicking.

Thanks Handleman for the macro ill try it out.




 
There is plenty of reverse engineering/inspection software to do this. But is seems like you want toi

To me it makes the most sense to tessalate your model to a very high tolerance. Save as .stl at the highest tolerance in the coordinate system of choice. Then convert this stl file to ascii xyz. Bingo, you have a huge xyz file of your model. Now just position your actual part in the same coordinate system as your saved model. Start taking points with your CMM. Collect tons of points. There are graphical tools, 3d spreadsheet tools, cad tools, polygon tools, RE tools, even tools in solidworks (point import macro, or get 2007) to do measurement and deviation analysis. Send me your CAD model and your CMM points and some money (joke) and I'll take the time to do it for you.

RFUS
 
Not a bad idea.. I was also thinking of puting it in my FEA software meshing the surface with a small size then getting the nodal data out, that should work similar to the stl option.

But it looks like we found someone to do the inspection let see how it comes out.

thanks

rlara
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top