hexagon logo

Creating a point

As you can see from the attached marked up print, I need to measure the outside intersection point of two cylinders. Right now, I have it programmed to offset a line from the center of the cylinder to the outside of the cylinder by .5" which is the nominal radius of the tubing. The problem I run into with that method is that the dimensions apply after the part is powder coated, so the powder coating could make the radius of the part grow up to .575". So after the program is run, I go back and edit the constructed offset line by changing the offset distance to what the radius of the tube measures after the part is powder coated.

Is there an easier way to do this using code of some sort to offset the line by 1/2 of the diameter of the cylinder instead of using an exact number? That way if the cylinder grows the code will account for that in the program.

PS I am horrible at editing code, so if that is the best way please walk me through it step by step.

Greatly appreciated!

Attached Files
Parents
  • cir1 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,0,0>,<0,1,0>,10,0
    actl/<0,0,0>,<0,1,0>,10,0
    targ/<0,0,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt1 =feat/point,cartesian,no
    theo/<-5,0,0>,<0,0,1>
    actl/<-5,0,0>,<0,0,1>
    constr/point,offset,,-5,0,0
    ln1 =feat/line,cartesian,unbounded,no
    theo/<0,0,0>,<-1,0,0>
    actl/<0,0,0>,<-1,0,0>
    constr/line,bf,3d,cir1,pnt1,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt2 =feat/point,cartesian,no
    theo/<5,0,0>,<-1,0,0>
    actl/<5,0,0>,<-1,0,0>
    constr/point,pierce,cir1,ln1
    cir2 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,20,0>,<0,1,0>,10,0
    actl/<0,20,0>,<0,1,0>,10,0
    targ/<0,20,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt3 =feat/point,cartesian,no
    theo/<-5,20,0>,<0,1,0>
    actl/<-5,20,0>,<0,1,0>
    constr/point,offset,cir2,-5,0,0
    ln2 =feat/line,cartesian,unbounded,no
    theo/<0,20,0>,<-1,0,0>
    actl/<0,20,0>,<-1,0,0>
    constr/line,bf,3d,cir2,pnt3,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt4 =feat/point,cartesian,no
    theo/<5,20,0>,<-1,0,0>
    actl/<5,20,0>,<-1,0,0>
    constr/point,pierce,ln2,cir2
    ln3 =feat/line,cartesian,unbounded,no
    theo/<5,0,0>,<0,1,0>
    actl/<5,0,0>,<0,1,0>
    constr/line,bf,3d,pnt2,pnt4,,
    outlier_removal/off,3
    filter/off,wavelength=0
    align1 =alignment/start,recall:startup,list=yes
    alignment/trans_offset,yaxis,30
    alignment/rotate_offset,45,about,zplus
    alignment/end
    cir3 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,0,0>,<0,1,0>,10,0
    actl/<0,0,0>,<0,1,0>,10,0
    targ/<0,0,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt5 =feat/point,cartesian,no
    theo/<-5,0,0>,<0,0,1>
    actl/<-5,0,0>,<0,0,1>
    constr/point,offset,,-5,0,0
    ln4 =feat/line,cartesian,unbounded,no
    theo/<0,0,0>,<-1,0,0>
    actl/<0,0,0>,<-1,0,0>
    constr/line,bf,3d,cir3,pnt5,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt6 =feat/point,cartesian,no
    theo/<5,0,0>,<-1,0,0>
    actl/<5,0,0>,<-1,0,0>
    constr/point,pierce,ln4,cir3
    cir4 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,20,0>,<0,1,0>,10,0
    actl/<0,20,0>,<0,1,0>,10,0
    targ/<0,20,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt7 =feat/point,cartesian,no
    theo/<-5,20,0>,<0,1,0>
    actl/<-5,20,0>,<0,1,0>
    constr/point,offset,cir4,-5,0,0
    ln5 =feat/line,cartesian,unbounded,no
    theo/<0,20,0>,<-1,0,0>
    actl/<0,20,0>,<-1,0,0>
    constr/line,bf,3d,cir4,pnt7,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt8 =feat/point,cartesian,no
    theo/<5,20,0>,<-1,0,0>
    actl/<5,20,0>,<-1,0,0>
    constr/point,pierce,ln5,cir4
    ln6 =feat/line,cartesian,unbounded,no
    theo/<5,0,0>,<0,1,0>
    actl/<5,0,0>,<0,1,0>
    constr/line,bf,3d,pnt6,pnt8,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt9 =feat/point,cartesian,no
    theo/<5,-2.0711,0>,<0,1,0>
    actl/<5,-2.0711,0>,<0,1,0>
    constr/point,int,ln6,ln3


    not my code just for clarity
Reply
  • cir1 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,0,0>,<0,1,0>,10,0
    actl/<0,0,0>,<0,1,0>,10,0
    targ/<0,0,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt1 =feat/point,cartesian,no
    theo/<-5,0,0>,<0,0,1>
    actl/<-5,0,0>,<0,0,1>
    constr/point,offset,,-5,0,0
    ln1 =feat/line,cartesian,unbounded,no
    theo/<0,0,0>,<-1,0,0>
    actl/<0,0,0>,<-1,0,0>
    constr/line,bf,3d,cir1,pnt1,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt2 =feat/point,cartesian,no
    theo/<5,0,0>,<-1,0,0>
    actl/<5,0,0>,<-1,0,0>
    constr/point,pierce,cir1,ln1
    cir2 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,20,0>,<0,1,0>,10,0
    actl/<0,20,0>,<0,1,0>,10,0
    targ/<0,20,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt3 =feat/point,cartesian,no
    theo/<-5,20,0>,<0,1,0>
    actl/<-5,20,0>,<0,1,0>
    constr/point,offset,cir2,-5,0,0
    ln2 =feat/line,cartesian,unbounded,no
    theo/<0,20,0>,<-1,0,0>
    actl/<0,20,0>,<-1,0,0>
    constr/line,bf,3d,cir2,pnt3,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt4 =feat/point,cartesian,no
    theo/<5,20,0>,<-1,0,0>
    actl/<5,20,0>,<-1,0,0>
    constr/point,pierce,ln2,cir2
    ln3 =feat/line,cartesian,unbounded,no
    theo/<5,0,0>,<0,1,0>
    actl/<5,0,0>,<0,1,0>
    constr/line,bf,3d,pnt2,pnt4,,
    outlier_removal/off,3
    filter/off,wavelength=0
    align1 =alignment/start,recall:startup,list=yes
    alignment/trans_offset,yaxis,30
    alignment/rotate_offset,45,about,zplus
    alignment/end
    cir3 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,0,0>,<0,1,0>,10,0
    actl/<0,0,0>,<0,1,0>,10,0
    targ/<0,0,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt5 =feat/point,cartesian,no
    theo/<-5,0,0>,<0,0,1>
    actl/<-5,0,0>,<0,0,1>
    constr/point,offset,,-5,0,0
    ln4 =feat/line,cartesian,unbounded,no
    theo/<0,0,0>,<-1,0,0>
    actl/<0,0,0>,<-1,0,0>
    constr/line,bf,3d,cir3,pnt5,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt6 =feat/point,cartesian,no
    theo/<5,0,0>,<-1,0,0>
    actl/<5,0,0>,<-1,0,0>
    constr/point,pierce,ln4,cir3
    cir4 =feat/contact/circle,cartesian,out,least_sqr
    theo/<0,20,0>,<0,1,0>,10,0
    actl/<0,20,0>,<0,1,0>,10,0
    targ/<0,20,0>,<0,1,0>
    start ang=0,end ang=360
    angle vec=<0,0,1>
    direction=ccw
    show feature parameters=no
    show contact parameters=yes
    numhits=10,depth=0,pitch=0
    sample hits=3,spacer=0.1181
    avoidance move=both,distance=0.7874
    find hole=disabled,onerror=no,read pos=no
    show hits=no
    pnt7 =feat/point,cartesian,no
    theo/<-5,20,0>,<0,1,0>
    actl/<-5,20,0>,<0,1,0>
    constr/point,offset,cir4,-5,0,0
    ln5 =feat/line,cartesian,unbounded,no
    theo/<0,20,0>,<-1,0,0>
    actl/<0,20,0>,<-1,0,0>
    constr/line,bf,3d,cir4,pnt7,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt8 =feat/point,cartesian,no
    theo/<5,20,0>,<-1,0,0>
    actl/<5,20,0>,<-1,0,0>
    constr/point,pierce,ln5,cir4
    ln6 =feat/line,cartesian,unbounded,no
    theo/<5,0,0>,<0,1,0>
    actl/<5,0,0>,<0,1,0>
    constr/line,bf,3d,pnt6,pnt8,,
    outlier_removal/off,3
    filter/off,wavelength=0
    pnt9 =feat/point,cartesian,no
    theo/<5,-2.0711,0>,<0,1,0>
    actl/<5,-2.0711,0>,<0,1,0>
    constr/point,int,ln6,ln3


    not my code just for clarity
Children
No Data