Posts

OBB finding from the n given 3d points

 To calculate the Oriented Bounding Box (OBB) of a set of 3D points without using any third-party C# API, you'll need to follow these general steps: To implement the eigenvalue and eigenvector computation properly, we will use the Jacobi eigenvalue algorithm, which is a well-known method for computing the eigenvalues and eigenvectors of a symmetric matrix. This algorithm iteratively diagonalizes the matrix by applying Jacobi rotations. Here's the implementation of the EigenDecomposition function using the Jacobi method: csharp Copy code using System; using System.Collections.Generic; public class Vector3 {     public float X { get; set; }     public float Y { get; set; }     public float Z { get; set; }     public Vector3()     {         X = 0;         Y = 0;         Z = 0;     }     public Vector3(float x, float y, float z)     {    ...

Assembly parts listing

 private static ArrayList GetAssemblyParts(Assembly assembly) {    ArrayList Parts = new ArrayList();    IEnumerator AssemblyChildren = (assembly).GetSecondaries().GetEnumerator();    //IEnumerator AssemblyChildren = (assembly).GetChildren().GetEnumerator();    Parts.Add((assembly).GetMainPart().Identifier);    while(AssemblyChildren.MoveNext())        Parts.Add((AssemblyChildren.Current as Tekla.Structures.Model.ModelObject).Identifier);    return Parts; }      #region Model object child part fetching         /// <summary>         /// Gets list of assembly parts          /// </summary>         /// <param name="SelectedModelObjects"></param>         /// <returns></returns>         public static ArrayList GetAssemblyParts___SAAN(As...