Two Highest Points on a Line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Two Highest Points on a Line

    I used an auto-line to measure a feature and want to construct a line from the two highest points. How do I go about doing this? If I'm not mistaken, PC-DMIS creates the line with an average of all the points it takes with the auto-line.

  • #2
    Try this:

    Code:
    ASSIGN/V1=MAXINDICES(LINE2.HIT[1..LINE2.NUMHITS].X)
                ASSIGN/V2=LINE2.HIT[V1[1]].XYZ
                ASSIGN/V3=LINE2.HIT[V1[2]].XYZ
    F1         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<V2.X,V2.Y,V2.Z>,$
                MEAS/XYZ,<V2.X,V2.Y,V2.Z>,$
                NOM/IJK,<1,0,0>,$
                MEAS/IJK,<1,0,0>
    F2         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<V3.X,V3.Y,V3.Z>,$
                MEAS/XYZ,<V3.X,V3.Y,V3.Z>,$
                NOM/IJK,<1,0,0>,$
                MEAS/IJK,<1,0,0>
    LINE4      =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
                THEO/<0.03,5.734,-0.596>,<0,1,0>
                ACTL/<0.03,5.734,-0.596>,<-0.0093185,0.9999566,0>
                CONSTR/LINE,BF,2D,F1,F2,,
                OUTLIER_REMOVAL/OFF,3
                FILTER/OFF,WAVELENGTH=0
    Last edited by bfire85; 04-29-2019, 06:29 PM.

    Comment


    • #3
      First of all, note that the two highest points of the line - in the current alignment - doesn't necessarily simulate a real (physical) tangent line, if that's what you actually need. In that case, if you have PC-DMIS 2019 R1 (or later), you should use the new Line construction method "Secondary Datum" to achieve this.
      tangent_line.png
      To find the two highest points relative to the *line*, you need to be aligned to the line.

      Note that the code from bfire85 assumes that X is your 'up', the direction you look for the highest point in. Change the .X, in the first ASSIGN, to .Y or .Z depending on your reality.
      Last edited by AndersI; 05-02-2019, 09:39 AM.
      AndersI
      SW support - Hexagon Metrology Nordic AB

      Comment

      Related Topics

      Collapse

      Working...
      X