OpenNurbs是一个开源的读、写3dm文件的开发工具包。这里介绍使用gismo中的opennurbs进行3dm和xml文件格式间的转换。
#!bin/sh
echo "output plate with hole"
step 1. 读入3dm文件转化为xml
/home/yangsuse/code/gismo-build/bin/gsReadWrite_test /home/yangsuse/code/patch_test_square.3dm
step 2. 将xml转化为3dm文件前,需要使用makeMultiPatch程序添加边界信息
/home/yangsuse/code/gismo-build/bin/gsMakeMultiPatch /home/yangsuse/code/dump_write.xml
step3. 将xml文件转化为3dm文件;
/home/yangsuse/code/gismo-build/bin/gsReadWrite_test /home/yangsuse/code/makeMultipatch_output.xml
注意:
在CMAKE生成项目时,打开GISMO_WITH_ONURBS选项;
1. gsView 项目
Hi, give me a file (.txt, .axl) and I will try to draw it!
Usage:
--controlNet
Plot the control net (when applicable)
--element
Plot the element mesh (when applicable)
-s <int>, --samples <int>
Number of samples to use for viewing
--basis
Try to find and plot a basis contained in the file
--mesh
Try to find and plot a mesh contained in the file
--geometry
Try to find and plot a geometry contained in the file
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
<string>
File containing data to draw (.xml, .axl, .txt)
gsView可以由xml文件,画出控制网,单元,基函数,网格等数据;
2. gsReadWrite_test 项目
读入一个3dm文件,转化为dump_write.xml文件。
读入一个xml文件,
3. 多片几何的排序和边界的排序