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

Looking to have an elbow developed for PipeVisual3D's

Anonymous 11 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 11 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 11 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 11 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 11 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!
0

Custom Color to CoordinateSystemVisual

Anonymous 11 years ago updated by RS_FE 4 years ago 1
This discussion was imported from CodePlex

Goodlad wrote at 2014-07-19 09:47:

Hello,

I am trying to change the axis color on the CoordinateSystemVisual3d, but I can only get the black or the default (green, red, blue colors).
            <helix:CoordinateSystemVisual3D x:Name="Cord" ArrowLengths="10">
                <helix:CoordinateSystemVisual3D.XAxisColor>
                    <Color R="152" B="152" G="152"/>
                </helix:CoordinateSystemVisual3D.XAxisColor>
                <helix:CoordinateSystemVisual3D.YAxisColor>
                    <Color R="30" B="187" G="238"/>
                </helix:CoordinateSystemVisual3D.YAxisColor>
                <helix:CoordinateSystemVisual3D.ZAxisColor>
                    <Color R="68" B="35" G="80"/>
                </helix:CoordinateSystemVisual3D.ZAxisColor>
            </helix:CoordinateSystemVisual3D>
Thanks for any help,
John
0

Better way to load multiple models ?

Anonymous 11 years ago 0
This discussion was imported from CodePlex

Rogad wrote at 2013-12-08 18:10:

I was wondering if there is a better way to do this :
            ObjReader CurrentHelixObjReader = new ObjReader();
            neutral = CurrentHelixObjReader.Read("C:/Users/Roger/Desktop/cutie1/cutie.obj");

            ObjReader CurrentHelixObjReader2 = new ObjReader();
            anger = CurrentHelixObjReader2.Read("C:/Users/Roger/Desktop/cutie1/cutie_ExpressionAnger.obj");

            ObjReader CurrentHelixObjReader3 = new ObjReader();
            smile = CurrentHelixObjReader3.Read("C:/Users/Roger/Desktop/cutie1/cutie_ExpressionSmileOpen.obj");

            ObjReader CurrentHelixObjReader4 = new ObjReader();
            blink = CurrentHelixObjReader4.Read("C:/Users/Roger/Desktop/cutie1/cutie_ModifierBlinkLeft.obj");
So you can see I am loading 4 models.

I was thinking I could do this, but the individual models do not load, I think it's just loading the first one four times but I am not sure.
            ObjReader CurrentHelixObjReader = new ObjReader();
            neutral = CurrentHelixObjReader.Read("C:/Users/Roger/Desktop/cutie1/cutie.obj");
            anger = CurrentHelixObjReader.Read("C:/Users/Roger/Desktop/cutie1/cutie_ExpressionAnger.obj");
            smile = CurrentHelixObjReader.Read("C:/Users/Roger/Desktop/cutie1/cutie_ExpressionSmileOpen.obj");
            blink = CurrentHelixObjReader.Read("C:/Users/Roger/Desktop/cutie1/cutie_ModifierBlinkLeft.obj");

Rogad wrote at 2014-02-15 19:00:

Still stuck on this, anyone have any ideas ?

objo wrote at 2014-02-18 08:39:

The first code is correct, but I am considering adding an issue on refactoring the importers so it looks more like the second version. The exporters were recently refactored so they could be reused.
0

I wrote a pretty ugly hack for the ViewCubeVisual3D

Anonymous 11 years ago 0
This discussion was imported from CodePlex

Johan20D wrote at 2014-02-17 21:16:

It snaps to the closes 90° increment and then rotates 90° on each single click. The rotation would be nicer with arrows outside the cube. Not nice enough for a pull request, still useful imo.
        private void FaceMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!this.IsEnabled)
            {
                return;
            }

            var faceNormal = this.faceNormals[sender];
            var faceUp = this.faceUpVectors[sender];

            var lookDirection = -faceNormal;
            var upDirection = faceUp;
            lookDirection.Normalize();
            upDirection.Normalize();

            // Double-click reverses the look direction
            if (e.ClickCount == 2)
            {
                lookDirection *= -1;
                if (upDirection != this.ModelUpDirection)
                {
                    upDirection *= -1;
                }
            }

            if (this.Viewport != null)
            {
                var camera = this.Viewport.Camera as ProjectionCamera;
                if (camera != null)
                {
                    var target = camera.Position + camera.LookDirection;
                    double distance = camera.LookDirection.Length;
                    lookDirection *= distance;
                    var newPosition = target - lookDirection;
                    Vector3D crossProduct = Vector3D.CrossProduct(upDirection, lookDirection);
                    var vector3Ds = new[] { upDirection, -1*upDirection, crossProduct, -1*crossProduct };
                    double dp = 95;
                    foreach (var v in vector3Ds)
                    {
                        double tdp =Vector3D.AngleBetween(camera.UpDirection, v);
                        if (tdp < dp)
                        {
                            dp = tdp;
                            upDirection = v;
                        }
                    }
                    if (Vector3D.AngleBetween(upDirection, camera.UpDirection)  < 0.1)
                    {
                        var rot = new RotateTransform3D(new AxisAngleRotation3D(
                                  lookDirection, 90));
                        upDirection = rot.Transform(upDirection);
                    }
                    CameraHelper.AnimateTo(camera, newPosition, lookDirection, upDirection, 500);
                }
            }

            e.Handled = true;
            this.OnClicked(lookDirection, upDirection);
        }

objo wrote at 2014-02-18 08:37:

thanks for sharing your code - I will have a look at this when I get time :)
0

Can opacity issue be resolved with SharpDX fork ??

Anonymous 11 years ago 0
This discussion was imported from CodePlex

geoarsal wrote at 2014-02-18 06:02:

I was wondering, by using the sharpdx fork of helix toolkit, would the transparency be treated as they should be in 3D??

Case:
There are two semi-transparent planes cutting each other in the scene. This case can't be handled in WPF3D due the fact the models are not depth sorted. Even with the depth sorting, as the planes are cutting each other so one plane will partially hide the other.

Using sharpdx fork, would this case be handled as it is in WPF3D(one plane partially hiding other) or would this case be handled properly (both planes are partially visible from every angle)

objo wrote at 2014-02-18 08:34:

I know improved transparency methods are planned on the sharpdx fork, but it is not there yet.