# STEP express schema to OCCT classes
## 1. Introduction
**ExpToCasExe** is an auxiliary tool to generate code for implementation
of new STEP entities into OCCT.
This tool consists of two packages: **ExpToCasExe** and **TKExpress**.
*ExpToCasExe* package is the basic package for generation.
It parses the express schema, makes a list of entities described in the schema,
and starts generating classes according to the specified lists.
This package has the file *occt_existed_step_entities.lst* witch contains list
of STEP entities implemented in *OCCT* at this moment.
*TKExpress* package generates files with description of the STEP entities
to use in *OCCT* taking into account their dependencies.
Below is a set of generated files using the example
of the *Condition* entity from the *StepAP214* package.
* **StepAP214_Condition.hxx** - contains declaration of the class that describes STEP entity
* **StepAP214_Condition.cxx** - contains definition of the class that describes STEP entity
* **RWStepAP214_RWCondition.hxx** - contains declaration of the class that reads (writes) STEP entity from STEP file
* **RWStepAP214_RWCondition.cxx** - contains definition of the class that reads (writes) STEP entity from STEP file
* **category.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_GeneralModule.cxx* file
* **fillshared.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_GeneralModule.cxx* file
* **inc.txt** - common file for all generated entities with part of code to insert to *StepAP214_Protocol.cxx*
* **newvoid.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_GeneralModule.cxx* file
* **protocol.txt** - common file for all generated entities with part of code to insert to *StepAP214_Protocol.cxx* file
* **readstep.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file
* **reco.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file
* **rwinc.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file
* **steptype.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file
* **typebind.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file
* **writestep.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file
## 2. Build
The build process is automated, but has some specifics. *ExpToCasExe* package contains file *exptocas.lex*
which contains rules for lexical analyzer builder (*FLEX*), and file *exptocas.yacc*
which contains rules for syntax analyzer builder (*GNU Bison*).
During build process *FLEX* and *Bison* generate the next files:
* FlexLexer.h
* lex.exptocas.cxx
* exptocas.tab.cxx
* exptocas.tab.hxx
These files are placed to the source directory ("*src/ExpToCasExe*") due to *CMAKE* script specific.
Then standard Visual Studio build process continues.
There is no necessary to include these files to the *git* repository, due to automatic generation.
To change the behaviour of Express schema parser, the user need to modify original files:
*exptocas.lex* and *exptocas.yacc*.
## 3. Usage
**ExpToCasExe** program has the following call pattern:
~~~~
> ExpToCasExe <schema.exp> [<new.lst> [<existed.lst> [start_index]]]
~~~~
where:
* **schema.exp** - file with STEP Express schema
* **new.lst** - file with list of new STEP entities which we have to generate
* **existed.lst** - file with list of already implemented STEP entities
* **start_index** - a first index for entity registration
(value of it you can receive after analyse of *StepAP214_Protocol.cxx* file)
If *new.lst* file is set to "-" then all entities from Express schema are considered as new.
*new.lst* and *existed.lst* are the text files. Line in file describes the class name
of STEP entity and to witch *OCCT* package it's belong. Line has the following format:
~~~~
item_name package_name [shortname [check_flag(0 or 1) [fillshared_flag(0 or 1) [category]]]]
~~~~
where:
* **item_name** is the class name of the STEP entity (*ProductDefinitionOrReference* for example)
* **package_name** is the name of the *OCCT* package (*StepBasic* for example)
* **shortname** is the short name of the STEP entity
* **check_flag** is the flag to generate the *Check* function in the class
* **fillshared_flag** is the flag to generate the *FillShared* function in the class
* **category** is the name of category to witch entity belongs to
These file can include comments after the symbol "#".
The result of generation consists of several folders:
* two folders (*\_package_name\_* and *RW\_package_name\_*) for each package for which new entities were generated.
* a folder *Registration* with *\*.txt* files with code to copy into common files (see the example in the first section).
For generation, it is easy to copy to separate directory following files:
* **ExpToCasExe.exe**, **TKernel.dll** and **TKExpress.dll** from OCCT
* STEP Express schema
* **occt_existed_step_entities.lst** from package *ExpToCasExe*
create a file with needed entities **new.lst** and from this directory execute command:
~~~~
> ExpToCasExe.exe schema.exp new.lst occt_existed_step_entities.lst 1000
~~~~
## 4. Disclaimer
**NOTE**:
Some STEP schemes may be not fully corresponded to the rules which set in our generator.
If during generation we receive a message about syntax error you can try to edit schema
file in order to avoid it. Such approach is reasonable if number of errors is small.
If there are many errors we have to change existed rules (for debug parser process you can
uncomment string "//aScanner.set_debug(1);" in the file *exptocas.yacc*).
TIP: remove upper case from name after SCHEMA key word.
**NOTE**:
Please, take into account that most of existed entities were generated many years ago.
Some of them can be not corresponded to last versions of schemes.
For example, we don't have classes for entity:
~~~~
ENTITY founded_item
SUPERTYPE OF ((ONEOF(b_spline_curve_knot_locator, b_spline_curve_segment, b_spline_surface_knot_locator,
b_spline_surface_patch, b_spline_surface_strip,
boundary_curve_of_b_spline_or_rectangular_composite_surface, box_domain,
character_glyph_style_outline, character_glyph_style_stroke, composite_curve_segment,
composite_curve_transition_locator, curve_style, curve_style_font, curve_style_font_and_scaling,
curve_style_font_pattern, externally_defined_style, fill_area_style,
interpolated_configuration_segment, kinematic_path_segment, plane_angle_and_length_pair,
plane_angle_and_ratio_pair, point_style, presentation_style_assignment,
rectangular_composite_surface_transition_locator, surface_patch, surface_side_style,
surface_style_boundary, surface_style_control_grid, surface_style_fill_area,
surface_style_parameter_line, surface_style_segmentation_curve, surface_style_silhouette,
surface_style_usage, symbol_style, text_style, view_volume)) ANDOR
(ONEOF(character_glyph_style_outline, character_glyph_style_stroke, curve_style, curve_style_font,
curve_style_font_and_scaling, curve_style_font_pattern, externally_defined_style,
fill_area_style, point_style, presentation_style_assignment, surface_side_style,
surface_style_boundary, surface_style_control_grid, surface_style_fill_area,
surface_style_parameter_line, surfa
没有合适的资源?快使用搜索试试~ 我知道了~
OGG是一款软件提供3D曲面和实体建模、CAD服务的开发平台 数据交换和可视化 大多数OGG功能可在C++库的形式
共2000个文件
hxx:837个
cxx:494个
h:146个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 133 浏览量
2024-05-02
15:16:26
上传
评论
收藏 64.12MB ZIP 举报
温馨提示
OGG 是一款软件 提供 3D 曲面和实体建模、CAD 服务的开发平台 数据交换和可视化。大多数 OGG 功能可在 C++ 库的形式。OGG可以最好地应用于软件开发 处理 3D 建模 (CAD)、制造/测量 (CAM) 或数值 仿真 (CAE)。OGG 被设计为OCCT的直接替代品,具有更多 功能、更少的错误和更好的性能。OCCT是OGG的基地,是Matra Datavision公司的产品。
资源推荐
资源详情
资源评论
收起资源包目录
OGG是一款软件提供3D曲面和实体建模、CAD服务的开发平台 数据交换和可视化 大多数OGG功能可在C++库的形式 (2000个子文件)
ExprIntrp.tab.c 59KB
lex.ExprIntrp.c 54KB
structiges.c 10KB
analiges.c 8KB
liriges.c 5KB
Resource_ConvertUnicode.c 5KB
igesread.c 4KB
occt_toolkit_prepare_tool.cmake 187B
GeomSources.cpp 174KB
ModelingDoc.cpp 167KB
GeometryDoc.cpp 46KB
WasmOcctView.cpp 35KB
ImportExport.cpp 30KB
mainwindow.cpp 29KB
DimensionDlg.cpp 24KB
OCCTProxy.cpp 24KB
OCCTProxyD3D.cpp 23KB
delabella.cpp 23KB
OCC_3dBaseDoc.cpp 17KB
graphwidget.cpp 16KB
SelectionDialog.cpp 15KB
MainPage.xaml.cpp 14KB
AISDialogs.cpp 14KB
HLRView3D.cpp 12KB
OCC_BaseView.cpp 12KB
GlfwOcctView.cpp 10KB
ISession2D_Shape.cpp 9KB
OCC_2dView.cpp 9KB
OCC_2dViewRD.cpp 8KB
ImportExportDoc.cpp 8KB
OCC_3dView.cpp 7KB
node.cpp 7KB
OCC_StereoConfigDlg.cpp 7KB
OCC_App.cpp 6KB
HLRDoc.cpp 5KB
GlfwOcctWindow.cpp 5KB
AngleParamsVerticesPage.cpp 5KB
ColoredMeshDlg.cpp 5KB
LengthParamsEdgesPage.cpp 5KB
edge.cpp 5KB
LengthParamsVerticesPage.cpp 5KB
ConeDriver.cpp 5KB
App.xaml.cpp 4KB
HLRApp.cpp 4KB
ImportExportApp.cpp 4KB
ISession2D_Curve.cpp 4KB
OCC_MainFrame.cpp 4KB
RadiusParamsPage.cpp 4KB
Winmain.cpp 4KB
ParamsFacesPage.cpp 4KB
GeometryApp.cpp 4KB
ISession_Direction.cpp 4KB
LengthParamsEdgePage.cpp 4KB
FThread.cpp 3KB
CircularGrid.cpp 3KB
CylinderDriver.cpp 3KB
MainFrm.cpp 3KB
RectangularGrid.cpp 3KB
main.cpp 3KB
ModelingApp.cpp 3KB
main.cpp 2KB
SaveSTEPDlg.cpp 2KB
SimpleDriver.cpp 2KB
OCC_BaseDoc.cpp 2KB
OCC_ChildFrame.cpp 2KB
ResultDialog.cpp 2KB
ChildFrm.cpp 2KB
OCC_3dDoc.cpp 2KB
CircleDriver.cpp 2KB
OCC_2dDoc.cpp 2KB
ChildFrm2d.cpp 2KB
PrismDriver.cpp 2KB
OCC_BaseChildFrame.cpp 2KB
BaseDriver.cpp 2KB
ISession_Direction.cpp 2KB
ShapeSaverDriver.cpp 2KB
OCC_3dChildFrame.cpp 2KB
GeometryView2D.cpp 2KB
mfcsample.cpp 1KB
ISession_Point.cpp 1KB
ColoredShapes.cpp 1KB
GeometryView.cpp 1KB
main.cpp 1KB
ISession_Surface.cpp 1KB
PointDriver.cpp 1KB
OCC_2dChildFrame.cpp 1KB
HLRView2D.cpp 1KB
ISession_Curve.cpp 1024B
StdAfx.cpp 222B
StdAfx.cpp 210B
StdAfx.cpp 206B
StdAfx.cpp 201B
pch.cpp 103B
StdAfx.cpp 31B
BRepBuilderAPI_Sewing.cxx 168KB
Standard_Strtod.cxx 156KB
Graphic3d_ShaderManager.cxx 91KB
Graphic3d_Camera.cxx 70KB
BRepCheck_Wire.cxx 61KB
Graphic3d_CView.cxx 53KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6713
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功