0
Loading .OBJ 3D files
Hello!!! I am using helix tool kit for one of my visual studio project i.e, loading 3D models. With that I am able to successfully load stl files. Is it possible to load 3d .OBJ files?? Thanks in advance.
Customer support service by UserEcho
While I'm still just beginning here also, this seems to work (converted from VB.net).
Thanks a lot :)
My code is this. Please help me to integrate with your code. Thanks in advance :)
using HelixToolkit.Wpf;
using System;
using System.IO;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media.Media3D;
namespace Display3DModel
{
public partial class MainWindow : Window
{
private const string MODEL_PATH = "D:/vs/display3D-master/Display3DModel/bicycle.stl";
public object FilDia { get; private set; }
public MainWindow()
{
InitializeComponent();
Model3DGroup MdlGrp = null;
ModelVisual3D device3D = new ModelVisual3D();
device3D.Content = Display3d(MODEL_PATH);
viewPort3d.Children.Add(device3D);
}
private Model3D Display3d(string model)
{
Model3D device = null;
try
{
Console.WriteLine("Hello!!!");
viewPort3d.RotateGesture = new MouseGesture(MouseAction.LeftClick);
ModelImporter import = new ModelImporter();
device = import.Load(model);
}
catch (Exception e)
{
MessageBox.Show("Exception Error : " + e.StackTrace);
}
return device;
}
}
}
Something like this: