Your Products have been synced, click here to refresh
ASSIGN/V9=(PRF1.HIT[2..PRF1.NUMHITS].X*PRF1.HIT[1..(PRF1.NUMHITS-1)].Y) ASSIGN/V10=(PRF1.HIT[1..(PRF1.NUMHITS-1)].X*PRF1.HIT[2..PRF1.NUMHITS].Y) ASSIGN/V11=ABS(SUM(V10-V9)/2) ASSIGN/V19=(PRF2.HIT[2..PRF2.NUMHITS].X*PRF2.HIT[1..(PRF2.NUMHITS-1)].Y) ASSIGN/V110=(PRF2.HIT[1..(PRF2.NUMHITS-1)].X*PRF2.HIT[2..PRF2.NUMHITS].Y) ASSIGN/V111=ABS(SUM(-V110+V19)/2) ASSIGN/V119=(PRF3.HIT[2..PRF3.NUMHITS].X*PRF3.HIT[1..(PRF3.NUMHITS-1)].Y) ASSIGN/V1110=(PRF3.HIT[1..(PRF3.NUMHITS-1)].X*PRF3.HIT[2..PRF3.NUMHITS].Y) ASSIGN/V1111=ABS(SUM(-V1110+V119)/2) ASSIGN/AREA=V11-V111-V1111
Would it be possible (maybe even slightly easier) to adapt the Shoelace Formula ( https://en.wikipedia.org/wiki/Shoelace_formula) to this?
PNT_A1 =FEAT/POINT,CARTESIAN,NO THEO/<4,10,0>,<0,0,1> ACTL/<4,10,0>,<0,0,1> CONSTR/POINT,CAST,PNT_A SCN1 =FEAT/SET,CARTESIAN THEO/<6,6.2,0>,<0,0,1> ACTL/<6,6.2,0>,<0,0,1> CONSTR/SET,BASIC,PNT_A,PNT_B,PNT_C,PNT_D,PNT_A1,, ASSIGN/N=SCN1.NUMHITS-1 ASSIGN/VX=SCN1.HIT[1..SCN1.NUMHITS].X ASSIGN/VY=SCN1.HIT[1..SCN1.NUMHITS].Y ASSIGN/AREA=0 ASSIGN/I=1 WHILE/I<=N ASSIGN/XY=VX[I]*VY[I+1] ASSIGN/YX=VY[I]*VX[I+1] ASSIGN/AREA=AREA+(XY-YX) ASSIGN/I=I+1 END_WHILE/ ASSIGN/AREA=ABS(AREA/2) COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, "area = "+AREA
ASSIGN/AREA=0 I =LOOP/START,ID=NO,NUMBER=N,START=1,SKIP=, OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0 ASSIGN/AREA=AREA+(SCN1.HIT[I].X*SCN1.HIT[I+1].Y-SCN1.HIT[I].Y*SCN1.HIT[I+1].X) LOOP/END ASSIGN/AREA=ABS(AREA/2) COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, AREA
CONSTR/SET,BASIC,PNT_A,PNT_B,PNT_C,PNT_D,PNT_A1,, ASSIGN/N=SCN1.NUMHITS-1 ASSIGN/AR=SCN1.HIT[1..N].X*SCN1.HIT[2..N+1].Y-SCN1.HIT[1..N].Y*SCN1.HIT[2..N+1].X ASSIGN/AR[N+1]=0 ASSIGN/AREA=ABS(SUM(AR))/2 COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, AREA
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |