hexagon logo

Having trouble with simple plane construction

PC-DMIS CAD++ 2020 R1, Romer Arm. I am simply trying to construct a plane coincident to a line and a point. Seems like such a simple thing but I can't make it work. Thank you.
Parents
  • As often, there are different solutions :
    You can create a generic point at each end of the line, using LN1.EXYZ and LN1.SXYZ.
    Then create the plane with three points.

    ASSIGN/V1=LN1.SXYZ
    POINT_LN1_1 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<V1.X,V1.Y,V1.Z>,$
    MEAS/XYZ,<V1.X,V1.Y,V1.Z)>,$
    NOM/IJK,<0,0,1)>,$
    MEAS/IJK,<0,0,1)>,$
    ASSIGN/V2=LN1.EXYZ
    POINT_LN1_2 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<V2.X,V2.Y,V2.Z>,$
    MEAS/XYZ,<V2.X,V2.Y,V2.Z)>,$
    NOM/IJK,<0,0,1)>,$
    ​​​​​​​MEAS/IJK,<0,0,1)>,$


    You can also calculate the vector of the plane, with a cross product, and create a generic plane with PNT1 as xyz and V1 as ijk :

    ASSIGN/V1=CROSS(LN1.IJK,LN1.XYZ-PNT1.XYZ)
    PLN1= GENERIC/PLANE,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<PNT1.X,PNT1.Y,PNT1.Z>,$
    MEAS/XYZ,<PNT1.X,PNT1.Y,PNT1.Z)>,$
    NOM/IJK,<V1.I,V1.J,V1.K)>,$
    ​​​​​​​MEAS/IJK,<V1.I,V1.J,V1.K)>,$



    In this case, you should verify if the vector is in the right direction, with an if statement like :
    ​​​​​​​
    IF DOT(V1,ALIGN.ZAXIS)<0
    V1=-V1
    END IF


  • OR, a much simpler way, since this is a portable user whom I assume has the ability to use pointclouds (COP). Simply create a new COP feature from your line and your point and then construct a BFRE plane from that COP

    LIN1       =FEAT/CONTACT/LINE/DEFAULT,CARTESIAN,UNBOUNDED
                THEO/<119.548,1.193,-19.955>,<-0.0000146,1,0.0000212>,<0.8660254,0,0.5>,<-0.5,-0.0000256,0.8660254>,28.602
                ACTL/<119.548,1.193,-19.955>,<-0.0000146,1,0.0000212>,<0.8660254,0,0.5>,<-0.5,-0.0000256,0.8660254>,28.602
                TARG/<119.548,1.193,-19.955>,<-0.0000146,1,0.0000212>,<0.8660254,0,0.5>,<-0.5,-0.0000256,0.8660254>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
    PNT1       =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<85.135,8.83,-0.008>,<0.0775968,0,0.9969848>
                ACTL/<85.135,8.83,-0.008>,<0.0775968,0,0.9969848>
                TARG/<85.135,8.83,-0.008>,<0.0775968,0,0.9969848>
                SNAP=NO
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
    COP2       =COP/DATA,TOTAL SIZE=6,REDUCED SIZE=6,
                FINDNOMS=NO,REF=LIN1,PNT1,,
    PLN5       =FEAT/PLANE,CARTESIAN,TRIANGLE,NO,LEAST_SQR
                THEO/<114.189,14.383,-18.074>,<0.5280405,-0.000018,0.8492192>
                ACTL/<114.646,14.383,-18.074>,<0.5221125,-0.0000105,0.8528767>
                CONSTR/PLANE,BFRE,COP2,,
                OUTLIER_REMOVAL/OFF,3
                FILTER/OFF,WAVELENGTH=0​
    ​​​​​​​
Reply
  • OR, a much simpler way, since this is a portable user whom I assume has the ability to use pointclouds (COP). Simply create a new COP feature from your line and your point and then construct a BFRE plane from that COP

    LIN1       =FEAT/CONTACT/LINE/DEFAULT,CARTESIAN,UNBOUNDED
                THEO/<119.548,1.193,-19.955>,<-0.0000146,1,0.0000212>,<0.8660254,0,0.5>,<-0.5,-0.0000256,0.8660254>,28.602
                ACTL/<119.548,1.193,-19.955>,<-0.0000146,1,0.0000212>,<0.8660254,0,0.5>,<-0.5,-0.0000256,0.8660254>,28.602
                TARG/<119.548,1.193,-19.955>,<-0.0000146,1,0.0000212>,<0.8660254,0,0.5>,<-0.5,-0.0000256,0.8660254>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
    PNT1       =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<85.135,8.83,-0.008>,<0.0775968,0,0.9969848>
                ACTL/<85.135,8.83,-0.008>,<0.0775968,0,0.9969848>
                TARG/<85.135,8.83,-0.008>,<0.0775968,0,0.9969848>
                SNAP=NO
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
    COP2       =COP/DATA,TOTAL SIZE=6,REDUCED SIZE=6,
                FINDNOMS=NO,REF=LIN1,PNT1,,
    PLN5       =FEAT/PLANE,CARTESIAN,TRIANGLE,NO,LEAST_SQR
                THEO/<114.189,14.383,-18.074>,<0.5280405,-0.000018,0.8492192>
                ACTL/<114.646,14.383,-18.074>,<0.5221125,-0.0000105,0.8528767>
                CONSTR/PLANE,BFRE,COP2,,
                OUTLIER_REMOVAL/OFF,3
                FILTER/OFF,WAVELENGTH=0​
    ​​​​​​​
Children
No Data