GetConceptualFacePerimeter
Syntax
public const string EngineDLL = @"engine.dll";[DllImport(EngineDLL, EntryPoint = "GetConceptualFacePerimeter")] public static extern double GetConceptualFacePerimeter(Int64 conceptualFace);
Property conceptualFace
Size: 64 bit / 8 byte (value)
Example
Here you can find code snippits that show how the API call GetConceptualFacePerimeter can be used.
using Engine; ... static void Main(string[] args) { Int64 model = Engine.x86_64.CreateModel(); if (model != 0) { // // Classes // Int64 classBox = Engine.x86_64.GetClassByName(model, "Box"); // // Datatype Properties (attributes) // Int64 propertyLength = Engine.x86_64.GetPropertyByName(model, "length"), propertyWidth = Engine.x86_64.GetPropertyByName(model, "width"), propertyHeight = Engine.x86_64.GetPropertyByName(model, "height"); // // Instances (creating) // Int64 instanceBox = Engine.x86_64.CreateInstance(classBox, (string) null); double length = 2.8, width = 1.3, height = 1.4; Engine.x86_64.SetDatatypeProperty(instanceBox, propertyLength, ref length, 1); Engine.x86_64.SetDatatypeProperty(instanceBox, propertyWidth, ref width, 1); Engine.x86_64.SetDatatypeProperty(instanceBox, propertyHeight, ref height, 1); Int64 vertexBufferSize = 0, indexBufferSize = 0; Engine.x86_64.CalculateInstance(instanceBox, out vertexBufferSize, out indexBufferSize, (IntPtr) 0); if (vertexBufferSize != 0 && indexBufferSize != 0) { float[] vertexBuffer = new float[6 * vertexBufferSize]; Engine.x86_64.UpdateInstanceVertexBuffer(instanceBox, ref vertexBuffer[0]); Int32[] indexBuffer = new Int32[indexBufferSize]; Engine.x86_64.UpdateInstanceIndexBuffer(instanceBox, ref indexBuffer[0]); Int64 conceptualFaceCnt = Engine.x86_64.GetConceptualFaceCnt(instanceBox); for (Int64 index = 0; index < conceptualFaceCnt; index++) { Int64 startIndexTriangles = 0, noIndicesTriangles = 0, conceptualFace = Engine.x86_64.GetConceptualFaceEx( instanceBox, index, out startIndexTriangles, out noIndicesTriangles, (IntPtr) 0, (IntPtr) 0, (IntPtr) 0, (IntPtr) 0, (IntPtr) 0, (IntPtr) 0, (IntPtr) 0, (IntPtr) 0 ); double conceptualFaceArea = Engine.x86_64.GetConceptualFaceArea( conceptualFace, ref vertexBuffer[0], ref indexBuffer[0] ), conceptualFacePerimeter = Engine.x86_64.GetConceptualFacePerimeter( conceptualFace ); } } // // The resulting model can be viewed in 3D-Editor.exe // Engine.x86_64.SaveModel(model, "c:\\created\\myFile.bin"); Engine.x86_64.CloseModel(model); } }