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
Under review

How to adjust line thickness

Michael Powell 10 years ago updated 10 years ago 5
...that or potentially some pipes would be better from the calculated points.

The calculations are going well enough, though I'm not precisely sure what the geometric orientations are, given center, converting degrees to radians, and so on. Experimenting for quadrants, once I make the appropriate flips on X/Y, cos/sin, the arch is starting to look like an arch with an increasing number of calculated segments.

Image 1
0

Helix and Kinect

Anonymous 10 years ago 0
This discussion was imported from CodePlex

jmontoya wrote at 2012-03-23 13:45:

I am using Helix to display a point cloud from kinect it is working very well. I have 2 questions. First can I chnage the color for each point? do you have any registration tools? I want to combine multiple clouds to create a 3D solid. Thanks in advance.


objo wrote at 2012-04-03 01:34:

I have been thinking about creating a similar demo, showing the depth image as a mesh and using the rgb image for the texture map...

Are you using the PointsVisual3D to display the point cloud? This only supports a single color, but can be extended to support a material containing a 'palette' of colors (then you can set different colors for each point by texture coordinates). Setting different material to each point will be too slow.


jmontoya wrote at 2012-04-03 02:26:

Yes I am using PointsVisual3D to display the point cloud and it is working well. I am very interested in the approach you are suggesting but I don't know where to start. I am kind of new to 3D but I am trying to learn from your very good samples. If you decide to create your sample I will be checking and if you think there is something I can help with please let me know.

If I display a single cloud, it works well but when I try to display all the frames coming from kinect it just takes over the CPU.


objo wrote at 2012-04-03 21:54:

I think you could create a subclass of PointsVisual3D to get what you need.

Set the Model.Material = new DiffuseMaterial(new ImageBrush(image)) where image is coming from the kinect.

Then override the UpdateGeometry method and set the Mesh.TextureCoordinates for all points in your cloud (remember to copy 6 times (number of vertices in 2 triangles) for each point).

Are you adding 640x480 = 307200 points to the PointsVisual3D? That will for sure be very cpu intensive!


objo wrote at 2012-04-08 13:22:

I added a small kinect example (Examples/Kinect/DepthSensorDemo). All code is in the MainWindow code-behind (should be easy to refactor to a view-model). The demo reads the depth and color data and creates an image material and a triangular mesh (triangles containing too far/too near points are not included, as well as triangles where the depth range exceeds a given limit). The transform from depth data to 3D points can be improved, it would be interesting to get the correct scale (e.g. in meter or millimeter). Do you have a better solution on how to transform the depth data to 3D?

I let the CompositionTarget.Rendering event control how often the depth and color data is updated, I am getting ok refresh rates even on the 640x480 depth mode.


pyrrhicpk wrote at 2012-11-06 04:52:

jmontoya wrote:

Yes I am using PointsVisual3D to display the point cloud and it is working well. I am very interested in the approach you are suggesting but I don't know where to start. I am kind of new to 3D but I am trying to learn from your very good samples. If you decide to create your sample I will be checking and if you think there is something I can help with please let me know.

If I display a single cloud, it works well but when I try to display all the frames coming from kinect it just takes over the CPU.

 

Hi,

Can you drop in some sample code how to display the point cloud using PointsVisual3D please? I am trying to display it using MeshBuilder.AddSphere however, it freezes the UI. I have the points in x,y,z and I just want to display them in helixviewport3d. How can I do it using PointsVisual3D? Please advise me.

Thanks

 

0

Touch controls

Anonymous 10 years ago 0
This discussion was imported from CodePlex

AnotherBor wrote at 2014-01-08 11:56:

I noticed that when I use a touch panel to interact with the scene sometimes I have to double-tap before Helix understands I want to rotate the view. If I just drag, Helix pans the view.

If I set the rotate gesture to LMB and simply put my finger on the screen and drag, I can see the manipulation icon displaying but the camera does not react until I drag after double-tapping.

After I force Helix to notice my touch by double-tapping and play with the scene for a while, sometimes it flips back to whatever mode it was in before and again just touch-dragging does not do anything (or pans the view) but display the manipulation icon. After a double-tap (or a few), I can again simply just drag to rotate the view.

If I disable panning and remove pan gestures still first touch and drag just displays the manipulation icon but nothing else happens.

Is there any special setup I should employ to use touch for rotating the camera without initial double-tap?

objo wrote at 2014-01-08 12:18:

Are you using the latest version? I think I changed the touch gestures some time ago (before that I think double-tap was used to switch between rotate and pan mode)

AnotherBor wrote at 2014-01-08 12:31:

Now I use the latest version.
Indeed, single tap switches between pan and rotate.
But, in my app I don't need pan. If I remove pan gestures and disable panning, still to start rotating by touch I need to tap once.
That's very unintuitive.
Is there any way to switch to "drag rotates" mode by default?

objo wrote at 2014-01-09 11:43:

I had forgot to push some change October 26, 2013. See the latest version 2014.1.1.
With this change, a one finger gesture should rotate, a two finger gesture should pan and a pinch gesture should zoom. The double-tapping feature is removed.

AnotherBor wrote at 2014-01-10 02:33:

Yes!! Thank you, this is great!
0

It works on Pixelsense

Anonymous 10 years ago 0
This discussion was imported from CodePlex

JohnSourcer wrote at 2012-12-11 20:28:

Hi Objo,

After many hours of working with your toolkit, I managed to get it working on Pixelsense device SDK 2.

I have it in a ScatterViewItem and am able to rotate and zoom the 3D object (a globe in my case). I do however wonder if I have the code right (it seems to smell a little) and would appreciate any thoughts:

 

//Grabbed the touch event on the Helix3DViewport

private void HV3DTouchDown(object sender, TouchEventArgs e)
        {
            HelixViewport3D view = sender as HelixViewport3D;
            CameraController cameraController = view.CameraController;
            cameraController.TouchMode = TouchMode.Rotating;
            Manipulation.AddManipulator(cameraController, e.TouchDevice.AsManipulator());
            e.Handled = true;
            CaptureTouch(e.TouchDevice);
        }

JohnSourcer wrote at 2012-12-12 10:32:

Never relinqushes the touch though.


objo wrote at 2012-12-13 23:26:

Cool to hear you got it to work! Sorry I have now experience with the Pixelsense SDK. Do you need to add the manipulator to the camera controller on every touch down event?


JohnSourcer wrote at 2012-12-14 06:30:

Nah sorted that out.

When I zoom however, the Axis of the sphere changes but the camera still focuses on the old axis. So if you spin the globe now it goes all over the show. How do you reset the camera controller to view at the globe at the new zoom?

0

Looking to have an elbow developed for PipeVisual3D's

Anonymous 10 years ago 0
This discussion was imported from CodePlex

michaeldjackson wrote at 2012-10-24 21:21:

My manager asked that I provide an elbow fitting to go along with PipeVisual3D. Elbow should join two pipes at any angle and any change in diameter, ie: reducing elbow. I don't have enough experience or knowledge of WPF 3D to do it in the time frame alloted.

We are willing to fund the development, if reasonable. Fairly short timeframe.

Other simple fittings to follow, such as reducers.

Michael


objo wrote at 2012-10-26 08:51:

I don't know about a .NET implementation, but the GLE Tubing and Extrusion library creates nice 'elbows' on its tubes. There is also a java library mentioned on that page, but its link seems to be broken.

0

Helix not yet built ?

Anonymous 10 years ago 0
This discussion was imported from CodePlex

Rogad wrote at 2013-12-04 15:54:

Hi again,

Sorry for my noobiness but I have an error I can't figure out. In the solution explorer the Helix.Toolkit.Wpf reference has a alert icon next to it. I'm not sure what I need to do to correct that.

I guess this is what is causing the XAML to not be recognised ?

Can anyone nudge me in the right direction please ?

Thanks !





Rogad wrote at 2013-12-04 15:56:

P.S. this particular screenshot was from the ModelViewer example which actually runs fine, but I have those errors...

objo wrote at 2013-12-04 19:39:

Did you open the HelixToolkit.sln file?
The solution should build with 0 errors and 0 warnings on VS 2012, VS 2013 and VS Express 2013 for Windows Desktop.

Rogad wrote at 2013-12-04 20:26:

Ahh okay - I see how it's arranged now. No I was just cutting to the examples folder directly. Thanks, I think I get it now :)
0

unable to find samples

Anonymous 10 years ago 0
This discussion was imported from CodePlex

rocheey wrote at 2012-07-12 21:02:

downloaded the newest ver [HelixToolkit-2012.3.77.1.zip], and while there are samples, they are all compiled .exe's

Downloaded the examples file [HelixToolkit-examples.zip] and it is the same ... not one bit of source, only compiled exes...

Is there some place I can go to see some of the toolkit in action ?


rocheey wrote at 2012-07-12 23:09:

ooops... nevermind ... found it  :)


objo wrote at 2012-08-09 01:07:

I added a note in bold in the download's "Release notes" now.

I recommend cloning the source with Hg from https://hg.codeplex.com/helixtoolkit

You can also download the latest source from the "Source code" tab.

0

N-Dimensional Ellipsoid in 3D Space

Anonymous 10 years ago 0
This discussion was imported from CodePlex

CMC wrote at 2013-02-20 00:22:

I have a challenge. I would like to represent multiple axes in a 3D ellipsoid. Let's say I have 5 unit axes, so that it's non-trivial, all originating from the same point (origin) and all pointing equal angles from each other. If the current values for each axis is 0.5 (equal) then the 3D shape is a sphere. If one axis is valued at 0.75 and the rest 0.5 then the ellipsoid bulges in that direction. "Bulges" suggests that the surface is interpolated spherically between axis values. The number of axes can vary from case to case.

Does anyone know how to do this? I've searched the web fruitlessly.

Added Bonus challenge: The bulge is colored in a gradient on the ellipsoid as a function of the degree of "bulging".

Thanks.

objo wrote at 2013-02-20 11:34:

I would suggest to map the unit axes to spherical coordinates. Then interpolate the values (radii) on a 2D array (in phi/theta space), and map back to XYZ coordinates. This should be the positions of your mesh. Create the triangle indices the same way as done in the MeshBuilder.AddSphere method.
To get the color gradient, you should use texture coordinates. Normalize the values to [0,1] and use a material with a gradient brush.

CMC wrote at 2013-02-21 02:37:

Thank you for your guidance. Perhaps I will start first by trying to draw the N-Dimensional axes, with gradient colors from blue to red (cold to hot) radiating outward,, like spines (Sea Urchin diagram) :)
0

Animate color property of SphereVisual3D's material.brush

Anonymous 10 years ago 0
This discussion was imported from CodePlex

mfoste wrote at 2013-07-03 21:52:

Hello,

I'm trying to animate the Brush.ColorProperty of the DiffuseMaterial assigned to a SphereVisual3D object in code, but am not having any success. I'd appreciate any suggestions anyone can offer.

In the class constructor:
            targetModel = new SphereVisual3D();

            targetModel.Center = new Point3D(0,0,0);
            targetModel.Radius = 3;
            targetModel.Material = FindResource("TargetMaterial") as Material;
Later, as a response to a button press:
                ColorAnimation myColorAnimation = new ColorAnimation();
                myColorAnimation.To = Colors.Red;
                myColorAnimation.BeginTime = TimeSpan.FromSeconds(0);
                myColorAnimation.Duration = TimeSpan.FromSeconds(.5);
                myColorAnimation.FillBehavior = FillBehavior.HoldEnd;

                DiffuseMaterial material = targetModel.Model.Material as DiffuseMaterial;
                Storyboard.SetTarget(myColorAnimation, material.Brush);
                Storyboard.SetTargetProperty(myColorAnimation, new PropertyPath(SolidColorBrush.ColorProperty));

                Storyboard myStoryboard = new Storyboard();
                myStoryboard.Duration = TimeSpan.FromSeconds(3);
                myStoryboard.RepeatBehavior = RepeatBehavior.Forever;
                myStoryboard.Children.Add(myColorAnimation);
                myStoryboard.Begin();
BTW - I was able to successfully animate the SphereVisual3D's radius property, but I have not been successful at it's material brush color property.

mfoste wrote at 2013-07-03 22:21:

Forgot to mention... Great toolkit! Thanks for your hard work!
0
Under review

Clickability between oxyplot and helix

pettertho 10 years ago updated by anonymous 8 years ago 8
Hi all,

Me and a classmate are doing a school assignment where we're asked to develop av visualizing program for tomography data. For parts of this project we are using Helix and Oxyplot. Helix to model the pipes in question with Pipe3D, and Oxyplot to plot an intensity chart for the data set.
The data set is several 2D matrices, one for each measurement. This is processed into a bitmap which is displayed onto the 3D model.

We are using MVVM as our design pattern.

We want to introduce clickability and interactivity between these two parts. When a point or a field is marked with the pointer in the oxyplot, the same area should also be marked on the Helix model, or vice versa. The question is which is the best way to do this, and how does one do it? (bear in mind we are not experienced programmers)

Please feel free to ask any questions!