<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>[V8i MDL]提取mesh边界的问题</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/124831/v8i-mdl-mesh</link><description>上图中，左侧为一mesh元素，中间为利用MS提取边界命令提取出来的边界(正常)，最右侧为利用代码提取出的边界(未封闭)，提取方法如下： 
 int pNumIndexPerFace=1;	
	EmbeddedIntArray* pIndices=jmdlEmbeddedIntArray_grab();
	EmbeddedDPoint3dArray*	pXYZ=jmdlEmbeddedDPoint3dArray_grab();
	EmbeddedDPoint3dArray*	pEdgeXYZArray</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [V8i MDL]提取mesh边界的问题</title><link>https://communities.bentley.com/thread/439956?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 01:28:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d31334ec-d6ab-4114-8810-122c174039d0</guid><dc:creator>xiangeboy</dc:creator><description>&lt;p&gt;英文的第四条我觉得可以这样理解：&lt;/p&gt;
&lt;p&gt;用mdlMesh_edgeCoordinates函数得到所有边的端点坐标，数组内0和1 是一条边，2和3是一条边，4和5是一条边。。。以此类推（这个数组里的边并不是收尾连接的，你的代码就错在此，所以会有交叉等问题）；&lt;/p&gt;
&lt;p&gt;每两个点创建一个边元素，用mdlElmdscr_initOrAddToChain函数把他们连到一起，再一次用mdlElmdscr_assembleChains和mdlElmdscr_simplifyComplexChainOrShape。&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [V8i MDL]提取mesh边界的问题</title><link>https://communities.bentley.com/thread/379485?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2016 02:23:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:819c09dd-8225-4a4a-b0d6-d98884ec75b8</guid><dc:creator>Yongan.Fu</dc:creator><description>&lt;p&gt;1、Shape元素最多只能保存5000个顶点，当Mesh边界点数大于5000时，将不得不以ComplexChain的形式构成。&lt;br /&gt; 2、mdlElmdscr_simplifyComplexChainOrShape不能将Shape简化为Linestring，它是用来将ComplexShape简化为Shape 或者 将ComplexChain简化为Linestring的。如果要从Shape转换成Linestring就需要用你想到的方案。&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [V8i MDL]提取mesh边界的问题</title><link>https://communities.bentley.com/thread/379483?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2016 02:12:49 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:87fb9c90-d66c-4db2-96f6-49ce388675ca</guid><dc:creator>lihui He</dc:creator><description>&lt;p&gt;符工，感谢您的解答。已测试过，该函数可以提取mesh边界。&lt;/p&gt;
&lt;p&gt;1、提取出的为shape形元素，请问输出参数ppResultDescr在什么情况下为chain of polylines？&lt;/p&gt;
&lt;p&gt;2、shape提取出来以后，使用mdlElmdscr_simplifyComplexChainOrShape简化为线串，但是没有成功，如果需要简化为线串的话，是否仅能通过mdlLinear_extract提取数据点再创建线串？&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [V8i MDL]提取mesh边界的问题</title><link>https://communities.bentley.com/thread/379481?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2016 01:27:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:72021638-05cc-47ed-82ed-c87ed7b7da3c</guid><dc:creator>Yongan.Fu</dc:creator><description>一个未公开函数可直接求Mesh边界：&lt;br /&gt;
Extract all visible edges from a mesh. Join them into chains and return as elements.&lt;br /&gt;
extern &amp;quot;C&amp;quot; StatusInt mdlMesh_extractVisibleChains (&lt;br /&gt;
MSElementDescr    *pMeshDescr,          // IN mesh header&lt;br /&gt;
MSElementDescr    **ppResultDescr,  //OUT chain of polylines and shapes.&lt;br /&gt;
BoolInt             bBoundaryOnly               //IN If true, the mesh is inspected to determine boundaries.&lt;br /&gt;
                                                                            //     If false, the current visibility markings on the mesh are used.&lt;br /&gt;
);&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>