【CAD开发】3dxml文件格式开发准备
  I6bYKJOwynuQ 2023年11月02日 132 0


文章目录

  • 1、简介
  • 2、3DXML查看工具
  • 2.1 3DXML Player
  • 2.2 Pixyz Studio
  • 3、3DXML 开发用户手册
  • 3.1 Model_3dxml
  • 3.2 Model_3dxml/Header
  • 3.3 Model_3dxml/ProductStructure
  • 3.4 ProductStructureType/Reference3D
  • 3.5 ProductStructureType/Instance3D
  • 3.6 ProductStructureType/ReferenceRep
  • 3.7 ProductStructureType/InstanceRep
  • 3.8 RepresentationFormatType
  • 4、3DXML文件结构组成
  • 5、FAQ
  • 5.1 catia导出3dxml的参数设置
  • 5.2 catia的3dxml中模型格式
  • 结语

1、简介

​https://www.3ds.com/3ds-passport/downloads/​

3DXML (dassault systemes 3d xml file)文件格式是一种重要的轻量化CAD数据格式.

3D XML (EXtensible Markup Language) is a universal, lightweight, XML-based format that enables users to capture and share live, accurate 3D data quickly and easily.
3D XML compresses highly complex data, provides rapid file transmission and shorter load times while maintaining the exact geometry of the files exchanged.

Unlike existing formats, 3D XML is fully based on standard XML. Therefore, any software program will be able to read, write, and enrich 3D XML contents using standard tools.

With 3D XML, the use of sophisticated 3D graphics is no longer restricted to engineering departments. These graphics can now easily be incorporated into technical documentation, maintenance manuals, marketing brochures, websites, email communications and many other everyday uses.

 【CAD开发】3dxml文件格式开发准备_3drep


什么是 3DXML 文件?

  • 3DXML 文件包含信息丰富的 3D 图像模型。这些细节可能包括核心几何形状、网格形状、纹理和照明效果。法国公司 Dassault 开发了 3DXML 文件格式,该格式以其准确性、复杂性和跨行业的广泛使用而闻名。
  • 理解 3DXML 的最佳方式是拆分名称 — 3DXML 文件是 3D 的 XML 文件。XML 是一种简单的基于文本的格式,它提供了一个核心,有助于使 3DXML 文件高度可压缩(尤其是作为 zip 文件)。这反过来又使文件易于共享和嵌入 - 并且加载速度快。
  • 尽管如此,3DXML 很复杂,包含曲面、边、顶点、权重、图像和对象的组合。此信息保存在二进制代码中——使用 1 和 0 对数据进行编码的双符号系统。
  • 确保不要将 3DXML 与 X3D(另一个基于 XML 的 3D 建模文件)混淆。
  • 3DXML 文件起源于 Dassault Systèmes,该公司成立于 1920 年代后期,最初在第二次世界大战期间制造飞机。1981 年,一家工业制造子公司从 Dassault Aviation 中分离出来,并开发了一种复杂的计算机辅助绘图 (CAD) 程序,该程序很快被制造业采用。
  • 3DXML 文件高级 CAD 图像(具有纹理、照明和拓扑等元素)并允许大规模共享。它还使 CAD 图像更小、更易于传输,此外还简化了将 3D 图像插入文本文件的过程。
  • 达索为压缩设计了 3DXML。将它们转换为标准 zip 文件很容易。图像的表面数据存储为所谓的 Gregory 补丁 ——一种有效的几何定义形式。这些面片被重新解释回网格表面上的面。您可以在电子邮件、网站、文档中以及作为附件共享 3DXML 文件。

 【CAD开发】3dxml文件格式开发准备_3dxml_02

3DXML 文件的优点:

  • 快速高效。3DXML 重量轻且易于交换。压缩后,您可以一次发送多个。虽然复杂而精确,但它们的加载时间却是出了名的快。作为 zip 文件,您可以将它们拖放到许多应用程序中。
  • .xml _ 可扩展标记语言是基于文本的代码,对于 Microsoft 记事本来说足够简单。它以干净的结构存储数据,因此各种程序都可以对其进行读写。这使得调整和编辑 3DXML 文件更加容易。
  • 原生标准化。Dassault Systèmes 与其他行业协商改进了 3DXML 文件,但它也在其整个程序线中采用了该格式。如果您使用任何 Dassault 程序,您会发现 3DXML 运行顺畅。

2、3DXML查看工具

2.1 3DXML Player

Get your 3D XML player here to visualize 3D XML content in a
standalone application or embedded in your web browser.

Dassault Systèmes 3D XML 规范和播放器可以快速查看和调整信息丰富的 3D 模型。

 【CAD开发】3dxml文件格式开发准备_3drep_03


 【CAD开发】3dxml文件格式开发准备_3drep_04

  • 在ie浏览器中运行这个控件

    3DXMLPlayer.html:
<html>
<head>
<title>3D XML Player</title>
</head>
<body style="overflow: hidden;">
<script type="text/javascript" src="jscript/3DViewer.js"></script>
<script type="text/javascript" src="jscript/3DViewerExtension.js"></script>

<table width='100%' height='100%'>
<tr colspan=3 height='10%'>
<td></td>
</tr>
<tr height='80%'>
<td width='10%'></td>
<td width='80%' id='container'></td>
<td width='10%'></td>
</tr>
<tr colspan=3 height='10%'>
<td></td>
</tr>
</table>

<script type="text/javascript">
createViewer("container", "viewer", "model/Sample.3dxml");
</script>

</body>
</html>


 【CAD开发】3dxml文件格式开发准备_cad_05

2.2 Pixyz Studio

Pixyz Studio是一款独特的3D数据准备工具,提供一流的曲面细分和优化算法,能够将几乎所有行业领先的CAD解决方案中的CAD数据转换为轻量级,优化的网格,随时可以导出。
Pixyz Studio具有符合人体工程学和直观的用户界面,提供了一个强大而强大的查看器,是显示大量复杂3D数据所必需的。

 【CAD开发】3dxml文件格式开发准备_xml_06


  • Import
  •  【CAD开发】3dxml文件格式开发准备_3dxml_07


  • Export
  •  【CAD开发】3dxml文件格式开发准备_xml_08

  • 加载一个3dxml文件。

使用Pixyz Studio导入和处理CAD数据时,将保留原始CAD文件中包含的所有信息的完整性:产品结构(层次结构),原始CAD曲面(BRep / Nurbs),材质分配和外观,PMI和所有类型的元数据。

 【CAD开发】3dxml文件格式开发准备_3dxml_09

  • 通过python脚本导出模型树信息到本地xml文件

Pixyz Studio还附带了一个Python API,可通过嵌入式脚本编辑器访问,允许高级用户创建功能强大的脚本和插件来自动执行复杂的数据准备任务(除了用于批处理的导入/导出功能,仅限于Pixyz Batch产品)。

 【CAD开发】3dxml文件格式开发准备_3drep_10

3、3DXML 开发用户手册

3D_XML_User_Guide_4.3.pdf:

The 3D XML format is used across all of Dassault Systèmes brands – CATIA, DELMIA, ENOVIA,
SIMULIA, 3DVIA, SolidWorks and Virtools. 3D XML format specification is part of “3D For All”
initiative for bringing 3D to the masses. Dassault Systemes currently offers a free 3D XML Player
for use with the 3DXML format as well as tools to capture 3D from other sources (3D PrintScreen).
The offering will continue to grow.

 【CAD开发】3dxml文件格式开发准备_xml_11

3.1 Model_3dxml

 【CAD开发】3dxml文件格式开发准备_cad_12

3.2 Model_3dxml/Header

 【CAD开发】3dxml文件格式开发准备_cad_13

3.3 Model_3dxml/ProductStructure

 【CAD开发】3dxml文件格式开发准备_3drep_14

3.4 ProductStructureType/Reference3D

 【CAD开发】3dxml文件格式开发准备_cad_15

3.5 ProductStructureType/Instance3D

 【CAD开发】3dxml文件格式开发准备_3dxml_16

3.6 ProductStructureType/ReferenceRep

 【CAD开发】3dxml文件格式开发准备_xml_17

3.7 ProductStructureType/InstanceRep

 【CAD开发】3dxml文件格式开发准备_3drep_18

3.8 RepresentationFormatType

<xs:simpleType name="RepresentationFormatType">
<xs:annotation>
<xs:documentation>Types of formats for representation object</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="UVR">
<xs:annotation>
<xs:documentation>Default Geometrical representation</xs:documentation>
</xs:annotation>
</xs:pattern>
<xs:pattern value="TECHREP">
<xs:annotation>
<xs:documentation>Technological representation format</xs:documentation>
</xs:annotation>
</xs:pattern>
<xs:pattern value="TESSELLATED">
<xs:annotation>
<xs:documentation>Tessellated geometrical format (Binary or XML)</xs:documentation>
</xs:annotation>
</xs:pattern>
<xs:pattern value="BEHAVIORAL">
<xs:annotation>
<xs:documentation>behavioral representation format</xs:documentation>
</xs:annotation>
</xs:pattern>
<xs:pattern value=".*">
<xs:annotation>
<xs:documentation>standard format (jpeg, bmp, xls, ...)</xs:documentation>
</xs:annotation>
</xs:pattern>
<!-- Extra Format jpeg, bmp, xls, ...-->
</xs:restriction>
</xs:simpleType>

 【CAD开发】3dxml文件格式开发准备_cad_19


 【CAD开发】3dxml文件格式开发准备_3drep_20

4、3DXML文件结构组成

 【CAD开发】3dxml文件格式开发准备_cad_21


3dxml player(达索官网提供的预览工具)的内置的一个测试模型文件:Sample.3dxml

解压之后:

 【CAD开发】3dxml文件格式开发准备_catia_22


(1)Manifest.xml

这是入口文件,即起始文件,内容如下:

<?xml versinotallow="1.0" encoding="utf-8" ?>
<Manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocatinotallow="Manifest.xsd">
<Root>Sample.3dxml</Root>
</Manifest>

 【CAD开发】3dxml文件格式开发准备_3dxml_23

(2)Sample.3dxml
这是模型的总的结构树描述文件,文件名不固定,从上面的Manifest.xml中的标签里面获取。

<?xml versinotallow="1.0" encoding="utf-8" ?>
<Model_3dxml xmlns="http://www.3ds.com/xsd/3DXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<Header>
<SchemaVersion>4.0</SchemaVersion>
<Title>Quad 3DXml File</Title>
<Author>PVO</Author>
<Generator>CATIA V5</Generator>
<Created>2007-04-19</Created>
</Header>
<ProductStructure root="1">
<Reference3D xsi:type="Reference3DType" id="1" name="Quad"/>
<Instance3D xsi:type="Instance3DType" id="2" name="Chassis.1">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>3</IsInstanceOf>
<RelativeMatrix>1 -1.43656787854329e-016 0 1.43656787854329e-016 1 0 0 0 1 -35.3964099358518 202.211474837735 0</RelativeMatrix>
</Instance3D>
<Reference3D xsi:type="Reference3DType" id="3" name="Chassis"/>
<ReferenceRep xsi:type="ReferenceRepType" id="4" name="Chassis_ReferenceRep" format="UVR" versinotallow="1.0" associatedFile="urn:3DXML:Chassis.3DRep">
<PLM_ExternalID>Chassis_ReferenceRep_ReferenceRep</PLM_ExternalID>
<V_discipline>Design</V_discipline>
<V_usage>3DShape</V_usage>
<V_nature>1</V_nature>
</ReferenceRep>
<InstanceRep xsi:type="InstanceRepType" id="5" name="Chassis_InstanceRep">
<IsAggregatedBy>3</IsAggregatedBy>
<IsInstanceOf>4</IsInstanceOf>
</InstanceRep>
<Instance3D xsi:type="Instance3DType" id="6" name="System Direction.1">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>7</IsInstanceOf>
<RelativeMatrix>0.999976282702582 -0.0068872356451857 4.18212442991818e-006 0.00688723564518346 0.999975545259153 -0.00121444177743552 4.18212454184191e-006 0.00121444177743528 0.999999262556567 -33.892135493604 202.211474837734 8.53090922113019</RelativeMatrix>
</Instance3D>
<Reference3D xsi:type="Reference3DType" id="7" name="System Direction"/>
<ReferenceRep xsi:type="ReferenceRepType" id="8" name="System Direction_ReferenceRep" format="UVR" versinotallow="1.0" associatedFile="urn:3DXML:System_Direction.3DRep">
<PLM_ExternalID>System Direction_ReferenceRep_ReferenceRep</PLM_ExternalID>
<V_discipline>Design</V_discipline>
<V_usage>3DShape</V_usage>
<V_nature>1</V_nature>
</ReferenceRep>
<InstanceRep xsi:type="InstanceRepType" id="9" name="System Direction_InstanceRep">
<IsAggregatedBy>7</IsAggregatedBy>
<IsInstanceOf>8</IsInstanceOf>
</InstanceRep>
<Instance3D xsi:type="Instance3DType" id="10" name="Axle Assembly.1">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>11</IsInstanceOf>
<RelativeMatrix>0.595836252691761 -0.00312842317081944 0.803099852413572 0.00688723564512438 0.99997554525915 -0.00121444177735138 -0.803076413527011 0.00625474636786796 0.595843227858188 -41.6573762582876 10.0046989184395 -27.7670496220596</RelativeMatrix>
</Instance3D>
<Reference3D xsi:type="Reference3DType" id="11" name="Axle Assembly"/>
<Instance3D xsi:type="Instance3DType" id="12" name="Wheel.1">
<IsAggregatedBy>11</IsAggregatedBy>
<IsInstanceOf>13</IsInstanceOf>
<RelativeMatrix>1 0 0 0 1 0 0 0 1 -0.000299999999999301 -137.788525156015 0.00119999999999365</RelativeMatrix>
</Instance3D>
<Reference3D xsi:type="Reference3DType" id="13" name="Wheel"/>
<ReferenceRep xsi:type="ReferenceRepType" id="14" name="Wheel_ReferenceRep" format="UVR" versinotallow="1.0" associatedFile="urn:3DXML:Wheel.3DRep">
<PLM_ExternalID>Wheel_ReferenceRep_ReferenceRep</PLM_ExternalID>
<V_discipline>Design</V_discipline>
<V_usage>3DShape</V_usage>
<V_nature>1</V_nature>
</ReferenceRep>
<InstanceRep xsi:type="InstanceRepType" id="15" name="Wheel_InstanceRep">
<IsAggregatedBy>13</IsAggregatedBy>
<IsInstanceOf>14</IsInstanceOf>
</InstanceRep>
<Instance3D xsi:type="Instance3DType" id="16" name="Wheel.2">
<IsAggregatedBy>11</IsAggregatedBy>
<IsInstanceOf>13</IsInstanceOf>
<RelativeMatrix>1 0 0 0 1 0 0 0 1 -0.000299999999999301 182.211474831485 -0.00040000000000262</RelativeMatrix>
</Instance3D>
<Instance3D xsi:type="Instance3DType" id="17" name="Axle.1">
<IsAggregatedBy>11</IsAggregatedBy>
<IsInstanceOf>18</IsInstanceOf>
<RelativeMatrix>1 0 0 0 1 0 0 0 1 0.000299999999999301 192.211474837735 0.000400000000002621</RelativeMatrix>
</Instance3D>
<Reference3D xsi:type="Reference3DType" id="18" name="Axle"/>
<ReferenceRep xsi:type="ReferenceRepType" id="19" name="Axle_ReferenceRep" format="UVR" versinotallow="1.0" associatedFile="urn:3DXML:Axle.3DRep">
<PLM_ExternalID>Axle_ReferenceRep_ReferenceRep</PLM_ExternalID>
<V_discipline>Design</V_discipline>
<V_usage>3DShape</V_usage>
<V_nature>1</V_nature>
</ReferenceRep>
<InstanceRep xsi:type="InstanceRepType" id="20" name="Axle_InstanceRep">
<IsAggregatedBy>18</IsAggregatedBy>
<IsInstanceOf>19</IsInstanceOf>
</InstanceRep>
<Instance3D xsi:type="Instance3DType" id="21" name="Axle Assembly.2">
<IsAggregatedBy>1</IsAggregatedBy>
<IsInstanceOf>11</IsInstanceOf>
<RelativeMatrix>0.999691727774109 -0.00691442879300021 -0.0238461756783509 0.00688742231737249 0.99997554393347 -0.00121447469382495 0.0238539898934834 0.00104986162245696 0.999714901837887 428.098150416237 10.8332393530064 -27.7669834952255</RelativeMatrix>
</Instance3D>
</ProductStructure>
<DefaultView>
<Viewpoint xsi:type="ParallelViewpointType" visualizedHeight="336.4707284" targetDistance="1401.501343" nearPlaneDistance="717.5784302" farPlaneDistance="2069.004395">
<Position>-654.7354126 -704.961853 678.0846558</Position>
<Sight>0.5839541554 0.6828992367 -0.4389148355</Sight>
<Right>0.6628675461 -0.7132402062 -0.2278049141</Right>
<Up>0.4686194956 0.1579147726 0.8691712618</Up>
</Viewpoint>
<DefaultViewProperty>
<OccurenceId>
<id>urn:3DXML:Sample.3dxml#6</id>
</OccurenceId>
<GraphicProperties xsi:type="GraphicPropertiesType">
<SurfaceAttributes xsi:type="SurfaceAttributesType">
<Color xsi:type="RGBAColorType" red="1" green="1" blue="1"/>
</SurfaceAttributes>
</GraphicProperties>
</DefaultViewProperty>
</DefaultView>
</Model_3dxml>

 【CAD开发】3dxml文件格式开发准备_catia_24

(3).3DRep或.xml
这是模型文件的具体几何数据。个数一般有多个。文件内容格式一般分为ascii(.xml)和二进制(。3DRep)。
这里以3sh-1503571-00004560_2_6de6ae8b_898c_62663b46_349f6.xml为例,内容如下:

<?xml versinotallow="1.0" encoding="UTF-8" ?>
<XMLRepresentation versinotallow="1.2" xmlns="http://www.3ds.com/xsd/3DXML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocatinotallow="http://www.3ds.com/xsd/3DXML">
<Root id="2" xsi:type="BagRepType">
<Rep id="3" xsi:type="BagRepType">
<Rep id="58" xsi:type="BagRepType">
<Rep accuracy="0.05" id="701" solid="1" xsi:type="PolygonalRepType">
<Faces>
<Face strips="0 1 2 3,4 5 6 7,8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93,94 95 96 97,98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142,143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187" xsi:type="FaceGPType">
<SurfaceAttributes>
<Color alpha="1" blue="0.882353" green="0.882353" red="0.882353" xsi:type="RGBAColorType"/>
</SurfaceAttributes>
</Face>
</Faces>
<Edges>
<LineAttributes lineType="SOLID" thickness="1">
<Color alpha="1" blue="0" green="0" red="0" xsi:type="RGBAColorType"/>
</LineAttributes>
<Polyline vertices="-200 0 0,-200 0 20"/>
<Polyline vertices="200 0 0,200 0 20"/>
<Polyline vertices="-200 0 0,200 0 0"/>
<Polyline vertices="-200 0 20,200 0 20"/>
<Polyline vertices="200 1000 0,200 1000 20"/>
<Polyline vertices="200 0 0,200 1000 0"/>
<Polyline vertices="200 0 20,200 1000 20"/>
<Polyline vertices="-200 1000 0,-200 1000 20"/>
<Polyline vertices="200 1000 0,192.382 1007.34 0,184.495 1014.39 0,176.35 1021.14 0,167.958 1027.57 0,159.331 1033.7 0,150.481 1039.49 0,141.421 1044.95 0,132.164 1050.07 0,122.721 1054.83 0,113.107 1059.24 0,103.334 1063.29 0,93.417 1066.97 0,83.3694 1070.28 0,73.2051 1073.21 0,62.9384 1075.75 0,52.5837 1077.91 0,42.1555 1079.68 0,31.6683 1081.06 0,21.1369 1082.05 0,10.5758 1082.64 0,1.73191e-14 1082.84 0,-10.5758 1082.64 0,-21.1369 1082.05 0,-31.6683 1081.06 0,-42.1555 1079.68 0,-52.5837 1077.91 0,-62.9384 1075.75 0,-73.2051 1073.21 0,-83.3694 1070.28 0,-93.417 1066.97 0,-103.334 1063.29 0,-113.107 1059.24 0,-122.721 1054.83 0,-132.164 1050.07 0,-141.421 1044.95 0,-150.481 1039.49 0,-159.331 1033.7 0,-167.958 1027.57 0,-176.35 1021.14 0,-184.495 1014.39 0,-192.382 1007.34 0,-200 1000 0"/>
<Polyline vertices="200 1000 20,192.382 1007.34 20,184.495 1014.39 20,176.35 1021.14 20,167.958 1027.57 20,159.331 1033.7 20,150.481 1039.49 20,141.421 1044.95 20,132.164 1050.07 20,122.721 1054.83 20,113.107 1059.24 20,103.334 1063.29 20,93.417 1066.97 20,83.3694 1070.28 20,73.2051 1073.21 20,62.9384 1075.75 20,52.5837 1077.91 20,42.1555 1079.68 20,31.6683 1081.06 20,21.1369 1082.05 20,10.5758 1082.64 20,1.73191e-14 1082.84 20,-10.5758 1082.64 20,-21.1369 1082.05 20,-31.6683 1081.06 20,-42.1555 1079.68 20,-52.5837 1077.91 20,-62.9384 1075.75 20,-73.2051 1073.21 20,-83.3694 1070.28 20,-93.417 1066.97 20,-103.334 1063.29 20,-113.107 1059.24 20,-122.721 1054.83 20,-132.164 1050.07 20,-141.421 1044.95 20,-150.481 1039.49 20,-159.331 1033.7 20,-167.958 1027.57 20,-176.35 1021.14 20,-184.495 1014.39 20,-192.382 1007.34 20,-200 1000 20"/>
<Polyline vertices="-200 1000 0,-200 0 0"/>
<Polyline vertices="-200 1000 20,-200 0 20"/>
</Edges>
<VertexBuffer>
<Positions>-200 0 20,-200 0 0,200 0 20,200 0 0,200 0 20,200 0 0,200 1000 20,200 1000 0,-200 1000 0,-200 1000 20,-192.382 1007.34 0,-192.382 1007.34 20,-184.495 1014.39 0,-184.495 1014.39 20,-176.35 1021.14 0,-176.35 1021.14 20,-167.958 1027.57 0,-167.958 1027.57 20,-159.331 1033.7 0,-159.331 1033.7 20,-150.481 1039.49 0,-150.481 1039.49 20,-141.421 1044.95 0,-141.421 1044.95 20,-132.164 1050.07 0,-132.164 1050.07 20,-122.721 1054.83 0,-122.721 1054.83 20,-113.107 1059.24 0,-113.107 1059.24 20,-103.334 1063.29 0,-103.334 1063.29 20,-93.417 1066.97 0,-93.417 1066.97 20,-83.3694 1070.28 0,-83.3694 1070.28 20,-73.2051 1073.21 0,-73.2051 1073.21 20,-62.9384 1075.75 0,-62.9384 1075.75 20,-52.5837 1077.91 0,-52.5837 1077.91 20,-42.1555 1079.68 0,-42.1555 1079.68 20,-31.6683 1081.06 0,-31.6683 1081.06 20,-21.1369 1082.05 0,-21.1369 1082.05 20,-10.5758 1082.64 0,-10.5758 1082.64 20,1.73191e-14 1082.84 0,1.73191e-14 1082.84 20,10.5758 1082.64 0,10.5758 1082.64 20,21.1369 1082.05 0,21.1369 1082.05 20,31.6683 1081.06 0,31.6683 1081.06 20,42.1555 1079.68 0,42.1555 1079.68 20,52.5837 1077.91 0,52.5837 1077.91 20,62.9384 1075.75 0,62.9384 1075.75 20,73.2051 1073.21 0,73.2051 1073.21 20,83.3694 1070.28 0,83.3694 1070.28 20,93.417 1066.97 0,93.417 1066.97 20,103.334 1063.29 0,103.334 1063.29 20,113.107 1059.24 0,113.107 1059.24 20,122.721 1054.83 0,122.721 1054.83 20,132.164 1050.07 0,132.164 1050.07 20,141.421 1044.95 0,141.421 1044.95 20,150.481 1039.49 0,150.481 1039.49 20,159.331 1033.7 0,159.331 1033.7 20,167.958 1027.57 0,167.958 1027.57 20,176.35 1021.14 0,176.35 1021.14 20,184.495 1014.39 0,184.495 1014.39 20,192.382 1007.34 0,192.382 1007.34 20,200 1000 0,200 1000 20,-200 1000 20,-200 1000 0,-200 0 20,-200 0 0,1.73191e-14 1082.84 0,10.5758 1082.64 0,-10.5758 1082.64 0,21.1369 1082.05 0,-21.1369 1082.05 0,31.6683 1081.06 0,-31.6683 1081.06 0,42.1555 1079.68 0,-42.1555 1079.68 0,52.5837 1077.91 0,-52.5837 1077.91 0,62.9384 1075.75 0,-62.9384 1075.75 0,73.2051 1073.21 0,-73.2051 1073.21 0,83.3694 1070.28 0,-83.3694 1070.28 0,93.417 1066.97 0,-93.417 1066.97 0,103.334 1063.29 0,-103.334 1063.29 0,113.107 1059.24 0,-113.107 1059.24 0,122.721 1054.83 0,-122.721 1054.83 0,132.164 1050.07 0,-132.164 1050.07 0,141.421 1044.95 0,-141.421 1044.95 0,150.481 1039.49 0,-150.481 1039.49 0,159.331 1033.7 0,-159.331 1033.7 0,167.958 1027.57 0,-167.958 1027.57 0,176.35 1021.14 0,-176.35 1021.14 0,184.495 1014.39 0,-184.495 1014.39 0,192.382 1007.34 0,-192.382 1007.34 0,200 1000 0,-200 1000 0,200 0 0,-200 0 0,-200 0 20,200 0 20,-200 1000 20,200 1000 20,-192.382 1007.34 20,192.382 1007.34 20,-184.495 1014.39 20,184.495 1014.39 20,-176.35 1021.14 20,176.35 1021.14 20,-167.958 1027.57 20,167.958 1027.57 20,-159.331 1033.7 20,159.331 1033.7 20,-150.481 1039.49 20,150.481 1039.49 20,-141.421 1044.95 20,141.421 1044.95 20,-132.164 1050.07 20,132.164 1050.07 20,-122.721 1054.83 20,122.721 1054.83 20,-113.107 1059.24 20,113.107 1059.24 20,-103.334 1063.29 20,103.334 1063.29 20,-93.417 1066.97 20,93.417 1066.97 20,-83.3694 1070.28 20,83.3694 1070.28 20,-73.2051 1073.21 20,73.2051 1073.21 20,-62.9384 1075.75 20,62.9384 1075.75 20,-52.5837 1077.91 20,52.5837 1077.91 20,-42.1555 1079.68 20,42.1555 1079.68 20,-31.6683 1081.06 20,31.6683 1081.06 20,-21.1369 1082.05 20,21.1369 1082.05 20,-10.5758 1082.64 20,10.5758 1082.64 20,1.73191e-14 1082.84 20</Positions>
<Normals>0 -1 0,0 -1 0,0 -1 0,0 -1 0,1 0 0,1 0 0,1 0 0,1 0 0,-0.707083 0.70713 0,-0.707083 0.70713 0,-0.680166 0.733058 0,-0.680166 0.733058 0,-0.652272 0.757985 0,-0.652272 0.757985 0,-0.623463 0.781853 0,-0.623463 0.781853 0,-0.593799 0.804614 0,-0.593799 0.804614 0,-0.563311 0.826245 0,-0.563311 0.826245 0,-0.532029 0.846726 0,-0.532029 0.846726 0,-0.499985 0.866034 0,-0.499985 0.866034 0,-0.467238 0.884131 0,-0.467238 0.884131 0,-0.433882 0.90097 0,-0.433882 0.90097 0,-0.399884 0.916566 0,-0.399884 0.916566 0,-0.365337 0.930875 0,-0.365337 0.930875 0,-0.330271 0.943886 0,-0.330271 0.943886 0,-0.294748 0.955575 0,-0.294748 0.955575 0,-0.258797 0.965932 0,-0.258797 0.965932 0,-0.22251 0.97493 0,-0.22251 0.97493 0,-0.185888 0.982571 0,-0.185888 0.982571 0,-0.149022 0.988834 0,-0.149022 0.988834 0,-0.111942 0.993715 0,-0.111942 0.993715 0,-0.0747093 0.997205 0,-0.0747093 0.997205 0,-0.0373852 0.999301 0,-0.0373852 0.999301 0,0 1 0,0 1 0,0.0373852 0.999301 0,0.0373852 0.999301 0,0.0747093 0.997205 0,0.0747093 0.997205 0,0.111942 0.993715 0,0.111942 0.993715 0,0.149022 0.988834 0,0.149022 0.988834 0,0.185888 0.982571 0,0.185888 0.982571 0,0.22251 0.97493 0,0.22251 0.97493 0,0.258797 0.965932 0,0.258797 0.965932 0,0.294748 0.955575 0,0.294748 0.955575 0,0.330271 0.943886 0,0.330271 0.943886 0,0.365337 0.930875 0,0.365337 0.930875 0,0.399884 0.916566 0,0.399884 0.916566 0,0.433882 0.90097 0,0.433882 0.90097 0,0.467238 0.884131 0,0.467238 0.884131 0,0.499985 0.866034 0,0.499985 0.866034 0,0.532029 0.846726 0,0.532029 0.846726 0,0.563311 0.826245 0,0.563311 0.826245 0,0.593799 0.804614 0,0.593799 0.804614 0,0.623463 0.781853 0,0.623463 0.781853 0,0.652272 0.757985 0,0.652272 0.757985 0,0.680166 0.733058 0,0.680166 0.733058 0,0.707083 0.70713 0,0.707083 0.70713 0,-1 0 0,-1 0 0,-1 0 0,-1 0 0,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1</Normals>
</VertexBuffer>
</Rep>
</Rep>
</Rep>
</Root>
</XMLRepresentation>

 【CAD开发】3dxml文件格式开发准备_3dxml_25

5、FAQ

5.1 catia导出3dxml的参数设置

 【CAD开发】3dxml文件格式开发准备_3drep_26


 【CAD开发】3dxml文件格式开发准备_3drep_27

5.2 catia的3dxml中模型格式

There is 3 different 3DXML format supported by CATIA V5 :

  • Dynamic Tesselation (Exact geometry)
  • Static Tesselation (Catia CGR)
  • Xml Tesselation (ASCII and published)

The 3D XML settings page (Tools > Options > General > Compatibility > 3D XML) concerns the following settings categories:

 【CAD开发】3dxml文件格式开发准备_3dxml_28


 【CAD开发】3dxml文件格式开发准备_xml_29


 【CAD开发】3dxml文件格式开发准备_cad_30

When saving a CATProduct as a 3D XML document, three formats are available for the geometry:

  • XML Tessellation
    (1)Provides the representation of a part through a list of organized triangles (mesh) in XML format. Can be used for easy geometry exchange.
    (2)lets you export geometry as 3D XML Mesh. This format is intended to provide a light visualization format for 3DForAll and some simplifications are made when saving a file (e.g. faces of bodies are grouped by color in a single face).
    (3)Some functionalities such as DMU measure, section, etc. may not be supported. Therefore, it is not recommended to use this format when working with advanced DMU scenarios (involving the use of measure or interference functionalities, for instance).
  • Static Tessellation
    Compressed triangular mesh with static accuracy.
    If the assembly is in design mode, the accuracy used is the one specified in the visualization settings.
    If the assembly is in visualization mode, the accuracy of each component will be that of the associated CGR in the V5 Cache.
  • Dynamic Tessellation
    (1)Compressed representation containing a rough triangular mesh that can be refined when zooming in to discover details of the geometry (Dynamic Level of Details).
    The maximum reachable accuracy is provided by the user at generation time using the Accuracy setting.
    (2)To benefit from Dynamic Level of details, use 3D XML Player or 3DLive (Explore and Examine window).
    (3)When opening a 3D XML file with dynamic tessellation in CATIA V5, the dynamic tessellation is converted at open time to a static triangular representation (with the accuracy selected at generation) for compatibility reason.
  • Export of Lineic Elements
    (1)Lineic elements (wires, axis systems, points) are not exported by default in dynamic and Static Tessellation mode.
    (2)To export these elements, you must check the option Tools > Options > Infrastructure > Product Structure > Cgr Management, Save lineic elements in cgr.
    (3)Lineic elements are never exported in XML Tessellation mode.

结语

​如果您觉得该方法或代码有一点点用处,可以给作者点个赞​

​​​如果您感觉方法或代码不咋地​​​//(ㄒoㄒ)//​​,就在评论处留言,作者继续改进;​​​o_O???
​​​如果您需要相关功能的代码定制化开发,可以留言私信作者;​​​(✿◡‿◡)
​​​感谢各位童鞋们的支持!​​( ´ ▽´ )ノ ( ´ ▽´)っ!!!

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论