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 can't find a good solution without looping Disappointed !


    Neither can I. It's easy to get an array of the points, and to project them.

    I think two sets of projections are needed, so we can calculate a tangent plane without any interference from the original hits. At least that's the only way that seems to give consistent results irrespective of the pattern of hits (and deviations).

    V1 contains all hits projected to the workplane, in V2 are the same hits but 10 mm higher in Z):

                ASSIGN/V1=PLN4.HIT[1..PLN4.NUMHITS].XYZ*MPOINT(1, 1, 0)
                ASSIGN/V2=V1+MPOINT(0, 0, 10)
    


    but I can not find a way to use V1 and V2 in feature (or set) construction, even though the Help actually mentions something that sounds like it:


    For Best Fit (BF) or Best Fit Recompensate (BFRE) constructions, while you can use any feature type for your input features, BF and BFRE fit types are typically used with point features or point sets (a scan of points, a feature set with points, or an expression that resolves to an array of points).


    I'd like to write something like:

    PLN3       =FEAT/PLANE,CARTESIAN,OUTLINE,NO
                THEO/<-109,0,5>,<0,1,0>
                ACTL/<-109,1,5>,<0,1,0>
                CONSTR/PLANE,TANGENT[COLOR=#0000FF], [/COLOR][COLOR=#FF0000]V1, V2,,[/COLOR]
                MATH_TYPE/CONSTRAINED_MINMAX,BF
    


    but it either gets red, gives no result, or crashes PC-DMIS...

    Leaving me with a loop and generic array, just like you, and this is much too slow if I try it on a scanned plane.

    Edit: It's probably better if all vote for https://hexagonmi.userecho.com/communities/1/topics/23-drf-feature-construction-options-relative-to-other-featuresdatums so we get things like this for real...


Reply
  • I can't find a good solution without looping Disappointed !


    Neither can I. It's easy to get an array of the points, and to project them.

    I think two sets of projections are needed, so we can calculate a tangent plane without any interference from the original hits. At least that's the only way that seems to give consistent results irrespective of the pattern of hits (and deviations).

    V1 contains all hits projected to the workplane, in V2 are the same hits but 10 mm higher in Z):

                ASSIGN/V1=PLN4.HIT[1..PLN4.NUMHITS].XYZ*MPOINT(1, 1, 0)
                ASSIGN/V2=V1+MPOINT(0, 0, 10)
    


    but I can not find a way to use V1 and V2 in feature (or set) construction, even though the Help actually mentions something that sounds like it:


    For Best Fit (BF) or Best Fit Recompensate (BFRE) constructions, while you can use any feature type for your input features, BF and BFRE fit types are typically used with point features or point sets (a scan of points, a feature set with points, or an expression that resolves to an array of points).


    I'd like to write something like:

    PLN3       =FEAT/PLANE,CARTESIAN,OUTLINE,NO
                THEO/<-109,0,5>,<0,1,0>
                ACTL/<-109,1,5>,<0,1,0>
                CONSTR/PLANE,TANGENT[COLOR=#0000FF], [/COLOR][COLOR=#FF0000]V1, V2,,[/COLOR]
                MATH_TYPE/CONSTRAINED_MINMAX,BF
    


    but it either gets red, gives no result, or crashes PC-DMIS...

    Leaving me with a loop and generic array, just like you, and this is much too slow if I try it on a scanned plane.

    Edit: It's probably better if all vote for https://hexagonmi.userecho.com/communities/1/topics/23-drf-feature-construction-options-relative-to-other-featuresdatums so we get things like this for real...


Children
No Data