<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get number of elements in a mesh object in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/8628086#M8733</link>
    <description>&lt;P&gt;Ah buggar. Oh well, thanks for the link, I am sure it will prove very useful.&lt;/P&gt;
&lt;P&gt;Seems like it would be a worthwhile addition to the MeshOps or PolyOps interface though.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Feb 2019 16:19:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-28T16:19:11Z</dc:date>
    <item>
      <title>Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/8627703#M8731</link>
      <description>&lt;P&gt;Is there a way to look at a mesh object and find out how many elements are contained within? I know I can access elements by using face bit arrays but was hoping there would be an easier way that does not involve having to do it this protracted way. I was hoping there may be a &lt;STRONG&gt;&amp;lt;mesh&amp;gt;.getNumElements&lt;/STRONG&gt; that I can access, but I have not found such an attribute. I probably missed it.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 14:19:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/8627703#M8731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-28T14:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/8627984#M8732</link>
      <description>&lt;P&gt;'Fraid not but you can make your own. See for example the tryGetMeshElements function used &lt;A href="http://www.scriptspot.com/3ds-max/scripts/randomize-elements" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for inspiration.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 15:46:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/8627984#M8732</guid>
      <dc:creator>Swordslayer</dc:creator>
      <dc:date>2019-02-28T15:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/8628086#M8733</link>
      <description>&lt;P&gt;Ah buggar. Oh well, thanks for the link, I am sure it will prove very useful.&lt;/P&gt;
&lt;P&gt;Seems like it would be a worthwhile addition to the MeshOps or PolyOps interface though.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:19:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/8628086#M8733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-28T16:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/9728221#M8734</link>
      <description>&lt;P&gt;Made this tiny modifier just for this!&lt;/P&gt;&lt;P&gt;&lt;A title="Mesh Elements Count" href="https://gumroad.com/l/elements_count" target="_blank" rel="noopener"&gt;https://gumroad.com/l/elements_count&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:52:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/9728221#M8734</guid>
      <dc:creator>bigonethegod</dc:creator>
      <dc:date>2020-09-03T17:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/9728235#M8735</link>
      <description>&lt;P&gt;Made this tiny modifier just for this!&lt;/P&gt;&lt;P&gt;&lt;A href="https://gumroad.com/l/elements_count" target="_blank" rel="noopener"&gt;Mesh Elements Count&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:57:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/9728235#M8735</guid>
      <dc:creator>bigonethegod</dc:creator>
      <dc:date>2020-09-03T17:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331548#M8736</link>
      <description>&lt;P&gt;sorry , the function was not working so I deleted it .&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 00:02:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331548#M8736</guid>
      <dc:creator>obaida_ds</dc:creator>
      <dc:date>2022-08-01T00:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331706#M8737</link>
      <description>&lt;P&gt;Please test your solutions before posting them...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;delete objects
gc()

s = geosphere name:#test_mesh segs:4 wirecolor:orange isselected:on
converttomesh s
meshop.explodefaces s #all 0

GetMeshElements s&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 22:26:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331706#M8737</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-07-31T22:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331728#M8738</link>
      <description>&lt;P class="lia-align-left"&gt;Thanks for Feedback , ofc it should not be the best way but it works !! (not yet , need more tests)&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 23:06:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331728#M8738</guid>
      <dc:creator>obaida_ds</dc:creator>
      <dc:date>2022-07-31T23:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331746#M8739</link>
      <description>&lt;P&gt;better now. at least it somehow works&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ... but it gives wrong number&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 23:17:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331746#M8739</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-07-31T23:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331749#M8740</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; , actually I tested it on copied faces (not detached) so it works , detached faces keep its index !! .&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 23:22:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331749#M8740</guid>
      <dc:creator>obaida_ds</dc:creator>
      <dc:date>2022-07-31T23:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331765#M8741</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;fn GetMeshElements obj = (
	local tf = obj.faces as bitarray, 
	el = meshOp.getElementsUsingFace obj 1, n = 1
	if el.numberset != obj.numfaces do (
		local lf = tf - el
		while lf.numberset != 0 do (
		       lf -= meshOp.getElementsUsingFace obj (lf as array)[1]
			n += 1
		)
	)
	n
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Hope this one will work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 00:02:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331765#M8741</guid>
      <dc:creator>obaida_ds</dc:creator>
      <dc:date>2022-08-01T00:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331772#M8742</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4362529"&gt;@obaida_ds&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Hope this one will work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Great! Now let's test the performance... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;change the number of geosphere segment to 20 first....&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;delete objects
gc()

s = geosphere name:#test_mesh segs:20 wirecolor:orange isselected:on
(
	converttomesh s
	meshop.explodefaces s #all 0
)

(
	t0 = timestamp()
	h0 = heapfree
	n = GetMeshElements s

	format "num:% time:% heap:%\n" n (timestamp() - t0) (h0 - heapfree)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 00:06:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331772#M8742</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-08-01T00:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331779#M8743</link>
      <description>&lt;P&gt;ok , not that much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;if you can help here we all will appreciate that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 09:42:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331779#M8743</guid>
      <dc:creator>obaida_ds</dc:creator>
      <dc:date>2022-08-01T09:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331782#M8744</link>
      <description>&lt;P&gt;for reference:&lt;BR /&gt;* the method shown by Swordslayer above takes ~30 ms&lt;BR /&gt;* another method (that you can find on CGTalk) takes ~10 ms&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 00:14:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331782#M8744</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-08-01T00:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331794#M8745</link>
      <description>&lt;P&gt;thank .&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 01:17:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331794#M8745</guid>
      <dc:creator>obaida_ds</dc:creator>
      <dc:date>2022-08-01T01:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331836#M8746</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4362529"&gt;@obaida_ds&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;thank .&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Anyway you are on the right track. The best practical solution is to first try to do it yourself, then find the highest rated and find out how yours differs from the best.&lt;BR /&gt;There was a big discussion on CGTalk about optimizing the search for mesh elements ... as a result of testing and discussion, the decision took the final form. Unfortunately, CGTalk is now broken by "fatal improvements". And even I can not find this topic, although I was a direct participant in it. Maybe someone will be lucky to find it somehow.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 01:37:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11331836#M8746</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-08-01T01:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11332089#M8747</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1634609"&gt;@denisT.MaxDoctor&lt;/a&gt;&amp;nbsp; написал (-а):&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4362529"&gt;@obaida_ds&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;thank .&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And even I can not find this topic, although I was a direct participant in it. Maybe someone will be lucky to find it somehow.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;All I remember is this topic about poly elements count.&lt;/P&gt;&lt;P&gt;&lt;A title="A faster method for retrieving element count" href="https://forums.cgsociety.org/t/a-faster-method-for-retrieving-element-count/2054201/18" target="_blank" rel="noopener"&gt;A faster method for retrieving element count&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 06:40:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11332089#M8747</guid>
      <dc:creator>Serejah</dc:creator>
      <dc:date>2022-08-01T06:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11332385#M8748</link>
      <description>&lt;P&gt;I think I found it , Thanks for contribution :&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.cgsociety.org/t/how-to-quickly-eliminate-elements-with-lowest-face-count/1692456/26" target="_blank" rel="noopener"&gt;https://forums.cgsociety.org/t/how-to-quickly-eliminate-elements-with-lowest-face-count/1692456/26&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 09:44:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11332385#M8748</guid>
      <dc:creator>obaida_ds</dc:creator>
      <dc:date>2022-08-01T09:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get number of elements in a mesh object</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11333957#M8749</link>
      <description>&lt;P&gt;&lt;A title="A faster method for retrieving element count" href="https://forums.cgsociety.org/t/a-faster-method-for-retrieving-element-count/2054201/18" target="_blank" rel="noopener nofollow noreferrer"&gt;A faster method for retrieving element count&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://forums.cgsociety.org/t/how-to-quickly-eliminate-elements-with-lowest-face-count/1692456" target="_blank" rel="noopener"&gt;How to quickly eliminate elements with lowest face count?&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes... those are the discussions I was talking about. Thanks guys for finding it!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 00:23:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/get-number-of-elements-in-a-mesh-object/m-p/11333957#M8749</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-08-02T00:23:24Z</dc:date>
    </item>
  </channel>
</rss>

