GetBehavior
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "GetBehavior")] public static extern UInt64 GetBehavior(Int64 model, UInt64 mask);
Property model
Size: 64 bit / 8 byte (value)Property mask
Size: 64 bit / 8 byte (value)
Example (based on pure API calls)
Here you can find code snippits that show how the API call GetBehavior can be used.
using RDF; // include at least engine.cs within your solution const Int64 flagbit0 = 1; // 2^^0 0000.0000..0000.0001 const Int64 flagbit1 = 2; // 2^^1 0000.0000..0000.0010 const Int64 flagbit2 = 4; // 2^^2 0000.0000..0000.0100 const Int64 flagbit3 = 8; // 2^^3 0000.0000..0000.1000 const Int64 flagbit4 = 16; // 2^^4 0000.0000..0001.0000 const Int64 flagbit5 = 32; // 2^^5 0000.0000..0010.0000 const Int64 flagbit6 = 64; // 2^^6 0000.0000..0100.0000 const Int64 flagbit7 = 128; // 2^^7 0000.0000..1000.0000 const Int64 flagbit8 = 256; // 2^^8 0000.0001..0000.0000 const Int64 flagbit9 = 512; // 2^^9 0000.0010..0000.0000 const Int64 flagbit10 = 1024; // 2^^10 0000.0100..0000.0000 const Int64 flagbit11 = 2048; // 2^^11 0000.1000..0000.0000 const Int64 flagbit12 = 4096; // 2^^12 0001.0000..0000.0000 const Int64 flagbit13 = 8192; // 2^^13 0010.0000..0000.0000 const Int64 flagbit14 = 16384; // 2^^14 0100.0000..0000.0000 const Int64 flagbit15 = 32768; // 2^^15 1000.0000..0000.0000 const Int64 flagbit16 = 65536; // 2^^16 0000.0000..0000.0001 0000.0000..0000.0000 const Int64 flagbit17 = 131072; // 2^^17 0000.0000..0000.0010 0000.0000..0000.0000 const Int64 flagbit18 = 262144; // 2^^18 0000.0000..0000.0100 0000.0000..0000.0000 const Int64 flagbit19 = 524288; // 2^^19 0000.0000..0000.1000 0000.0000..0000.0000 const Int64 flagbit20 = 1048576; // 2^^20 0000.0000..0001.0000 0000.0000..0000.0000 const Int64 flagbit21 = 2097152; // 2^^21 0000.0000..0010.0000 0000.0000..0000.0000 const Int64 flagbit22 = 4194304; // 2^^22 0000.0000..0100.0000 0000.0000..0000.0000 const Int64 flagbit23 = 8388608; // 2^^23 0000.0000..1000.0000 0000.0000..0000.0000 const Int64 flagbit24 = 16777216; // 2^^24 0000.0001..0000.0000 0000.0000..0000.0000 const Int64 flagbit25 = 33554432; // 2^^25 0000.0010..0000.0000 0000.0000..0000.0000 const Int64 flagbit26 = 67108864; // 2^^26 0000.0100..0000.0000 0000.0000..0000.0000 const Int64 flagbit27 = 134217728; // 2^^27 0000.1000..0000.0000 0000.0000..0000.0000 const Int64 flagbit28 = 268435456; // 2^^28 0001.0000..0000.0000 0000.0000..0000.0000 const Int64 flagbit29 = 536870912; // 2^^29 0010.0000..0000.0000 0000.0000..0000.0000 const Int64 flagbit30 = (Int64) 1073741824; // 2^^30 0100.0000..0000.0000 0000.0000..0000.0000 const Int64 flagbit31 = (Int64) 2147483648; // 2^^31 1000.0000..0000.0000 0000.0000..0000.0000 static void Main(string[] args) { Int64 model = RDF.engine.CreateModel(); if (model != 0) { { // // Initializing the mask with all possible options // Int64 setting = 0, mask = RDF.engine.GetBehavior(0, 0); setting += 1 * flagbit8; // OFF / ON REMOVE ZERO VOLUME SOLIDS DURING PROCESSING setting += 0 * flagbit10; // OFF / ON INTEGRATE SEMANTIC GLOBAL POSITIONING (ONLY RELEVANT WHEN EMBEDDED IN STEP LIBRARY) setting += 0 * flagbit11; // OFF / ON FORCE CALCULATING WIREFRAME FOR CONCEPTUAL FACES IN NON-TRIVIAL CASES setting += 0 * flagbit12; // OFF / ON REMOVE DOUBLE LINING IN WIREFRAME (WILL SET BIT14 IN SETFORMAT) setting += 0 * flagbit29; // OFF / ON CREATE TRIANGLES WITH AREA ZERO (FOR CONSISTENCY) RDF.engine.SetBehavior(model, setting, mask); } // // Check if a certain option is set // if (RDF.engine.GetBehavior(model, flagbit8) != 0) { // Zero Volume solids are removed when found during processing } else { // Zero Volume solids are kept when found during processing } if (RDF.engine.GetBehavior(model, flagbit29) != 0) { // Triangles with zero area are kept for consistancy } else { // Triangles with zero area are removed } { // // Get all set options // Int64 setting = RDF.engine.GetBehavior(model, RDF.engine.GetBehavior(0, 0)); if ((setting & flagbit8) != 0) { // Zero Volume solids are removed when found during processing } else { // Zero Volume solids are kept when found during processing } if ((setting & flagbit29) != 0) { // Triangles with zero area are kept for consistancy } else { // Triangles with zero area are removed } } } }