Properties of Shapes
Local Properties of Shapes
BRepLProp package는 Local Properties of Shapes 컴포넌트를 제공. BRep 모델의 edge와 face에 대한 다양한 local 속성을 계산하는 알고리즘 포함.
query:
- for a point of parameter u on a curve which supports an edge:
- the point,
- the derivative vectors, up to the third degree,
- the tangent vector,
- the normal,
- the curvature, and the center of curvature;
- for a point of parameter (u, v) on a surface which supports a face:
- the point,
- the derivative vectors, up to the second degree,
- the tangent vectors to the u and v isoparametric curves,
- the normal vector,
- the minimum or maximum curvature, and the corresponding directions of curvature;
- the degree of continuity of a curve which supports an edge, built by the concatenation of two other edges, at their junction point.
분석된 edge와 face들은 BRepAdaptor curve와 surface로 describe되는데, geometric 지원의 description을 위한 interface를 가진 shape를 제공한다. 지역 속성의 base point는 curve는 u 파라미터, surface는 (u,v) 파라미터로 정의된다.
Local Properties of Curves and Surfaces
"Local Properties of Curves and Surfaces" 는 Geom curve (2D or 3D 공간의)나 surface 상의 다양한 지역 속성들을 계산하는 알고리즘을 제공하는 컴포넌트이다:
- Geom2dLProp package, which allows computing Derivative and Tangent vectors (normal and curvature) of a parametric point on a 2D curve;
- GeomLProp package, which provides local properties on 3D curves and surfaces;
- LProp package, which provides an enumeration used to characterize a particular point on a 2D curve.
Curve들은 Geom_Curve curves (in 3D space) 혹은 Geom2d_Curve curves (in the plane)이다. Surface들은 Geom_Surface surface들이다. 지역 속성들이 계산되는 점은 curve 상의 u parameter, surface 상의 (u,v) parameter로 정의된다.
위에서 언급한 점들에 대한, 그리고 2D curve들에 대한 같은 지역 속성들이 query될 수도 있다.
- the points corresponding to a minimum or a maximum of curvature;
- the inflection points.
예제: surface가 오목한 지(convavity) 확인
- Sample the surface and compute at each point the Gaussian curvature.
- If the value of the curvature changes of sign, the surface is concave or convex depending on the point of view.
- To compute a Gaussian curvature, use the class SLprops from GeomLProp, which instantiates the generic class SLProps from LProp and use the method GaussianCurvature.
Continuity of Curves and Surfaces
curve와 surface에 대한 지원되는 연속성의 타입은 GeomAbs_Shape enumeration에서 정의된다.
curve:
- C0 (GeomAbs_C0) - parametric continuity. It is the same as G0 (geometric continuity), so the last one is not represented by separate variable.
- G1 (GeomAbs_G1) - tangent vectors on left and on right are parallel.
- C1 (GeomAbs_C1) - indicates the continuity of the first derivative.
- G2 (GeomAbs_G2) - in addition to G1 continuity, the centers of curvature on left and on right are the same.
- C2 (GeomAbs_C2) - continuity of all derivatives till the second order.
- C3 (GeomAbs_C3) - continuity of all derivatives till the third order.
- CN (GeomAbs_CN) - continuity of all derivatives till the N-th order (infinite order of continuity).

surface:
- C0 (GeomAbs_C0) - parametric continuity (the surface has no points or curves of discontinuity).
- G1 (GeomAbs_G1) - surface has single tangent plane in each point.
- C1 (GeomAbs_C1) - indicates the continuity of the first derivatives.
- G2 (GeomAbs_G2) - in addition to G1 continuity, principal curvatures and directions are continuous.
- C2 (GeomAbs_C2) - continuity of all derivatives till the second order.
- C3 (GeomAbs_C3) - continuity of all derivatives till the third order.
- CN (GeomAbs_CN) - continuity of all derivatives till the N-th order (infinite order of continuity).

단일 surface에 대해, 두 surface의 연결 (위 그림)은 각 교점(intersection point)에서만 연속성(continuity)을 정의한다. 연결의 smoothness는 교점의 연속성의 최소값이다.
Regularity of Shared Edges
edge의 regularity는 edge를 공유하는 두 face의 연결의 smoothness이다. 다시 말해, regularity는 edge의 각 점에서의 연결된 face들 간의 최소 연속성이다.
edge의 regularity는 BRep_Builder::Continuity 메소드로 설정될 수 있다. regularity를 얻으려면 BRep_Tool::Continuity 메소드를 사용한다.
Fillet 같은 어떤 알고리즘은 생성된 edge의 regularity를 그 자신의 알고리즘으로 설정한다. 반면, 일부 다른 알고리즘(Boolean Operations, Shape Healing 등)은 regularity를 설정하지 않는다. regularity를 shape에 올바르게 설정해야 하는 경우 BRepLib::EncodeRegularity 메서드를 사용할 수 있다. 이는 shape의 모든 edge에 대해 올바른 값을 계산하고 설정한다.
regularity flag가 다음 고수준 알고리즘에 의해 광범위하게 사용된다: Chamfer, Draft Angle, Hidden Line Removal, Gluer.
Global Properties of Shapes
Global Properties of Shapes 컴포넌트는 3D 공간의 composite geometric 시스템의 전역 속성들의 계산 알고리즘과 계산 결과를 query하는 framework를 제공한다.
전역 속성들:
- mass,
- mass center,
- matrix of inertia,
- moment about an axis,
- radius of gyration about an axis,
- principal properties of inertia such as principal axis, principal moments, and principal radius of gyration.
Geometric system들은 일반적으로 shape에 의해 정의된다. 분석되는 방식에 의존하여, 이 shape들은 다음의 속성들을 제공한다:
- lines induced from the edges of the shape,
- surfaces induced from the faces of the shape, or
- volumes induced from the solid bounded by the shape.
다양한 시스템의 전역 속성들을 종합하여 개별 시스템의 합으로 구성된 시스템의 전역 속성들을 제공할 수 있다.
Global Properties of Shapes 컴포넌트는 다음으로 구성된다:
- seven functions for computing global properties of a shape: one function for lines, two functions for surfaces and four functions for volumes. The choice of functions depends on input parameters and algorithms used for computation (BRepGProp global functions),
- a framework for computing global properties for a set of points (GProp_PGProps),
- a general framework to bring together the global properties retained by several more elementary frameworks, and provide a general programming interface to consult computed global properties.
Packages GeomLProp and Geom2dLProp는 curve와 surface들을 지역 속성을 계산하는 알고리즘들을 제공한다.
curve (1개 파라미터) :
- Point
- Derivative
- Tangent
- Normal
- Curvature
- Center of curvature.
surface (U, V의 2개 파라미터):
- point
- derivative for U and V)
- tangent line (for U and V)
- normal
- max curvature
- min curvature
- main directions of curvature
- mean curvature
- Gaussian curvature
다음 메소드 사용 가능:
- CLProps – calculates the local properties of a curve (tangency, curvature, normal);
- CurAndInf2d – calculates the maximum and minimum curvatures and the inflection points of 2d curves;
- SLProps – calculates the local properties of a surface (tangency, the normal and curvature).
- Continuity – calculates regularity at the junction of two curves.
B-spline curve와 surface는 허용되지만 원하는 연속성의 조작으로 잘리지 않는다. 이는 global continuity로 보여진다.
Adaptors for Curves and Surfaces
Open CASCADE 기술의 특정한 일반 알고리즘은 이론적으로 다양한 타입의 curve와 surface에 작동할 수 있다.
이를 위해서는, 분석된 curve나 surface의 요구되는 서비스를
이를 위해 curve나 surface의 타입에 관계없이 단일 API 인터페이스를 통해 분석된 곡선이나 표면에 필요한 서비스를 얻을 수 있다. 이러한 인터페이스를 adapter라고 한다.
예를 들어, Adaptor3d_Curve는 임의의 3D curve를 사용하는 알고리즘에 의해 요구되는 서비스를 제공하는 추상 클래스이다.
GeomAdaptor package는 다음 interface들을 제공한다:
- On a Geom curve;
- On a curve lying on a Geom surface;
- On a Geom surface;
Geom2dAdaptor package는 다음 interface들을 제공한다:
- On a Geom2d curve.
BRepAdaptor package는 다음 interface들을 제공한다:
- On a Face
- On an Edge
geometric objects에 대해 수행하는 알고리즘을 작성할 때는 Adaptor3d (or Adaptor2d) object를 사용하라.
이 object에 대해 Adaptor3d or Adaptor2d 에서 상속된 인터페이스를 제공한다면, 결과적으로, 어떤 종류의 object에 대한 알고리즘도 사용할 수 있다. 이 인터페이스는 사용하기 쉽다: 단순히 Geom2d curve로부터 adapted curve나 surface를 만들고, 알고리즘을 위한 argument로 adapted curve를 사용한다.
'programming > OpenCascade' 카테고리의 다른 글
| OpenCascade - User Guides - 2. Modeling Data - 7. Bounding boxes (0) | 2024.06.09 |
|---|---|
| OpenCascade - User Guides - 2. Modeling Data - 5. Topology (0) | 2024.06.06 |
| OpenCascade - User Guides - 2. Modeling Data - 4. 3D Geometry (0) | 2024.06.06 |
| OpenCascade - User Guides - 2. Modeling Data - 3. 2D Geometry (0) | 2024.06.06 |
| OpenCascade - User Guides - 2. Modeling Data - 2. Geometry Utilities (0) | 2024.06.06 |