pythonocc基础使用:模型信息获取(装配关系,材料,颜色)XCAF

占坑。。。
https://www.opencascade.com/doc/occt-7.3.0/overview/html/occt_user_guides__xde.html

https://www.opencascade.com/doc/occt-7.1.0/overview/html/occt_user_guides__iges.html

he Extended Data Exchange (XDE) module allows extending the scope of exchange by translating additional data attached to geometric BREP data, thereby improving the interoperability with external software.

Data types such as colors, layers, assembly descriptions and validation properties (i.e. center of gravity, etc.) are supported. These data are stored together with shapes in an XCAF document. It is also possible to add a new types of data taking the existing tools as prototypes.

OCC.XCAFDoc
XCAFDoc_DocumentTool

Definition of general structure of DECAF documentand tools to work with itThe document is composed of sections, each sectionstoring its own kind of data and managing by correspondingtoolSome properties can be attached directly to shapes. These properties are:* Name (the standard definition from OCAF) - class TDataStd_Name* Centroid (for the validation of transfer) - class XCAFDoc_Centroid* Volume (for the validation of transfer) - class XCAFDoc_Volume* Area (for the validation of transfer) - class XCafDoc_AreaManagement of these attributes is realized by OCAF. For gettingthe attributes attached to a label the method classTDF_Label::FindAttribute() should be used.

在这里插入图片描述此张图片里提到了TDF,后面该代码也使用到了TDF的东西。。

from OCC.Core.TCollection import TCollection_ExtendedString

from OCC.Core.TDocStd import TDocStd_Document
from OCC.Core.XCAFDoc import (XCAFDoc_DocumentTool_ShapeTool,
                              XCAFDoc_DocumentTool_ColorTool,
                              XCAFDoc_DocumentTool_LayerTool,
                              XCAFDoc_DocumentTool_MaterialTool
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值