본문 바로가기

programming/OpenCascade

OpenCascade - User Guides - 2. Modeling Data - 4. 3D Geometry

Geom package는 geometric objects in 3d space와  identity, rotation, translation, mirroring, scale transformations, combinations of transformations 같은 모든 기본적인 geometric transformations 제공.

geometric object의 참조 정의에 의존하는 특수 함수들 (addition of a control point on a B-Spline curve,modification of a curve..)

 

다음 클래스 제공:

  • description of points, vectors, curves and surfaces,
  • positioning in 3D space using axis or coordinate systems
  • geometric transformation, by applying translations, rotations, symmetries, scaling transformations and combinations.

다음 객체 사용 가능.

  • Point
  • Cartesian point
  • Vector
  • Direction
  • Vector with magnitude
  • Axis
  • Curve
  • Line
  • Conic: circle, ellipse, hyperbola, parabola
  • Offset curve
  • Elementary surface: plane, cylinder, cone, sphere, torus
  • Bounded curve: trimmed curve, NURBS curve, Bezier curve
  • Bounded surface: rectangular trimmed surface, NURBS surface,Bezier surface
  • Swept surface: surface of linear extrusion, surface of revolution
  • Offset surface.

curve와 surface는 parametric equation 제공;

  • the point of parameter u on a curve, or
  • the point of parameters (u, v) on a surface. together with the derivative vectors of order 1, 2, ... N at this point.

Geom curves and surfaces는  parameterization과 orientation 이 있으나, gp package는 그렇지 않다.

gp 객체와의 conversion도 제공한다.

 

더 복잡한 curve와 surface도 제공;

  • Bezier and BSpline curves and surfaces,
  • swept surfaces, for example surfaces of revolution and surfaces of linear extrusion,
  • trimmed curves and surfaces, and
  • offset curves and surfaces.

다단계의 상속구조에 따라 조직화된다.

추상 클래스로부터의 상속 구조;

Geom_SphericalSurface : Geom_ElementarySurface

Geom_BezierSurface : Geom_BoundedSurface

curves, points, vectors : Geom_Geometry

 

TColGeom package : object set

curve의 1D, 2D array와 sequences 제공

  • handled by reference
  • handled by value.

Geom package는 gp package로 아래 작업을 수행;

  • implement elementary algebraic calculus and basic analytic geometry,
  • describe geometric transformations which can be applied to Geom objects,
  • describe the elementary data structures of Geom objects.

Geom package는 데이터 구조만 제공함.

알고리즘은 GC package가 제공.