【CAD开发】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.
在这里插入图片描述
什么是 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 文件。

在这里插入图片描述

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 模型。
在这里插入图片描述
在这里插入图片描述

  • 在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>

在这里插入图片描述
在这里插入图片描述

2.2 Pixyz Studio

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

在这里插入图片描述

  • Import
    在这里插入图片描述

  • Export
    在这里插入图片描述

  • 加载一个3dxml文件。

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

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

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

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.
在这里插入图片描述

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

<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>

在这里插入图片描述
在这里插入图片描述

4、3DXML文件结构组成

在这里插入图片描述
3dxml player(达索官网提供的预览工具)的内置的一个测试模型文件:Sample.3dxml
解压之后:
在这里插入图片描述
(1)Manifest.xml
这是入口文件,即起始文件,内容如下:

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

在这里插入图片描述

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

<?xml version="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" version="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" version="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" version="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" version="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>

在这里插入图片描述

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

<?xml version="1.0" encoding="UTF-8" ?>
<XMLRepresentation version="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:schemaLocation="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>

在这里插入图片描述

5、FAQ

5.1 catia导出3dxml的参数设置

在这里插入图片描述
在这里插入图片描述

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:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

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???
如果您需要相关功能的代码定制化开发,可以留言私信作者;(✿◡‿◡)
感谢各位童鞋们的支持!( ´ ▽´ )ノ ( ´ ▽´)っ!!!


  • 7
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值