FreeCAD

Форк
0
/
QuantityPy.xml 
93 строки · 3.3 Кб
1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
3
    <PythonExport
4
        Father="PyObjectBase"
5
        Name="QuantityPy"
6
        Twin="Quantity"
7
        TwinPointer="Quantity"
8
        Include="Base/Quantity.h"
9
        FatherInclude="Base/PyObjectBase.h"
10
        Namespace="Base"
11
        NumberProtocol="true"
12
        RichCompare="true"
13
        Constructor="true"
14
        Delete="true"
15
        FatherNamespace="Base">
16
    <Documentation>
17
        <Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
18
        <UserDocu>Quantity
19
defined by a value and a unit.
20

21
The following constructors are supported:
22
Quantity() -- empty constructor
23
Quantity(Value) -- empty constructor
24
Quantity(Value,Unit) -- empty constructor
25
Quantity(Quantity) -- copy constructor
26
Quantity(string) -- arbitrary mixture of numbers and chars defining a Quantity
27
        </UserDocu>
28
        <DeveloperDocu>Quantity</DeveloperDocu>
29
    </Documentation>
30
    <Methode Name="toStr" Const="true">
31
      <Documentation>
32
        <UserDocu>
33
          toStr([decimals])
34
          returns a string representation rounded to number of decimals. If no decimals are specified then
35
          the internal precision is used
36
        </UserDocu>
37
      </Documentation>
38
    </Methode>
39
    <Methode Name="getUserPreferred" Const="true">
40
      <Documentation>
41
        <UserDocu>
42
          returns a quantity with the translation factor and a string with the prevered unit
43
        </UserDocu>
44
      </Documentation>
45
    </Methode>
46
    <Methode Name="getValueAs" Const="true">
47
      <Documentation>
48
        <UserDocu>
49
          returns a floating point value as the provided unit
50

51
          Following parameters are allowed:
52
          getValueAs('m/s')  # unit string to parse
53
          getValueAs(2.45,1) # translation value and unit signature
54
          getValueAs(FreeCAD.Units.Pascal) # predefined standard units
55
          getValueAs(Qantity('N/m^2')) # a quantity
56
          getValueAs(Unit(0,1,0,0,0,0,0,0)) # a unit
57
        </UserDocu>
58
      </Documentation>
59
    </Methode>
60
    <Methode Name="__round__" Const="true">
61
      <Documentation>
62
        <UserDocu>
63
Return the Integral closest to x, rounding half toward even.
64
When an argument is passed, work like built-in round(x, ndigits).
65
        </UserDocu>
66
      </Documentation>
67
    </Methode>
68
    <Attribute Name="Value" ReadOnly="false">
69
            <Documentation>
70
                <UserDocu>Numeric Value of the Quantity (in internal system mm,kg,s)</UserDocu>
71
            </Documentation>
72
            <Parameter Name="Value" Type="Float" />
73
        </Attribute>
74
    <Attribute Name="Unit" ReadOnly="false">
75
      <Documentation>
76
        <UserDocu>Unit of the Quantity</UserDocu>
77
      </Documentation>
78
      <Parameter Name="Unit" Type="Object" />
79
    </Attribute>
80
    <Attribute Name="UserString" ReadOnly="true">
81
      <Documentation>
82
        <UserDocu>Unit of the Quantity</UserDocu>
83
      </Documentation>
84
      <Parameter Name="UserString" Type="String" />
85
    </Attribute>
86
    <Attribute Name="Format" ReadOnly="false">
87
      <Documentation>
88
        <UserDocu>Format of the Quantity</UserDocu>
89
      </Documentation>
90
      <Parameter Name="Format" Type="Dict" />
91
    </Attribute>
92
    </PythonExport>
93
</GenerateModel>
94

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.