Centcir

I'm using CENTCIR to find the location of the pin within my contour. I can find the center of the circle, but how can I evaluate the distance to the end of the pin?

Attached is a print snippet. How can I evaluate the 2.7753 and 1.5175 dimensions?





Parents
  • Hello
    I make another attempt to explain.

    I explain in XY plane

    First you calculate the distance to the center of the centering circle.
    Make sure that the distance in Z betveen the axis and profil i close to zero, otherwise you have to prjekt the points (PRJPTS)

    DIPNTAXI (NAM=DIS(1), CSY=CSY(1), EL1=CENT, EL2=AXI(1), CPY=DEF$DIS1)
    DIPNTAXI (NAM=DIS(2), CSY=CSY(1), EL1=CENT, EL2=AXI(2), CPY=DEF$DIS1)

    Get the result as an real value. It´s the A value från the element and it´s the same as DXYZ value from the evaluation above.

    GETVAL (NAM=XY_DIS(1), OBJ=DIS(1), DSC=A, TYP=ELE)
    GETVAL (NAM=XY_DIS(2), OBJ=DIS(2), DSC=A, TYP=ELE)

    Take this values and add the radius for the centering cicle.

    XY_DIS_RAD(1)=XY_DIS(1)+(0.35/2)
    XY_DIS_RAD(2)=XY_DIS(2)+(0.35/2)

    Define an element to put the calculated value in. That needs to be done only one time.

    DFNELE (NAM=DIS(3), TYP=POI, CSY=CSY(1))

    Put in the values that has been calculated as X and Y coordinates

    PUTVAL (OBJ=DIS(3), DSC=X, TYP=ELE, VAL=XY_DIS_RAD(1))
    PUTVAL (OBJ=DIS(3), DSC=Y, TYP=ELE, VAL=XY_DIS_RAD(2))

    Evaluate the result in X and Y

    AddEva (NAM=DIS(3), EDT=N)​





    Now THAT is what I was looking for. Actually, the previous example will also be very useful. I have several variations of that profile with different pin diameters that I need to write programs for. Thank you for taking the time with a detailed solution !
Reply
  • Hello
    I make another attempt to explain.

    I explain in XY plane

    First you calculate the distance to the center of the centering circle.
    Make sure that the distance in Z betveen the axis and profil i close to zero, otherwise you have to prjekt the points (PRJPTS)

    DIPNTAXI (NAM=DIS(1), CSY=CSY(1), EL1=CENT, EL2=AXI(1), CPY=DEF$DIS1)
    DIPNTAXI (NAM=DIS(2), CSY=CSY(1), EL1=CENT, EL2=AXI(2), CPY=DEF$DIS1)

    Get the result as an real value. It´s the A value från the element and it´s the same as DXYZ value from the evaluation above.

    GETVAL (NAM=XY_DIS(1), OBJ=DIS(1), DSC=A, TYP=ELE)
    GETVAL (NAM=XY_DIS(2), OBJ=DIS(2), DSC=A, TYP=ELE)

    Take this values and add the radius for the centering cicle.

    XY_DIS_RAD(1)=XY_DIS(1)+(0.35/2)
    XY_DIS_RAD(2)=XY_DIS(2)+(0.35/2)

    Define an element to put the calculated value in. That needs to be done only one time.

    DFNELE (NAM=DIS(3), TYP=POI, CSY=CSY(1))

    Put in the values that has been calculated as X and Y coordinates

    PUTVAL (OBJ=DIS(3), DSC=X, TYP=ELE, VAL=XY_DIS_RAD(1))
    PUTVAL (OBJ=DIS(3), DSC=Y, TYP=ELE, VAL=XY_DIS_RAD(2))

    Evaluate the result in X and Y

    AddEva (NAM=DIS(3), EDT=N)​





    Now THAT is what I was looking for. Actually, the previous example will also be very useful. I have several variations of that profile with different pin diameters that I need to write programs for. Thank you for taking the time with a detailed solution !
Children
No Data