Ankündigung

Einklappen
Keine Ankündigung bisher.

All Modules - Bore Problem - Who can reproduce this?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • All Modules - Bore Problem - Who can reproduce this?

    Windows 7 - 64Bit - Engl. - Region and Language: German - Germany

    E3D 2.1 fix 7

    Test: Projekt APS - Set Bore Units to inch

    in command line on zone(any):

    q units

    INCH Bore
    MM Distance


    new pipe
    new bran
    hbore 2in
    q var !!ce.hbore

    <BORE> 2in
    q var !!ce.hbore.real()

    <REAL> 50.8mm ????????????????

    Thank you in advance
    Zuletzt geändert von Peter200368; 15.02.2017, 20:18.

  • #2
    Hi,

    I have the same result


    pdms-Units.JPG

    BR
    Helmut

    Angehängte Dateien
    mitn "M" geht's manchmal leichter, aber Winkelbemaßung geht a net

    Kommentar


    • #3
      Thank you Helmut,
      and also in PDMS12.1SP4 fix 36. I have created an SI for this some weeks ago, but unfortunaly I get only a not reproducible

      Kommentar


      • #4
        Please try this:

        var !a coll all unit
        $!a[1]
        q att

        Bunit have to "Inch"
        Dunit have to be "mm".
        --> "UNIT" is stored in PARAGON DBs
        DB order in MDB is important.
        Geht net, gibt's net!
        [Entfessler Start]
        Ois wos I do verzapf, is mei eigana Bledsinn und spieglt net die Meinung der Bude wo I hakl (g'haklt hob oder hakl'n werd) wida.
        [Entfessler Ende]

        Kommentar


        • #5
          hm, doesn't Change anything
          Geht net, gibt's net!
          [Entfessler Start]
          Ois wos I do verzapf, is mei eigana Bledsinn und spieglt net die Meinung der Bude wo I hakl (g'haklt hob oder hakl'n werd) wida.
          [Entfessler Ende]

          Kommentar


          • #6
            !u = object unit('inch')
            q var !!ce.hbore.real().convert(!u)
            Sorry, I have no other idea...
            Geht net, gibt's net!
            [Entfessler Start]
            Ois wos I do verzapf, is mei eigana Bledsinn und spieglt net die Meinung der Bude wo I hakl (g'haklt hob oder hakl'n werd) wida.
            [Entfessler Ende]

            Kommentar


            • #7
              I think the UNIT element is obsolete with the new units functionality from PDMS12.1, E3D. But I'm not sure.
              Strange is that this work:
              q units

              INCH Bore
              MM Distance
              !bore = object bore('2in')
              q var !bore

              <BORE> 2in
              q var !bore.real()

              <REAL> 50mm

              My workaround is to collect all branches. Create a bore object from hbore and set the hbore to the object value. This works. We need this, because we need the mm value in reports

              Kommentar


              • #8
                Hi,
                maybe it's a Bbbbbbb, puh, difficult to say it loud, a Bbbbbbb ... What the hell


                OK, one last try "maybe it's a BUG", wow I got it.

                I know this is not known in the PDMS Dictionary, but it is possible

                BR
                Helmut
                Zuletzt geändert von binford6000; 21.02.2017, 17:41.
                mitn "M" geht's manchmal leichter, aber Winkelbemaßung geht a net

                Kommentar


                • #9
                  ROFL - Check this out!

                  hbore 50mm
                  q var !!ce.hbore
                  <BORE> 2in
                  q var !!ce.hbore.real()
                  <REAL> 50mm

                  It doesn't matter what your settings are !!
                  In the database all values are stored in "1" unit - maybe SI unit ...
                  So if you enter "2in" this is converted to "mm" and stored as "mm" --> "50.8mm".

                  I don't know, if this is a Bug or a Feature...
                  Geht net, gibt's net!
                  [Entfessler Start]
                  Ois wos I do verzapf, is mei eigana Bledsinn und spieglt net die Meinung der Bude wo I hakl (g'haklt hob oder hakl'n werd) wida.
                  [Entfessler Ende]

                  Kommentar


                  • #10
                    Hello guys,

                    My opinion of this topic:

                    First:
                    If bore is INCH, and value is converted the MM, it’s multiplied by 25.4 like mentioned in documentation. Sounds correct to me.


                    How Bores Are Output
                    Although all pipe bores are stored in the PDMS databases in mm, they may be input and output in either metric or imperial units. The program converts from one set of units to the other by applying the factor 25.4 mm/inch.
                    Second:
                    If I understand correctly and the output should be the MM equivalent of the INCH value, I recommend looking it up in Nominal Bore table (most probably like Q HBOR does, if Hbor is set to inch but Bore Unit is mm).

                    Lets use a little function for this purpose:

                    Code:
                        define function !!getCeBoreMm() is REAL
                    
                            !mmBore = 0
                    
                            if (!!ce.type.neq('BRAN')) then
                                return !mmBore
                            endif
                    
                            !coll = object COLLECTION()
                            !coll.type(|NOMINB|)
                            !nomibs = !coll.results()
                    
                            !mmBore = !!ce.hbor.real().convertUnits('mm')
                            !incBore = !!ce.hbor.real().convertUnits('inch')
                    
                            do !nomib values !nomibs
                    
                                if (!incBore.value().eq(!nomib.incbore) OR !mmBore.value().eq(!nomib.mmBore)) then
                                    !mmBore = object REAL(!nomib.mmbore, object UNIT('mm'))
                                    break
                                endif
                    
                            enddo
                    
                            return !mmBore
                    
                        endfunction

                    Function will always return mm bore, regardless of unit settings:

                    Code:
                    new bran hbor 2in
                    mm dist
                    mm bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    inch dist
                    mm bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    mm dist
                    inch bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    inch dist
                    inch bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    new bran hbor 50mm
                    mm dist
                    mm bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    inch dist
                    mm bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    mm dist
                    inch bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    inch dist
                    inch bore
                    q var !!getCeBoreMm()
                    <REAL> 50mm
                    Kind regards,
                    k

                    Kommentar


                    • #11
                      An Bore OBJECT gives you the right value, and an Attribut with datatype bore not can't be the right behavier. Till PDMS 12.0 both works in the right way - so I think this is a bug in PDMS12.1 and E3D

                      Kommentar


                      • #12
                        Perhaps I do not fully understand the problem, but in my opinion the behaviour is somehow comprehensible.

                        q var !!ce.hbore method converts the bore based on the nominal bore table to current bore unit. NOMINB object is kind of a keypair which maps inch and mm bores together. For example, if the first available NOMINB with .inchbore 2in had a .mmbore value of 55mm then q var !!ce.hbore would return 55mm.

                        That means this function does not compute, it just looks up an equivalent value. Of course that's special functionality, but definitely designed on purpose. :-)

                        Wheras q var !!ce.hbore.real() method just takes the numeric value and multiplies by 25.4 (if it's inch, and mm is requested) , like any other comparable unit-transformation does.


                        P.s. I don't have older versions available but at least 12.0.SP6 works the same way.


                        Sorry haven't managed to upload a screenshot here ... can someone give me a hint how it works?
                        Alternative link instead:




                        Code:
                        q units
                        
                        INCH Bore
                        MM Distance
                        
                        new pipe
                        new bran
                        hbore 2in
                        q var !!ce.hbore
                        
                        <BORE> 2in
                        
                        q var !!ce.hbore.real()
                        
                        <REAL> 50.8
                        kind regards
                        karl
                        Zuletzt geändert von karl-j; 01.03.2017, 22:33.

                        Kommentar


                        • #13
                          but the difference between Bore Object and Hbore Attrib, you're absolutely right Peter. There must be something wrong.
                          Even worse - if you assign the object to the attribute an back, it changes :-(

                          Code:
                          
                          q units
                          
                          INCH Bore
                          MM Distance
                          
                          new pipe
                          new bran
                          
                          !x = object bore(2in)
                          q var !x.real()
                          
                          <REAL> 50mm
                          
                          !!CE.hbor = !x
                          !x = !!CE.hbor
                          
                          q var !x.real()
                          
                          <REAL> 50.8mm

                          And also true: This difference is only since 12.1
                          12.0 version returned on both 50.8 mm.



                          Have a nice weekend!

                          Kommentar

                          Lädt...
                          X