FreeCAD

Форк
0
/
AttachEnginePy.xml 
168 строк · 7.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="BaseClassPy"
5
      Name="AttachEnginePy"
6
      Twin="AttachEngine"
7
      TwinPointer="AttachEngine"
8
      Include="Mod/Part/App/Attacher.h"
9
      FatherInclude="Base/BaseClassPy.h"
10
      Namespace="Attacher"
11
      Constructor="true"
12
      Delete="true"
13
      FatherNamespace="Base">
14
    <Documentation>
15
      <Author Licence="LGPL" Name="DeepSOIC" EMail="vv.titov@gmail.com" />
16
      <DeveloperDocu>AttachEngine abstract class</DeveloperDocu>
17
      <UserDocu>AttachEngine abstract class - the functionality of AttachableObject, but outside of DocumentObject</UserDocu>
18
    </Documentation>
19
    <Attribute Name="AttacherType" ReadOnly="true">
20
      <Documentation>
21
        <UserDocu>Type of engine: 3d, plane, line, or point.</UserDocu>
22
      </Documentation>
23
      <Parameter Name="AttacherType" Type="String" />
24
    </Attribute>
25
    <Attribute Name="Mode" ReadOnly="false">
26
      <Documentation>
27
        <UserDocu>Current attachment mode.</UserDocu>
28
      </Documentation>
29
      <Parameter Name="Mode" Type="String" />
30
    </Attribute>
31
    <Attribute Name="References" ReadOnly="false">
32
      <Documentation>
33
        <UserDocu>Current attachment mode.</UserDocu>
34
      </Documentation>
35
      <Parameter Name="References" Type="Object" />
36
    </Attribute>
37
    <Attribute Name="AttachmentOffset" ReadOnly="false">
38
      <Documentation>
39
        <UserDocu>Current attachment mode.</UserDocu>
40
      </Documentation>
41
      <Parameter Name="AttachmentOffset" Type="Object" />
42
    </Attribute>
43
    <Attribute Name="Reverse" ReadOnly="false">
44
      <Documentation>
45
        <UserDocu>If True, Z axis of attached placement is flipped. X axis is flipped in addition (CS has to remain right-handed).</UserDocu>
46
      </Documentation>
47
      <Parameter Name="Reverse" Type="Boolean" />
48
    </Attribute>
49
    <Attribute Name="Parameter" ReadOnly="false">
50
      <Documentation>
51
        <UserDocu>Value of parameter for some curve attachment modes. Range of 0..1 spans the length of the edge (parameter value can be outside of the range for curves that allow extrapolation.</UserDocu>
52
      </Documentation>
53
      <Parameter Name="Parameter" Type="Float" />
54
    </Attribute>
55

56
    <Attribute Name="CompleteModeList" ReadOnly="true">
57
      <Documentation>
58
        <UserDocu>List of all attachment modes of all AttachEngines. This is the list of modes in MapMode enum properties of AttachableObjects.</UserDocu>
59
      </Documentation>
60
      <Parameter Name="CompleteModeList" Type="List" />
61
    </Attribute>
62
    <Attribute Name="ImplementedModes" ReadOnly="true">
63
      <Documentation>
64
        <UserDocu>List of all attachment modes of all AttachEngines. This is the list of modes in MapMode enum properties of AttachableObjects.</UserDocu>
65
      </Documentation>
66
      <Parameter Name="ImplementedModes" Type="List" />
67
    </Attribute>
68
    <Attribute Name="CompleteRefTypeList" ReadOnly="true">
69
      <Documentation>
70
        <UserDocu>List of all reference shape types recognized by AttachEngine.</UserDocu>
71
      </Documentation>
72
      <Parameter Name="CompleteRefTypeList" Type="List" />
73
    </Attribute>
74

75
    <Methode Name="getModeInfo">
76
      <Documentation>
77
        <UserDocu>getModeInfo(mode): returns supported reference combinations, user-friendly name, and so on.</UserDocu>
78
      </Documentation>
79
    </Methode>
80
    <Methode Name="getRefTypeOfShape">
81
      <Documentation>
82
        <UserDocu>getRefTypeOfShape(shape): returns shape type as interpreted by AttachEngine. Returns a string.</UserDocu>
83
      </Documentation>
84
    </Methode>
85
    <Methode Name="isFittingRefType">
86
      <Documentation>
87
        <UserDocu>isFittingRefType(type_shape, type_needed): tests if shape type, specified by type_shape (string), fits a type required by attachment mode type_needed (string). e.g. 'Circle' fits a requirement of 'Edge', and 'Curve' doesn't fit if a 'Circle' is required.</UserDocu>
88
      </Documentation>
89
    </Methode>
90
    <Methode Name="downgradeRefType">
91
      <Documentation>
92
        <UserDocu>downgradeRefType(type): returns next more general type. E.g. downgradeType('Circle') yields 'Curve'.</UserDocu>
93
      </Documentation>
94
    </Methode>
95
    <Methode Name="getRefTypeInfo">
96
      <Documentation>
97
        <UserDocu>getRefTypeInfo(type): returns information (dict) on shape type. Keys:'UserFriendlyName', 'TypeIndex', 'Rank'. Rank is the number of times reftype can be downgraded, before it becomes 'Any'.</UserDocu>
98
      </Documentation>
99
    </Methode>
100
    <Methode Name="copy" Const="true">
101
      <Documentation>
102
        <UserDocu>copy(): returns a new instance of AttachEngine.</UserDocu>
103
      </Documentation>
104
    </Methode>
105
    <Methode Name="calculateAttachedPlacement" Const="true">
106
      <Documentation>
107
        <UserDocu>calculateAttachedPlacement(orig_placement): returns result of attachment, based
108
on current Mode, References, etc. AttachmentOffset is included.
109

110
original_placement is the previous placement of the object being attached. It
111
is used to preserve orientation for Translate attachment mode. For other modes,
112
it is ignored.
113

114
Returns the new placement. If not attached, returns None. If attachment fails,
115
an exception is raised.</UserDocu>
116
      </Documentation>
117
    </Methode>
118
    <Methode Name="suggestModes">
119
      <Documentation>
120

121
<UserDocu>suggestModes(): runs mode suggestion routine and returns a dictionary with
122
results and supplementary information.
123

124
Keys:
125
'allApplicableModes': list of modes that can accept current references. Note
126
that it is only a check by types, and does not guarantee the modes will
127
actually work.
128

129
'bestFitMode': mode that fits current references best. Note that the mode may
130
not be valid for the set of references; check for if 'message' is 'OK'.
131

132
'error': error message for when 'message' is 'UnexpectedError' or
133
'LinkBroken'.
134

135
'message': general result of suggestion. 'IncompatibleGeometry', 'NoModesFit':
136
no modes accept current set of references; 'OK': some modes do accept current
137
set of references (though it's not guarantted the modes will work - surrestor
138
only checks for correct types); 'UnexpectedError': should never happen.
139

140
'nextRefTypeHint': what more can be added to references to reach other modes
141
('reachableModes' provide more extended information on this)
142

143
'reachableModes': a dict, where key is mode, and value is a list of sequences
144
of references that can be added to fit that mode.
145

146
'references_Types': a list of types of geometry linked by references (that's
147
the input information for suggestor, actually).</UserDocu>
148
      </Documentation>
149
    </Methode>
150
    <Methode Name="readParametersFromFeature">
151
      <Documentation>
152
        <UserDocu>readParametersFromFeature(document_object): sets AttachEngine parameters (References, Mode, etc.) by reading out properties of AttachableObject-derived feature.</UserDocu>
153
      </Documentation>
154
    </Methode>
155
    <Methode Name="writeParametersToFeature">
156
      <Documentation>
157

158
<UserDocu>writeParametersToFeature(document_object): updates properties of
159
AttachableObject-derived feature with current AttachEngine parameters
160
(References, Mode, etc.).
161

162
Warning: if a feature linked by AttachEngine.References was deleted, this method
163
will crash FreeCAD.</UserDocu>
164

165
      </Documentation>
166
    </Methode>
167
  </PythonExport>
168
</GenerateModel>
169

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

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

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

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