0023892: Missing intersection edge between two faces.
[occt.git] / src / BRepGProp / BRepGProp.cdl
CommitLineData
b311480e 1-- Created on: 1992-12-04
2-- Created by: Isabelle GRIGNON
3-- Copyright (c) 1992-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
17package BRepGProp
18
19 ---Purpose: Provides global functions to compute a shape's global
20-- properties for lines, surfaces or volumes, and bring
21-- them together with the global properties already
22-- computed for a geometric system.
23-- The global properties computed for a system are :
24-- - its mass,
25-- - its center of mass,
26-- - its matrix of inertia,
27-- - its moment about an axis,
28-- - its radius of gyration about an axis,
29-- - and its principal properties of inertia such as
30-- principal axis, principal moments, principal radius of gyration.
31
32uses GProp,
33 BRepAdaptor,
34 BRepTools,
35 BRep,
36 TopExp,
37 TopoDS,
38 Geom2dAdaptor,
39 gp,
40 GeomAbs,
41 TColStd
42
43is
44
45 class EdgeTool;
46
47 class Face;
48
49 class Domain;
50
51 class Cinert instantiates CGProps from GProp( Curve from BRepAdaptor,
52 EdgeTool from BRepGProp);
53
54 class Sinert instantiates SGProps from GProp( Edge from TopoDS,
55 Face from BRepGProp ,
56 Domain from BRepGProp);
57
58 class Vinert instantiates VGProps from GProp( Edge from TopoDS,
59 Face from BRepGProp,
60 Domain from BRepGProp);
61
62 class VinertGK instantiates VGPropsGK from GProp( Edge from TopoDS,
63 Face from BRepGProp,
64 Domain from BRepGProp);
65 --
66 -- Package methods to compute global properties.
67 --
68
69 LinearProperties(S : Shape from TopoDS; LProps : in out GProps from GProp);
70 ---Purpose: Computes the linear global properties of the shape S,
71-- i.e. the global properties induced by each edge of the
72-- shape S, and brings them together with the global
73-- properties still retained by the framework LProps. If
74-- the current system of LProps was empty, its global
75-- properties become equal to the linear global
76-- properties of S.
77-- For this computation no linear density is attached to
78-- the edges. So, for example, the added mass
79-- corresponds to the sum of the lengths of the edges of
80-- S. The density of the composed systems, i.e. that of
81-- each component of the current system of LProps, and
82-- that of S which is considered to be equal to 1, must be coherent.
83-- Note that this coherence cannot be checked. You are
84-- advised to use a separate framework for each
85-- density, and then to bring these frameworks together
86-- into a global one.
87-- The point relative to which the inertia of the system is
88-- computed is the reference point of the framework LProps.
89-- Note: if your programming ensures that the framework
90-- LProps retains only linear global properties (brought
91-- together for example, by the function
92-- LinearProperties) for objects the density of which is
93-- equal to 1 (or is not defined), the function Mass will
94-- return the total length of edges of the system analysed by LProps.
95-- Warning
96-- No check is performed to verify that the shape S
97-- retains truly linear properties. If S is simply a vertex, it
98-- is not considered to present any additional global properties.
99
100 SurfaceProperties(S : Shape from TopoDS; SProps : in out GProps from GProp);
101 ---Purpose: Computes the surface global properties of the
102-- shape S, i.e. the global properties induced by each
103-- face of the shape S, and brings them together with
104-- the global properties still retained by the framework
105-- SProps. If the current system of SProps was empty,
106-- its global properties become equal to the surface
107-- global properties of S.
108-- For this computation, no surface density is attached
109-- to the faces. Consequently, the added mass
110-- corresponds to the sum of the areas of the faces of
111-- S. The density of the component systems, i.e. that
112-- of each component of the current system of
113-- SProps, and that of S which is considered to be
114-- equal to 1, must be coherent.
115-- Note that this coherence cannot be checked. You
116-- are advised to use a framework for each different
117-- value of density, and then to bring these
118-- frameworks together into a global one.
119-- The point relative to which the inertia of the system
120-- is computed is the reference point of the framework SProps.
121-- Note : if your programming ensures that the
122-- framework SProps retains only surface global
123-- properties, brought together, for example, by the
124-- function SurfaceProperties, for objects the density
125-- of which is equal to 1 (or is not defined), the
126-- function Mass will return the total area of faces of
127-- the system analysed by SProps.
128-- Warning
129-- No check is performed to verify that the shape S
130-- retains truly surface properties. If S is simply a
131-- vertex, an edge or a wire, it is not considered to
132-- present any additional global properties.
133
134 SurfaceProperties(S : Shape from TopoDS; SProps : in out GProps from GProp;
135 Eps: Real) returns Real;
136 ---Purpose: Updates <SProps> with the shape <S>, that contains its pricipal properties.
137 -- The surface properties of all the faces in <S> are computed.
138 -- Adaptive 2D Gauss integration is used.
139 -- Parameter Eps sets maximal relative error of computed mass (area) for each face.
140 -- Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
141 -- for two successive steps of adaptive integration.
142 -- Method returns estimation of relative error reached for whole shape.
143 -- WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
144
145
146------------------------
147-- VolumeProperties --
148------------------------
149
150 ---Purpose:
151-- Computes the global volume properties of the solid
152-- S, and brings them together with the global
153-- properties still retained by the framework VProps. If
154-- the current system of VProps was empty, its global
155-- properties become equal to the global properties of S for volume.
156-- For this computation, no volume density is attached
157-- to the solid. Consequently, the added mass
158-- corresponds to the volume of S. The density of the
159-- component systems, i.e. that of each component of
160-- the current system of VProps, and that of S which
161-- is considered to be equal to 1, must be coherent to each other.
162-- Note that this coherence cannot be checked. You
163-- are advised to use a separate framework for each
164-- density, and then to bring these frameworks
165-- together into a global one.
166-- The point relative to which the inertia of the system
167-- is computed is the reference point of the framework VProps.
168-- Note: if your programming ensures that the
169-- framework VProps retains only global properties of
170-- volume (brought together for example, by the
171-- function VolumeProperties) for objects the density
172-- of which is equal to 1 (or is not defined), the
173-- function Mass will return the total volume of the
174-- solids of the system analysed by VProps.
175-- Warning
176-- The shape S must represent an object whose
177-- global volume properties can be computed. It may
178-- be a finite solid, or a series of finite solids all
179-- oriented in a coherent way. Nonetheless, S must be
180-- exempt of any free boundary. Note that these
181-- conditions of coherence are not checked by this
182-- algorithm, and results will be false if they are not respected.
183 VolumeProperties(S : Shape from TopoDS; VProps : in out GProps from GProp;
184 OnlyClosed: Boolean = Standard_False);
185
186 VolumeProperties(S : Shape from TopoDS; VProps : in out GProps from GProp;
187 Eps: Real; OnlyClosed: Boolean = Standard_False) returns Real;
188 ---Purpose: Updates <VProps> with the shape <S>, that contains its pricipal properties.
189 -- The volume properties of all the FORWARD and REVERSED faces in <S> are computed.
190 -- If OnlyClosed is True then computed faces must belong to closed Shells.
191 -- Adaptive 2D Gauss integration is used.
192 -- Parameter Eps sets maximal relative error of computed mass (volume) for each face.
193 -- Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
194 -- for two successive steps of adaptive integration.
195 -- Method returns estimation of relative error reached for whole shape.
196 -- WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
197
198
199
200
201
202
203-- ----------------------------------------------------------------------------------------
204 VolumePropertiesGK(S : Shape from TopoDS;
205 VProps : in out GProps from GProp;
206 Eps : Real from Standard = 0.001;
207 OnlyClosed: Boolean from Standard = Standard_False;
208 IsUseSpan : Boolean from Standard = Standard_False;
209 CGFlag : Boolean from Standard = Standard_False;
210 IFlag : Boolean from Standard = Standard_False)
211
212 returns Real;
213 ---Purpose: Updates <VProps> with the shape <S>, that contains its pricipal properties.
214 -- The volume properties of all the FORWARD and REVERSED faces in <S> are computed.
215 -- If OnlyClosed is True then computed faces must belong to closed Shells.
216 -- Adaptive 2D Gauss integration is used.
217 -- Parameter IsUseSpan says if it is necessary to define spans on a face.
218 -- This option has an effect only for BSpline faces.
219 -- Parameter Eps sets maximal relative error of computed property for each face.
220 -- Error is delivered by the adaptive Gauss-Kronrod method of integral computation
221 -- that is used for properties computation.
222 -- Method returns estimation of relative error reached for whole shape.
223 -- Returns negative value if the computation is failed.
224 VolumePropertiesGK(S : Shape from TopoDS;
225 VProps : in out GProps from GProp;
226 thePln: Pln from gp;
227 Eps : Real from Standard = 0.001;
228 OnlyClosed: Boolean from Standard = Standard_False;
229 IsUseSpan : Boolean from Standard = Standard_False;
230 CGFlag : Boolean from Standard = Standard_False;
231 IFlag : Boolean from Standard = Standard_False)
232 returns Real;
233
234end BRepGProp;
235
236
237
238
239