This is the discussion forum for Helix Toolkit.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
0

Move all adorners during a Manipulator

Anonymous 10 years ago 0
This discussion was imported from CodePlex

gmgunderground wrote at 2014-05-16 12:02:

Ho can I move all Manipulators adorner (by code C#) when for example I move X TranslatorManipulator? The code is working correctly because I can rotate and translate object, but adorners are fixed in the starting position.

My translator is
            translateManipulatorX.TargetTransform = mv.Content.Transform;
            translateManipulatorX.UnBind();
            translateManipulatorX.Bind(mv);
            translateManipulatorX.Length = Math.Max(mv.Content.Bounds.SizeX, Math.Max(mv.Content.Bounds.SizeY, mv.Content.Bounds.SizeZ)) * 1.2;
            translateManipulatorX.Offset = new Vector3D(mv.Content.Bounds.X + mv.Content.Bounds.SizeX, mv.Content.Bounds.Y + mv.Content.Bounds.SizeY / 2, mv.Content.Bounds.Z + mv.Content.Bounds.SizeZ / 2);
            translateManipulatorX.Visibility = System.Windows.Visibility.Visible;
If I remove offset all is working, but adorners are not correctly centered

Best regards
0

How to create a thick cone

Anonymous 10 years ago 0
This discussion was imported from CodePlex

chinh_nguyen wrote at 2013-01-09 13:27:

Hi, how can I create a thick cone using the library, if I use the AddCone method without cap, it is too thin that in some angle, the cone disappear.


chinh_nguyen wrote at 2013-01-10 08:45:

Hi all, I achieved the disappear problem by setting BackMaterial properties. It is not a thick cone yet but solve my problem. 

0

ObjImporter smoothing issue

Anonymous 10 years ago 0
This discussion was imported from CodePlex

powst wrote at 2014-08-07 16:30:

Hi there!
Thanks objo a lot for your great tools!

Doesn't anybody know what can be a problem for smoothing in Helix 3D Toolkit? I have a little bit strange case.. I got an .obj file with complex 3d-model which I want to be smooth. There are 2 "s on" lines in this file. I don't remember exactly but there was some issue while smoothng - and I set currentSmoothingGroup in ObjReader always to be 1.. And that helped, part of the 3d-object is now smooth. But only part.. For example I have a 3d-model of jaw - some teeth are smooth, some - very rough - there is clear difference. Using other 3d-viewers I can see all of the teeth are smooth.

In this file there are 2 "s on" lines - one before all vertices part, another one before faces. Plus there are a lot of separated "groups" (part of vertices or faces that start with "g"). I don't know maybe that is the problem - but groups with the same names are separated all over the file - ie that can be:
g Name1
...
g Name2
...
g Name1


I also tried to change some code in ObjReader - for example in AddGroup method in the beginning I put a line
if (Groups.Any(x => x.Name == name)) { return; }
And it partially helped - all teeth were smooth, but mesh in general was a little bit broken.. Than I changed smoothingGroupMap first parametr to be not int but the name of the group - for every group to have its own smoothing map (cause in original code after adding a group smoothing maps were destroyed) - but it made everything even worse. :(

Has anybody any ideas why there can be part of 3d-model smooth, and part of it - absolutely rough?

objo wrote at 2014-08-08 12:41:

Does it look correct in other software? (try meshlab)
I guess there could be a bug in the obj importer. In that case we should have a small test file and create an issue on this!

powst wrote at 2014-08-08 14:25:

Yes, exactly, I tried Meshlab :) And there when I switch on "Smooth" - it becames smooth, all of the teeth.

I can send you this .obj file..

powst wrote at 2014-08-11 14:33:

This is how it looks:
Using HelixToolkit
Using MeshLab

I feel like there can be an issue with Groups...

powst wrote at 2014-08-11 15:16:

By the way, this is what happened after inserting
 if (Groups.Any(x => x.Name == name)) { return; } 
line in AddGroup method:
After

Close enough, but appeared some clearly visible trouble with a few tens triangles on a problem part of the model...

powst wrote at 2014-08-14 17:38:


objo wrote at 2014-08-18 13:10:

Thanks for providing the file! I have added the issue at https://helixtoolkit.codeplex.com/workitem/10067
0

windows 8.1

Francis Tyrone Pimenta 8 years ago 0

i'm am not a c# profession. how can i get a nuget package into a windows 8.1 Desktop Program?

i made a test wpf program and there i can use the helix 3d nuget package. whats the best way for me to solve this problem?


Thank you for your help.

0

using keys to move camera while in drag mode

Anonymous 10 years ago 0
This discussion was imported from CodePlex

mihaipruna wrote at 2014-08-11 20:30:

I should be able to move and rotate the camera with the keyboard at least even while doing drag-drop operations, is there a way to retain that functionality?
0

Order Indiependent Transparency

Terry Price 9 years ago updated by ไอยดา สุรีวงค์ 3 years ago 1
Hello,

Does Helix 3D support any form of OIT such as depth-peepling?

If not, are there any plans to implement it in the future? It would be hugely helpful for my applicaiton.

If not, is there any way that I can 'tack it on' to the existing framework?

Best Wishes,

-TJP
0

Point Cloud using Helix Toolkit

Anonymous 10 years ago 0
This discussion was imported from CodePlex

Luka1211 wrote at 2013-10-02 20:50:

Hello,

i am new to c# and WPF, and i am trying to use helix toolkit to represent a kinect depth image as a point cloud. i am trying to load Points3DCollection into PointsVisual3D as it is explained in the source for the pointsandlines example. It keeps returning the message that it cannot implicitly convert points3DCollection to pointsvisual3D. Is there an example just for creating point clouds or just points using the mentioned methods?

Thx

abuseukk wrote at 2013-12-25 18:54:

Hi,

I am also trying to create a point cloud for the human body using Kinect and Helix 3d. For now there is a sample in the examples directory which I think has some mistakes in converting depth to 3d mesh cordinates. I found this link useful :

Kinect Stackoverflow
using (DepthImageFrame depthFrame = e.OpenDepthImageFrame()) {
  DepthImagePixel[] depth = new DepthImagePixel[depthFrame.PixelDataLength];
  SkeletonPoint[] realPoints = new SkeletonPoint[depth.Length];

  depthFrame.CopyDepthImagePixelDataTo(depth);

  CoordinateMapper mapper = new CoordinateMapper(sensor);
  mapper.MapDepthFrameToSkeletonFrame(DEPTH_FORMAT, depth, realPoints);
}
If someone can help me with converting this cordinates into correct Point3d Cordinates :)

AnotherBor wrote at 2014-01-07 05:33:

Luka1121, PointsVisual3D has a Points property to which you should assign your collection of points.

Abuseukk, you should probably decide to use the depth data as one of the coords of the points. new Point3D(xcoord, ycoord, depth[i]) would spread the points in Z axis accordingly to their depth.
0

CameraController not defined

Anonymous 10 years ago 0
This discussion was imported from CodePlex

ppcomma wrote at 2011-12-21 21:07:

Hi!

Hi! I need to add HelixView3D on my form in the code. so, run-time error:: "cameracontroller not defined". What should I do?


objo wrote at 2011-12-21 21:44:

Are you using an old version? The control has been renamed to HelixViewport3D.

Are you calling any methods on the control before the control template has been applied? (the camera controller is undefined until the template is applied).

In what part of the code are you adding the control?

Is it possible to create the control in the view XAML? See the examples.


ppcomma wrote at 2011-12-21 22:13:

this is my code.. i have to add HVP3D dynamically..

string
[] AllFiles = Directory.GetFiles(@"C:\Users\..", "*.3ds"); HelixViewport3D[] hel_ar = new HelixViewport3D[AllFiles.Count()]; for (int i = 0; i < AllFiles.Count(); i++) { hel_ar[i] = new HelixViewport3D(); PerspectiveCamera myPCamera = new PerspectiveCamera(); myPCamera.Position = new Point3D(10000, 0, 0); myPCamera.LookDirection = new Vector3D(-1, 0, 0); myPCamera.FieldOfView = 60; hel_ar[i].Viewport.Camera = myPCamera; DirectionalLight myDirectionalLight = new DirectionalLight(); myDirectionalLight.Color = Colors.White; myDirectionalLight.Direction = new Vector3D(-0.61, -0.5, -0.61); hel_ar[i].Viewport.Height = 115; hel_ar[i].Viewport.Width = 115; Model3DGroup m3d = new Model3DGroup(); m3d = ModelImporter.Load(AllFiles[i]); m3d.Children.Add(myDirectionalLight); ModelVisual3D m = new ModelVisual3D(); m.Content = m3d; hel_ar[i].Viewport.Children.Add(m); stackPanel1.Children.Add(hel_ar[i]); }


ppcomma wrote at 2011-12-21 22:22:

Thanks, i did it


ppcomma wrote at 2012-01-28 15:52:

One more question..

I create HelixViewport3D in C# code and import 3ds model. When i run project, HelixViewport does not show anything until doubleMMB.

What should i do to fix it? i want helixviewport to show my model at once.


objo wrote at 2012-01-29 09:20:

It seems like your camera position/look direction is wrong. Try to use the ZoomExtents or ResetCamera method in HelixViewport3D after importing the 3ds model.

There is currently not a "ModelLoaded" event on the FileModelVisual3D, I think that is something that should be added.

0

Multiline Closed Path Polygons

Michael Powell 9 years ago updated by ไอยดา สุรีวงค์ 3 years ago 1
Hello,

Please pardon my clumsy use of verbiage here...

I will probably default to the RectangleVisual3D, initially, but I'd like to know whether there is something like a closed-path LinesVisual3D. Could work its way out in 3D, in my case it would be along a 2D plane.

Basically I'd like to render things like triangles, trapezoids, etc. Then be able to potentially specify things like line issues (i.e. brush), and fill.

Thank you...
0

Help needed rendering Kinect data with HelixToolkit.Wpf.SharpDX

Anonymous 10 years ago 0
This discussion was imported from CodePlex

Ehee wrote at 2014-05-27 18:09:

I am trying to build a working example program to render Kinect data using the Helix SharpDX API and I need the correct steps for continually rendering a changing model. I have the old Kinect example from the WPF API working and I can generate a 3D model from the Kinect however all of the SharpDX examples use static models that are created in the MainViewModel constructors prior to rendering. Could someone provide the most efficient steps to continually rendering a changing model using the Helix SharpDX API?