v4.2

指定されたファセット内のポイント数をIntegerとして戻します。

// get accessor Int32 rtn = Facet.NbPoints; |

set oRoot = ActiveProject.ActiveScene.Root set oSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" ) set oGeometry = oSphere.ActivePrimitive.Geometry set oFacets = oGeometry.Facets for each oFacet in oFacets logMessage "Facet #" & oFacet.Index & " has " & oFacet.NbPoints & " points." next ' Expected Result: 'INFO : Facet #0 has 3 points. 'INFO : Facet #1 has 4 points. 'INFO : Facet #2 has 4 points. ' <snip> 'INFO : Facet #61 has 4 points. 'INFO : Facet #62 has 4 points. 'INFO : Facet #63 has 3 points. |

var oRoot = ActiveProject.ActiveScene.Root; var oSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" ); var oGeometry = oSphere.ActivePrimitive.Geometry; var oFacets = oGeometry.Facets; facetEnum = new Enumerator(oFacets); var oFacet; for( ; !facetEnum.atEnd(); facetEnum.moveNext() ) { oFacet = facetEnum.item(); LogMessage( "Facet #" + oFacet.Index + " has " + oFacet.NbPoints + " points." ); } // Expected result: //INFO : Facet #0 has 3 points. //INFO : Facet #1 has 4 points. //INFO : Facet #2 has 4 points. // <snip> //INFO : Facet #61 has 4 points. //INFO : Facet #62 has 4 points. //INFO : Facet #63 has 3 points. |