0

edit obj

Dihydrogensulfid 4 years ago in Question updated by Lucas Silva 4 years ago 1

HI!

For an extention of my masterthesis, I need to calculate and present flowpaths of an digital surface model.

Therefore I have to questions.


1. i can import an *.obj-file with helix in a viewport with:

var modelImporter = new ModelImporter();
modelImporter.DefaultMaterial = material;
Model3DGroup model3DGroup = new Model3DGroup();
model3DGroup = modelImporter.Load("C:/exampleAreas/Area01.obj");

ModelVisual3D newVisual = new ModelVisual3D { Content = model3DGroup };

MyView.Children.Add(newVisual); // add it to the viewport


but how can I get acess to the geometry of the *.obj to readout the normal-vectors?


2. Is it possible to interact with the positions of the vertices of a loaded *.obj-file?

The hidden agenda is: manipulating the loaded *.obj-file, so the user can modify the height of vertices and change the flowpath.


It would be great if someone could give my a hint or small example :-)

Thanks for reading!


greetings!

The properties Normals, TextureCoord and Positions are private in Helix DLL, but you can change the code and rebuild, or you can create your own class in your code, copying the code from helix.


The helix works with meshs, so, after you importer the .obj, you have a model. So, you don't work no more with the obj file. You can edit and after export again to another .obj.


Other thing thats important remember: If the obj does not have the normals vector, you have to generate them. When you open the .obj in notepad, you can see if haves normals or not.