OCCT_Introduction
原文链接: https://dev.opencascade.org/doc/overview/html/index.html#intro_overview_heal
Open CASCADE Technology
Welcome to Open CASCADE Technology (OCCT), a software development platform providing services for 3D surface and solid modeling, CAD data exchange, and visualization. Most of OCCT functionality is available in the form of C++ libraries. OCCT can be best applied in development of software dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
欢迎使用开放式CASCADE技术(OCCT),这是一个软件开发平台,为三维曲面和实体建模、CAD数据交换和可视化提供服务。OCCT的大部分功能都以C++库的形式提供。OCCT最适用于处理三维建模(CAD)、制造/测量(CAM)或数值模拟(CAE)的软件开发。
Overview 概述
Open CASCADE Technology (OCCT) is an object-oriented C++ class library designed for rapid production of sophisticated domain-specific CAD/CAM/CAE applications.
Open CASCADE Technology(OCCT)是一个面向对象的C++类库,用于快速生成复杂的特定领域CAD/CAM/CAE应用程序。
A typical application developed using OCCT deals with two or three-dimensional (2D or 3D) geometric modeling in general-purpose or specialized Computer Aided Design (CAD) systems, manufacturing or analysis applications, simulation applications, or even illustration tools.
使用OCCT开发的典型应用程序涉及通用或专用计算机辅助设计(CAD)系统、制造或分析应用程序、模拟应用程序甚至插图工具中的二维或三维(2D或3D)几何建模。
OCCT library is designed to be truly modular and extensible, providing C++ classes for:
- Basic data structures (geometric modeling, visualization, interactive selection and application specific services);
- Modeling algorithms;
- Working with mesh (faceted) data;
- Data interoperability with neutral formats (IGES, STEP);
OCCT库被设计成真正的模块化和可扩展的,提供C++类用于:
- 基本数据结构(几何建模、可视化、交互式选择和特定应用服务);
- 建模算法;
- 处理网格(分面)数据;
- 与中性格式的数据互操作性(IGES、STEP);
The C++ classes and other types are grouped into packages. Packages are organized into toolkits (libraries), to which you can link your application. Finally, toolkits are grouped into seven modules.
C++类和其他类型被分组到包中。包被组织成工具包(库),您可以将应用程序链接到这些工具包。最后,工具包分为七个模块。
This modular structure is illustrated in the diagram below.
该模块化结构如下图所示。
-
Foundation Classes module underlies all other OCCT classes;
-
Modeling Data module supplies data structures to represent 2D and 3D geometric primitives and their compositions into CAD models;
-
Modeling Algorithms module contains a vast range of geometrical and topological algorithms;
- Mesh toolkit from “Modeling Algorithms” module implements tessellated representations of objects;
-
Visualization module provides complex mechanisms for graphical data representation;
-
Data Exchange module inter-operates with popular data formats and relies on Shape Healing to improve compatibility between CAD software of different vendors;
-
Application Framework module offers ready-to-use solutions for handling application-specific data (user attributes) and commonly used functionality (save/restore, undo/redo, copy/paste, tracking CAD modifications, etc).
-
基础类模块是所有其他OCCT类的基础;
-
建模数据模块提供将2D和3D几何图元及其组合表示为CAD模型的数据结构;
-
建模算法模块包含大量几何和拓扑算法;
- “建模算法”模块中的网格工具包实现了对象的细分表示;
-
可视化模块为图形数据表示提供了复杂的机制;
-
数据交换模块与流行的数据格式互操作,并依赖形状修复来提高不同供应商的CAD软件之间的兼容性;
-
应用程序框架模块为处理特定于应用程序的数据(用户属性)和常用功能(保存/恢复、撤消/重做、复制/粘贴、跟踪CAD修改等)提供了现成的解决方案。
In addition, Open CASCADE Test Harness, also called Draw, provides an entry point to the library and can be used as a testing tool for its modules.
此外,Open CASCADE测试线束(也称为Draw)提供了库的入口点,可以用作其模块的测试工具。
Foundation Classes 基础类
Foundation Classes module contains data structures and services used by higher-level Open CASCADE Technology classes:
基础类模块包含高级开放式CASCADE技术类使用的数据结构和服务:
-
Primitive types, such as Boolean, Character, Integer or Real;
-
String classes that handle Unicode strings;
-
Collection classes that handle statically or dynamically sized aggregates of data, such as arrays, lists, queues, sets and hash tables (data maps).
-
Classes providing commonly used numerical algorithms and basic linear algebra calculations (addition, multiplication, transposition of vectors and matrices, solving linear systems etc).
-
Fundamental types like color, date and time information;
-
Primitive geometry types providing implementation of basic geometric and algebraic entities that define and manipulate elementary data structures.
-
Exception classes that describe situations, when the normal execution of program is abandoned;
-
基本类型,如布尔型、字符型、整型或实型;
-
处理Unicode字符串的字符串类;
-
处理静态或动态大小的数据聚合的集合类,如数组、列表、队列、集合和哈希表(数据映射)。
-
提供常用数值算法和基本线性代数计算(加法、乘法、向量和矩阵的换位、求解线性系统等)的课程。
-
基本类型,如颜色、日期和时间信息;
-
原始几何类型提供定义和操作基本数据结构的基本几何和代数实体的实现。
-
当程序的正常执行被放弃时,描述情况的异常类;
This module also provides a variety of general-purpose services, such as:
该模块还提供各种通用服务,例如:
-
Safe handling of dynamically created objects, ensuring automatic deletion of unreferenced objects (smart pointers);
-
Standard and specialized memory allocators;
-
Extended run-time type information (RTTI) mechanism maintaining a full type hierarchy and providing means to iterate over it;
-
Encapsulation of C++ streams;
-
Basic interpreter of expressions facilitating the creation of customized scripting tools, generic definition of expressions, etc.;
-
Tools for dealing with configuration resource files and customizable message files facilitating multi-language support in applications;
-
Progress indication and user break interfaces, giving a possibility even for low-level algorithms to communicate with the user in a universal and convenient way;
-
and many others…
-
安全处理动态创建的对象,确保自动删除未引用的对象(智能指针);
-
标准和专用内存分配器;
-
扩展运行时类型信息(RTTI)机制,维护完整的类型层次结构并提供对其进行迭代的方法;
-
C++流的封装;
-
表达式的基本解释器,有助于创建自定义脚本工具、表达式的通用定义等。;
-
用于处理配置资源文件和可定制消息文件的工具,促进应用程序中的多语言支持;
-
进度指示和用户中断界面,即使是低级算法也有可能以通用和方便的方式与用户进行通信;
-
以及其他许多。。。
See the details in Foundation Classes User’s Guide
请参阅《基础类用户指南》中的详细信息
Modeling Data 建模数据
Modeling Data supplies data structures to implement boundary representation (BRep) of objects in 3D. In BRep the shape is represented as an aggregation of geometry within topology. The geometry is understood as a mathematical description of a shape, e.g. as curves and surfaces (simple or canonical, Bezier, NURBS, etc). The topology is a data structure binding geometrical objects together.
建模数据提供数据结构以实现三维对象的边界表示(BRep)。在BRep中,形状表示为拓扑中几何体的聚合。几何体被理解为形状的数学描述,例如曲线和曲面(简单或规范、Bezier、NURBS等)。拓扑是将几何对象绑定在一起的数据结构。
Geometry types and utilities provide geometric data structures and services for:
几何类型和实用程序为以下对象提供几何数据结构和服务:
-
Description of points, vectors, curves and surfaces:
- their positioning in 3D space using axis or coordinate systems, and
- their geometric transformation, by applying translations, rotations, symmetries, scaling transformations and combinations thereof.
-
Creation of parametric curves and surfaces by interpolation and approximation;
-
Algorithms of direct construction;
-
Conversion of curves and surfaces to NURBS form;
-
Computation of point coordinates on 2D and 3D curves;
-
Calculation of extrema between geometric objects.
-
点、向量、曲线和曲面的描述:
- 使用轴或坐标系在3D空间中定位,以及
- 它们的几何变换,通过应用平移、旋转、对称、缩放变换及其组合。
-
通过插值和近似创建参数曲线和曲面;
-
直接构造算法;
-
将曲线和曲面转换为NURBS形式;
-
计算二维和三维曲线上的点坐标;
-
计算几何对象之间的极值。
Topology defines relationships between simple geometric entities. A shape, which is a basic topological entity, can be divided into components (sub-shapes):
拓扑定义简单几何图元之间的关系。形状是一个基本的拓扑实体,可以分为组件(子形状):
-
Vertex – a zero-dimensional shape corresponding to a point;
-
Edge – a shape corresponding to a curve and bounded by a vertex at each extremity;
-
Wire – a sequence of edges connected by their vertices;
-
Face – a part of a plane (in 2D) or a surface (in 3D) bounded by wires;
-
Shell – a collection of faces connected by edges of their wire boundaries;
-
Solid – a finite closed part of 3D space bounded by shells;
-
Composite solid – a collection of solids connected by faces of their shell boundaries;
-
Compound – a collection of shapes of arbitrary type.
-
顶点–与点相对应的零维形状;
-
边–与曲线相对应的形状,并在每个端点处以顶点为界;
-
Wire–由顶点连接的一系列边;
-
面–由导线界定的平面(二维)或曲面(三维)的一部分;
-
壳–通过其线边界的边缘连接的面的集合;
-
实体–三维空间中由壳限定的有限闭合部分;
-
复合实体–由其壳边界面连接的实体集合;
-
复合–任意类型形状的集合。
Complex shapes can be defined as assemblies (compounds) of simpler entities.
复杂形状可以定义为简单实体的组合(复合)。
See the details in Modeling Data User’s Guide
请参见建模数据用户指南中的详细信息
3D geometric models can be stored in OCCT native BREP format. See BREP Format Description White Paper for details on the format.
3D几何模型可以OCCT原生BREP格式存储。有关格式的详细信息,请参阅BREP格式说明白皮书。
Modeling Algorithms 建模算法
Modeling Algorithms module groups a wide range of topological and geometric algorithms used in geometric modeling. Basically, there are two groups of algorithms in Open CASCADE Technology:
- High-level modeling routines used in the real design;
- Low-level mathematical support functions used as a groundwork for the modeling API.
建模算法模块对几何建模中使用的各种拓扑和几何算法进行分组。基本上,开放式CASCADE技术有两组算法:
- 真实设计中使用的高级建模例程;
- 低级数学支持函数用作建模API的基础。
Low-level geometric tools provide the algorithms, which:
- Calculate the intersection of two curves, surfaces, or a curve and a surface;
- Project points onto 2D and 3D curves, points onto surfaces and 3D curves onto surfaces;
- Construct lines and circles from constraints;
- Construct free-form curves and surfaces from constraints (interpolation, approximation, skinning, gap filling, etc).
低级几何工具提供以下算法:
- 计算两条曲线、曲面或曲线与曲面的交点;
- 将点投影到2D和3D曲线上,将点投影在曲面上,将3D曲线投影到曲面上;
- 根据约束构造直线和圆;
- 根据约束(插值、近似、蒙皮、间隙填充等)构造自由曲线和曲面。
Low-level topological tools provide the algorithms, which:
- Tessellate shapes;
- Check correct definition of shapes;
- Determine the local and global properties of shapes (derivatives, mass-inertia properties, etc);
- Perform affine transformations;
- Find planes in which edges are located;
- Convert shapes to NURBS geometry;
- Sew connected topologies (shells and wires) from separate topological elements (faces and edges).
低级拓扑工具提供以下算法:
- 细化形状;
- 检查形状的正确定义;
- 确定形状的局部和全局特性(导数、质量惯性特性等);
- 执行仿射变换;
- 查找边所在的平面;
- 将形状转换为NURBS几何体;
- 从单独的拓扑元素(面和边)缝合连接的拓扑(壳和线)。
Top-level API provides the following functionality:
- Construction of Primitives:
- Boxes;
- Prisms;
- Cylinders;
- Cones;
- Spheres;
- Toruses.
- Kinematic Modeling:
- Prisms – linear sweeps;
- Revolutions – rotational sweeps;
- Pipes – general-form sweeps;
- Lofting.
顶级API提供以下功能:
- 基本要素的构造:
- 箱子;
- 棱镜;
- 气缸;
- 圆锥;
- 球体;
- 圆环。
- 运动学建模:
- 棱镜——线性扫描;
- 旋转–旋转扫掠;
- 管道——一般模板扫掠;
- 放样。
Shapes containing pipes with variable radius produced by sweeping
包含通过扫掠产生的具有可变半径的管道的形状
Boolean Operations, which allow creating new shapes from the combinations of source shapes. For two shapes S1 and S2:
- Common contains all points that are in S1 and S2;
- Fuse contains all points that are in S1 or S2;
- Cut contains all points in that are in S1 and not in S2.
See Boolean Operations User’s Guide for detailed documentation.
布尔运算,允许从源形状的组合中创建新形状。对于两种形状S1和S2:
- 公共包含S1和S2中的所有点;
- 保险丝包含S1或S2中的所有点;
- 切割包含S1中而不是S2中的所有点。
有关详细文档,请参阅布尔运算用户指南。
-
Algorithms for local modifications such as:
- Hollowing;
- Shelling;
- Creation of tapered shapes using draft angles;
- Algorithms to make fillets and chamfers on shape edges, including those with variable radius (chord).
-
Algorithms for creation of mechanical features, i.e. depressions, protrusions, ribs and grooves or slots along planar or revolution surfaces.
-
局部修改算法,如:
- 空心化;
- 外壳;
- 使用拔模角创建锥形形状;
- 在形状边上生成圆角和倒角的算法,包括具有可变半径(弦)的边。
-
创建机械特征的算法,即沿平面或旋转表面的凹陷、突起、肋和凹槽或槽。
See the details in Modeling Algorithms User’s Guide.
请参见建模算法用户指南中的详细信息。
Mesh 网格
Mesh toolkit provides the functionality to work with tessellated representations of objects in form of triangular facets. This toolkit contains:
- data structures to store surface mesh data associated to shapes and basic algorithms to handle them;
- data structures and algorithms to build triangular surface mesh from BRep objects (shapes);
- tools for displaying meshes with associated pre- and post-processor data (scalars or vectors).
网格工具包提供了使用三角形面片形式的对象细分表示的功能。此工具包包含:
- 存储与形状相关联的表面网格数据的数据结构和处理它们的基本算法;
- 从BRep对象(形状)构建三角形曲面网格的数据结构和算法;
- 用于显示具有相关的前置和后置处理器数据(标量或向量)的网格的工具。
Open CASCADE SAS also offers Advanced Mesh Products:
- Open CASCADE Mesh Framework (OMF)
- Express Mesh
Open CASCADE SAS还提供高级网格产品:
- 开放式CASCADE网格框架(OMF)
- 快速网眼布
Visualization 可视化
Visualization module provides ready-to-use algorithms to create graphic presentations from various objects: shapes, meshes, etc.
可视化模块提供了现成的算法,用于从各种对象(形状、网格等)创建图形演示。
In Open CASCADE Technology visualization is based on the separation of CAD data and its graphical presentation. The module also supports a fast and powerful interactive selection mechanism.
在开放式CASCADE技术中,可视化是基于CAD数据及其图形表示的分离。该模块还支持快速而强大的交互式选择机制。
Visualization module relies on the following key toolkits:
- TKV3d toolkit defines a high-level API called (Application Interactive Services* (AIS) for working with interactive objects.
- TKService toolkit defines a low-level API for managing and creating presentations from primitive arrays. This toolkit defines an abstraction layer for defining an arbitrary graphic driver responsible for actual rendering.
- TKOpenGl toolkit implements the graphic driver using OpenGL and OpenGL ES libraries.
可视化模块依赖于以下关键工具包:
- TKV3d工具包定义了一个名为(Application Interactive Services*(AIS)的高级API,用于处理交互式对象。
- TKService工具包定义了一个低级API,用于从原始数组管理和创建演示文稿。该工具包定义了一个抽象层,用于定义负责实际渲染的任意图形驱动程序。
- TKOpenGl工具包使用OpenGL和OpenGLES库实现图形驱动程序。
While low-level API operates with primitive arrays (triangles, lines, points), the higher level includes services for building presentations for B-Rep shapes (shaded and wireframe). A comprehensive list of standard interactive objects includes topological shape, mesh presentation, various dimensions, manipulators and others. It provides a solid basis for rapid application development, while flexible and extensible API allows development of highly customized application-specific presentations.
虽然低级API使用基本数组(三角形、直线、点)进行操作,但更高级的API包括为B-Rep形状(着色和线框)构建表示的服务。标准交互对象的全面列表包括拓扑形状、网格表示、各种尺寸、操纵器和其他。它为快速应用程序开发提供了坚实的基础,而灵活和可扩展的API允许开发高度定制的特定于应用程序的演示。
Here are a few examples of OCCT Visualization features:
- Camera-driven view projection and orientation. Perspective, orthographic and stereographic projections are supported.
- Support of Common (diffuse/ambient/specular) and PBR metallic-roughness material models.
- Possibility to flexibly adjust appearance of dimensions in a 3D view. The 3D text object represents a given text string as a true 3D object in the model space.
- Definition of clipping planes through the plane equation coefficients. Ability to define visual attributes for cross-section at the level or individual clipping planes. In the image below different parts of the rocket are clipped with different planes and hatched.
以下是OCCT可视化功能的几个示例:
- 相机驱动视图投影和方向。支持透视、正交和立体投影。
- 支持通用(漫反射/环境光/镜面反射)和PBR金属粗糙度材料模型。
- 可以灵活调整三维视图中尺寸的外观。3D文本对象将给定的文本字符串表示为模型空间中的真实3D对象。
- 通过平面方程系数定义裁剪平面。能够在级别或单个剪裁平面上定义横截面的视觉属性。在下图中,火箭的不同部分用不同的平面裁剪并加上阴影。
Display of shape cross-section and dimensions
显示形状横截面和尺寸
-
Support of built-in and application-specific GLSL shaders
-
支持内置和特定于应用程序的GLSL着色器
Fragment shader implementing custom clipping surface
片段着色器实现自定义剪裁曲面
-
Optimization of rendering performance through the algorithms of:
- View frustum culling, which skips the presentation outside camera at the rendering stage;
- Back face culling, which reduces the rendered number of triangles and eliminates artifacts at shape boundaries.
-
Real-time ray tracing technique using recursive Whitted’s algorithm and Bounded Volume Hierarchy effective optimization structure.
-
通过以下算法优化渲染性能:
- 视图平截头体剔除,在渲染阶段跳过摄像机外的演示;
- 背面剔除,减少了渲染的三角形数量,并消除了形状边界处的瑕疵。
-
使用递归Whitted算法和有界体积层次有效优化结构的实时光线跟踪技术。
Real time visualization by ray tracing method
射线追踪法实时可视化
Simulation of a glass cover
模拟玻璃盖
For more details, see Visualization User’s Guide.
有关详细信息,请参阅可视化用户指南。
The visualization of OCCT topological shapes by means of VTK library provided by VIS component is described in a separate VTK Integration Services User’s Guide.
通过VIS组件提供的VTK库可视化OCCT拓扑形状在单独的VTK集成服务用户指南中进行了描述。
Data Exchange 数据交换
Data Exchange allows developing OCCT-based applications that can interact with other CAD systems by writing and reading CAD models to and from external data.
数据交换允许开发基于OCCT的应用程序,通过向外部数据写入和读取CAD模型,这些应用程序可以与其他CAD系统交互。
Shape imported from STEP
从STEP导入的形状
Data Exchange is organized in a modular way as a set of interfaces that comply with various CAD formats: IGES, STEP, STL, VRML, etc. The interfaces allow software based on OCCT to exchange data with various CAD/PDM software packages, maintaining a good level of interoperability. This module handles various problems of interoperability between CAD systems, caused by differences in model validity criteria and requirements to internal representation.
数据交换以模块化的方式组织为一组符合各种CAD格式的接口:IGES、STEP、STL、VRML等。这些接口允许基于OCCT的软件与各种CAD/PDM软件包交换数据,保持良好的互操作性。本模块处理CAD系统之间互操作性的各种问题,这些问题是由模型有效性标准和内部表示要求的差异引起的。
-
Standardized Data Exchange interfaces allow querying and examining the input file, converting its contents to a CAD model and running validity checks on a fully translated shape. The following formats are currently supported:
- STEP (AP203: Mechanical Design, this covers General 3D CAD; AP214: Automotive Design; AP242).
- IGES (up to 5.3).
- glTF 2.0 reader and writer.
- OBJ mesh file reader and writer.
- VRML converter translates Open CASCADE shapes to VRML 1.0 files (Virtual Reality Modeling Language).
- STL converter translates Open CASCADE shapes to STL files. STL (STtereoLithography) format is widely used for rapid prototyping (3D printing).
-
Extended data exchange (XDE) allows translating additional attributes attached to geometric data (colors, layers, names, materials etc).
-
Advanced Data Exchange Components are available in addition to standard Data Exchange interfaces to support interoperability and data adaptation (also using Shape Healing) with CAD software using the following proprietary formats:
- ACIS SAT
- Parasolid
- DXF
- IFC
- JT
-
标准化的数据交换接口允许查询和检查输入文件,将其内容转换为CAD模型,并对完全转换的形状进行有效性检查。当前支持以下格式:
- STEP(AP203:机械设计,包括通用3D CAD;AP214:汽车设计;AP242)。
- IGES(最高5.3)。
- glTF 2.0读写器。
- OBJ网格文件读取器和写入器。
- VRML转换器将Open CASCADE形状转换为VRML 1.0文件(虚拟现实建模语言)。
- STL转换器将Open CASCADE形状转换为STL文件。STL(STtereoLithography)格式广泛用于快速成型(3D打印)。
-
扩展数据交换(XDE)允许转换附加到几何数据的附加属性(颜色、图层、名称、材质等)。
-
除了标准数据交换接口之外,还提供了高级数据交换组件,以支持CAD软件的互操作性和数据适配(也使用形状修复),该软件使用以下专有格式:
- ACIS SAT
- Parasolid
- DXF
- IFC
- JT
These components are based on the same architecture as interfaces with STEP and IGES.
这些组件基于与STEP和IGES接口相同的体系结构。
Shape Healing 形状修复
Shape Healing library provides algorithms to correct and adapt the geometry and topology of shapes imported to OCCT from other CAD systems.
形状修复库提供了算法,用于纠正和调整从其他CAD系统导入OCCT的形状的几何和拓扑。
Shape Healing algorithms include, but are not limited to, the following operations:
形状修复算法包括但不限于以下操作:
-
Analyze shape characteristics and, in particular, identify the shapes that do not comply with OCCT geometry and topology validity rules by analyzing geometrical objects and topology:
- check edge and wire consistency;
- check edge order in a wire;
- check the orientation of face boundaries;
- analyze shape tolerances;
- identify closed and open wires in a boundary.
-
Fix incorrect or incomplete shapes:
-
provide consistency between a 3D curve and its corresponding parametric curve;
-
repair defective wires;
-
fit the shapes to a user-defined tolerance value;
-
fill gaps between patches and edges.
-
Upgrade and change shape characteristics:
- reduce curve and surface degree;
- split shapes to obtain C1 continuity;
- convert any types of curves or surfaces to Bezier or B-Spline curves or surfaces and back;
- split closed surfaces and revolution surfaces.
-
分析形状特征,特别是通过分析几何对象和拓扑来识别不符合OCCT几何和拓扑有效性规则的形状:
- 检查边缘和金属丝的一致性;
- 检查导线中的边缘顺序;
- 检查面边界的方向;
- 分析形状公差;
- 识别边界中的闭合导线和开放导线。
-
修复不正确或不完整的形状:
- 提供3D曲线与其对应的参数曲线之间的一致性;
- 修理有缺陷的电线;
- 使形状符合用户定义的公差值;
- 填充面片和边之间的间隙。
-
升级和更改形状特征:
- 降低曲线和曲面度;
- 分割形状以获得C1连续性;
- 将任何类型的曲线或曲面转换为贝塞尔曲线或B样条曲线或曲面,然后返回;
- 分割闭合曲面和旋转曲面。
Each sub-domain of Shape Healing has its own scope of functionality:
形状修复的每个子域都有自己的功能范围:
Sub-domain | Description | Impact on the shape |
---|---|---|
Analysis | Explores shape properties, computes shape features, detects violation of OCCT requirements. | The shape itself is not modified. |
Fixing | Fixes the shape to meet the OCCT requirements. | The shape may change its original form: modification, removal or creation of sub-shapes, etc.) |
Upgrade | Improves the shape to fit some particular algorithms. | The shape is replaced with a new one, but geometrically they are the same. |
Customization | Modifies the shape representation to fit specific needs. | The shape is not modified, only the mathematical form of its internal representation is changed. |
Processing | Mechanism of shape modification via a user-editable resource file. |
子域 | 描述 | 对形状的影响 |
---|---|---|
分析 | 探索形状属性,计算形状特征,检测违反OCCT要求的情况。 | 形状本身不会被修改 |
固定 | 固定形状以满足OCCT要求。 | 形状可能会更改其原始形状:修改、删除或创建子形状等) |
升级 | 改进形状以适应某些特定算法。 | 形状被替换为新的形状,但在几何上它们是相同的 |
自定义 | 修改形状表示以满足特定需要。 | 形状不会被修改,只会改变其内部表示的数学形式 |
处理 | 通过用户可编辑的资源文件修改形状的机制。 |
For more details, refer to Shape Healing User’s guide.
有关详细信息,请参阅《形状修复用户指南》。
Application Framework 应用程序框架
Open CASCADE Application Framework (OCAF) handles Application Data basing on the Application/Document paradigm. It uses an associativity engine to simplify the development of a CAD application thanks to the following ready-to-use features and services:
开放式CASCADE应用程序框架(OCAF)基于应用程序/文档范式处理应用程序数据。它使用关联引擎简化CAD应用程序的开发,这得益于以下即用功能和服务:
-
Data attributes managing the application data, which can be organized according to the development needs;
-
Data storage and persistence (open/save);
-
Possibility to modify and recompute attributes in documents. With OCAF it is easy to represent the history of modification and parametric dependencies within your model;
-
Possibility to manage multiple documents;
-
Predefined attributes common to CAD/CAM/CAE applications (e.g. to store dimensions);
-
Undo-Redo and Copy-Paste functions.
-
管理应用程序数据的数据属性,可根据开发需要进行组织;
-
数据存储和持久性(打开/保存);
-
可以修改和重新计算文档中的属性。使用OCAF,可以很容易地表示模型中的修改历史和参数依赖关系;
-
可以管理多个文档;
-
CAD/CAM/CAE应用程序通用的预定义属性(例如存储尺寸);
-
撤消重做和复制粘贴功能。
Since OCAF handles the application structure, the only development task is the creation of application-specific data and GUIs.
由于OCAF处理应用程序结构,唯一的开发任务是创建特定于应用程序的数据和GUI。
OCAF differs from any other CAD framework in the organization of application data, as there the data structures are based on reference keys rather than on shapes. In a model, such attributes as shape data, color and material are attached to an invariant structure, which is deeper than the shapes. A shape object becomes the value of Shape attribute, in the same way as an integer number is the value of Integer attribute and a string is the value of Name attribute.
OCAF在应用程序数据的组织方面不同于任何其他CAD框架,因为数据结构基于参考键而不是形状。在模型中,形状数据、颜色和材质等属性附加到比形状更深的不变结构。形状对象成为“形状”属性的值,这与整数是“整数”属性值,字符串是“名称”属性值相同。
OCAF organizes and embeds these attributes in a document. OCAF documents, in their turn, are managed by an OCAF application.
OCAF将这些属性组织并嵌入到文档中。OCAF文档则由OCAF应用程序管理。
For more details, see OCAF User’s Guide.
有关详细信息,请参阅OCAF用户指南。
Draw Test Harness
Test Harness or Draw is a convenient testing tool for OCCT libraries. It can be used to test and prototype various algorithms before building an entire application. It includes:
测试线束或绘图是OCCT库的一种方便的测试工具。它可以用于在构建整个应用程序之前测试和原型化各种算法。它包括:
-
A command interpreter based on the TCL language;
-
A number of 2D and 3D viewers;
-
A set of predefined commands.
-
基于TCL语言的命令解释器;
-
许多2D和3D观众;
-
一组预定义的命令。
The viewers support operations such as zoom, pan, rotation and full-screen views.
查看器支持缩放、平移、旋转和全屏视图等操作。
The basic commands provide general-purpose services such as:
基本命令提供通用服务,例如:
-
Getting help;
-
Evaluating a script from a file;
-
Capturing commands in a file;
-
Managing views;
-
Displaying objects.
-
获得帮助;
-
从文件中评估脚本;
-
捕获文件中的命令;
-
管理视图;
-
显示对象。
In addition, Test Harness provides commands to create and manipulate curves and surfaces (geometry) and shapes, access visualization services, work with OCAF documents, perform data exchange, etc.
此外,测试线束还提供创建和操纵曲线和曲面(几何图形)和形状、访问可视化服务、使用OCAF文档、执行数据交换等命令。
You can add custom commands to test or demonstrate any new functionalities, which you develop.
您可以添加自定义命令来测试或演示您开发的任何新功能。
For more details, see Draw Test Harness Manual.
有关详细信息,请参见绘制测试线束手册。