0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / IGESData / IGESData_ToolLocation.cdl
CommitLineData
b311480e 1-- Created on: 1993-09-21
2-- Created by: Christian CAILLET
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class ToolLocation from IGESData inherits TShared
18
19 ---Purpose : This Tool determines and gives access to effective Locations
20 -- of IGES Entities as defined by the IGES Norm. These Locations
21 -- can be for each Entity :
22 -- - on one part, explicitly defined by a Transf in Directory
23 -- Part (this Transf can be itself compound); if not defined,
24 -- no proper Transformation is defined
25 -- - on the other part, implicitly defined by a reference from
26 -- another Entity : its Parent
27 -- Both implicit and explicit locations are combinable.
28 --
29 -- Implicit definition can be itself defined, either through the
30 -- definition of an Entity (i.e. a Composite Curve references
31 -- a list of Curves), or by a specific Associativity, of type
32 -- SingleParentEntity, by which the Location of the Parent is
33 -- applied to the Childs defined by this Associativity.
34 -- Remark that a Transf itself has no Location, but it can be
35 -- compound
36 --
37 -- This is a TShared object, then it is easier to use in an
38 -- interactive session
39
40
41uses GTrsf from gp, Trsf from gp, Array1OfInteger from TColStd,
42 GeneralLib, IGESEntity, IGESModel, Protocol from IGESData
43
44raises DomainError
45
46is
47
48 Create (amodel : IGESModel; protocol : Protocol from IGESData)
6e33d3ce 49 returns ToolLocation;
7fd59977 50 ---Purpose : Creates a ToolLocation on a given Model, filled with the help
51 -- of a Protocol (which allows to known Entities referenced by
52 -- other ones)
53
54 Load (me : mutable);
55 ---Purpose : Does the effective work of determining Locations of Entities
56
57 SetPrecision (me : mutable; prec : Real) is static;
58 ---Purpose : Sets a precision for the Analysis of Locations
59 -- (default by constructor is 1.E-05)
60
61 -- -- Internal Actions to Compute and Edit the Result -- --
62
63 SetReference (me : mutable; parent, child : IGESEntity) is static;
64 ---Purpose : Sets the "Reference" information for <child> as being <parent>
65 -- Sets an Error Status if already set (see method IsAmbiguous)
66
67 SetParentAssoc (me : mutable; parent, child : IGESEntity) is static;
68 ---Purpose : Sets the "Associativity" information for <child> as being
69 -- <parent> (it must be the Parent itself, not the Associativity)
70
71 ResetDependences (me : mutable; child : IGESEntity) is static;
72 ---Purpose : Resets all informations about dependences for <child>
73
74 SetOwnAsDependent (me : mutable; ent : IGESEntity);
75 ---Purpose : Unitary action which defines Entities referenced by <ent>
76 -- (except those in Directory Part and Associativities List)
77 -- as Dependent (their Locations are related to that of <ent>)
78
79 -- -- Queries -- --
80
81 IsTransf (me; ent : IGESEntity) returns Boolean is static;
82 ---Purpose : Returns True if <ent> is kind of TransfEntity. Then, it has
83 -- no location, while it can be used to define a Location)
84
85 IsAssociativity (me; ent : IGESEntity) returns Boolean is static;
86 ---Purpose : Returns True if <ent> is an Associativity (IGES Type 402).
87 -- Then, Location does not apply.
88
89 HasTransf (me; ent : IGESEntity) returns Boolean is static;
90 ---Purpose : Returns True if <ent> has a Transformation Matrix in proper
91 -- (referenced from its Directory Part)
92
93 ExplicitLocation (me; ent : IGESEntity) returns GTrsf from gp is static;
94 ---Purpose : Returns the Explicit Location defined by the Transformation
95 -- Matrix of <ent>. Identity if there is none
96
97
98 IsAmbiguous (me; ent : IGESEntity) returns Boolean is static;
99 ---Purpose : Returns True if more than one Parent has been determined for
100 -- <ent>, by adding direct References and Associativities
101
102 HasParent (me; ent : IGESEntity) returns Boolean
103 ---Purpose : Returns True if <ent> is dependent from one and only one other
104 -- Entity, either by Reference or by Associativity
105 raises DomainError is static;
106 -- Error if more than one Parent has been noted
107
108 Parent (me; ent : IGESEntity) returns IGESEntity
109 ---Purpose : Returns the unique Parent recorded for <ent>.
110 -- Returns a Null Handle if there is none
111 raises DomainError is static;
112 -- Error if more than one Parent has been noted
113
114 HasParentByAssociativity (me; ent : IGESEntity) returns Boolean
115 ---Purpose : Returns True if the Parent, if there is one, is defined by
116 -- a SingleParentEntity Associativity
117 -- Else, if HasParent is True, it is by Reference
118 raises DomainError is static;
119 -- Error if more than one Parent has been noted
120
121 ParentLocation (me; ent : IGESEntity) returns GTrsf from gp
122 ---Purpose : Returns the effective Location of the Parent of <ent>, if
123 -- there is one : this Location is itself given as compound
124 -- according dependences on the Parent, if there are some.
125 -- Returns an Identity Transformation if no Parent is recorded.
126 raises DomainError is static;
127 -- Error if more than one Parent has been noted
128
129 EffectiveLocation (me; ent : IGESEntity) returns GTrsf from gp
130 ---Purpose : Returns the effective Location of an Entity, i.e. the
131 -- composition of its proper Transformation Matrix (returned by
132 -- Transf) and its Parent's Location (returned by ParentLocation)
133 raises DomainError is static;
134 -- Error if more than one Parent has been noted
135
136 AnalyseLocation (me; loc : GTrsf from gp; result : out Trsf from gp)
137 returns Boolean is static;
138 ---Purpose : Analysis a Location given as a GTrsf, by trying to convert it
139 -- to a Trsf (i.e. to a True Location of which effect is
140 -- described by an Isometry or a Similarity)
141 -- Works with the Precision given by default or by SetPrecision
142 -- Calls ConvertLocation (see below)
143
144 ConvertLocation (myclass; prec : Real;
145 loc : GTrsf from gp; result : out Trsf from gp; uni : Real = 1)
146 returns Boolean;
147 ---Purpose : Convertion of a Location, from GTrsf form to Trsf form
148 -- Works with a precision given as argument.
149 -- Returns True if the Conversion is possible, (hence, <result>
150 -- contains the converted location), False else
151 -- <unit>, if given, indicates the unit in which <loc> is defined
152 -- in meters. It concerns the translation part (to be converted.
153 --
154 -- As a class method, it can be called separately
155
156
157fields
158
159 theprec : Real;
160 themodel : IGESModel;
161 thelib : GeneralLib;
162 therefs : Array1OfInteger from TColStd;
163 theassocs : Array1OfInteger from TColStd;
164
165end ToolLocation;