本节主要对不同元素间的转换进行总结,以便今后使用。
Element 转 SolidKernelEntity
Bentley.DgnDisplayNet.dll |
Bentley.DgnPlatformNET |
1
| Convert1.ElementToBody(out SolidKernelEntity entityOut, Element ehIn, bool getSolidIn, bool getSheetIn, bool getWireIn);
|
Element 转 CurveVector
Bentley.DgnPlatformNET.dll |
Bentley.DgnPlatformNET.Elements |
1
| CurvePathQuery.ElementToCurveVector(ele);
|
T 转 Element
T
代表的类型有:SolidKernelEntity,SolidPrimitive,CurvePrimitive,CurveVector
Bentley.DgnPlatformNET.dll |
Bentley.DgnPlatformNET.Elements |
1
| var element = DraftingElementSchema.ToElement(DgnModel dgnModel, T entity, Element templateElement);
|