hexagon logo

Does anyone know an easy way to project all the points in a group to a plane?

I have a group of points (a plane for example) and I want to project them all to a plane (simplest case == WORKPLANE). Is there some smart way to do it all at once (a.k.a. "the JEFMAN way") or is it only possible with a loop? I haven't found anything yet...

The object of this is to create a secondary tangent plane perpendicular to the primary by the following method:

- measure the secondary plane
- project all points up/down to the primary (WORKPLANE)
- construct a tangent plane from the original plane points + the projected points (guaranteed to be perpendicular to the primary as that is our projection direction)

As a follow-up question: How can I use an ARRAY variable in the same way as .HIT[...] in the construction of a tangent plane?
Parents
  • I'm beginning to suspect one actually has to do all the steps the Help describes for Tangent Plane - we have been ignoring Void filtering (Convex Hull) so far, maybe that's why results sometimes get strange. I've written a simple Convex Hull calculation (in plain PC-DMIS code, thus slow) to reduce the number of points of interest. Will test the combination when time permits (probably Friday afternoon).


    I played a little with your code, I just add a loop at the start (*100) and look when there's a value of Y <0.
    I saw that there was more than 25% of errors !!!!
    In the loop, I also add a file/write in an if statement (when there's a value <0) where I write the number of the loop, the y value and both points with the min value. It was always points 1 and 2 ! ???
    I change the minimax to L2 constraint, and get less errors.
    I add a report comment after each random, and get once zero error, and once 1%.

    It's one of the pc-dmis problems, sometimes, the prog works too fast, and the values are not updated as they should...

    I will continue ASAP Wink
  • Could be the synthetic testdata: Points 1 and 2 are on the same X, different Z, only Y has random - when you generate the V7 point they will all be on a straight line above each other, no good plane. Found this when I ran with random turned off. But off course, this can also happen with real hits, although not very probable. But the plane may be very sensitive to variations if the points are close.
Reply
  • Could be the synthetic testdata: Points 1 and 2 are on the same X, different Z, only Y has random - when you generate the V7 point they will all be on a straight line above each other, no good plane. Found this when I ran with random turned off. But off course, this can also happen with real hits, although not very probable. But the plane may be very sensitive to variations if the points are close.
Children
No Data