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

How to set cameras target point

Anonymous 11 years ago updated by manypage 2 years ago 4
This discussion was imported from CodePlex

Rahvil wrote at 2011-09-07 12:13:

Hi again,

Is it possible to set the cameras target point from code. I found target point property from HelixView3D.CameraController.CameraTarget but it's read only. So basically what I would like to achieve from code is the same as double right clicking the model.

Thanks for the help in advance.


objo wrote at 2011-09-07 21:24:

Do you want to change the camera position or the look direction? I think that was the reason I did not add a setter.We could add a setter that changes one of these properties. Also notice that the CameraTarget is a plain property, not a bindable dependency property.


Rahvil wrote at 2011-09-12 10:08:

Thanks for the reply.

I achieved to do what I needed by changing camera position and look direction.

0

3D Modelling

Anonymous 11 years ago 0
This discussion was imported from CodePlex

elkhalafy wrote at 2013-06-22 16:30:

__Please, I hope Support 3D Modelling :-

1- Nurbs modelling ..
2- Poly Modelling ..
3- Sculpting Modelling ..

and I hope make Helix 3D Toolkit new version for WinForms ?.


Thank, Salam, Peace .

Mohamed .__

elkhalafy wrote at 2013-06-23 15:07:

No Answers

RobPerkins wrote at 2013-06-24 21:15:

You posted on a weekend and expected an instant response?

There are some limited helper functions for 3D modeling in the toolkit. Join us and contribute to the code base!

objo wrote at 2013-06-26 21:04:

1 - Sorry, there are no plans to include support for NURBS modelling in this library. I recommend using other libraries like http://www.opennurbs.org for this.
2 - The MeshBuilder contains support for revolve, extrude and simple loft operations. Better test coverage is planned here. There are some simple/experimental polygon algorithms implemented (subdivision, chamfer).
3 - Sorry, there no plans for sculpt modelling at this time.

See the "road map" on the home page for information on where I would like to see the library moving. I would also like to improve documentation and test coverage before adding more features or examples.

Support for Windows Forms is not planned, this library is currently for WPF only.
0

Programatically import TubeVisual3D into Viewport

Anonymous 11 years ago 0
This discussion was imported from CodePlex

iLovePasta wrote at 2013-01-18 08:05:

Hi. I've meen trying to dive into Helix Toolkit lately and it seems quite nice. But I realized, that I'm not able to programatically import TubeVisual3D into Viewport even though if I try to import some another Visual3D member (i.e. BillboardTextVisual3D), I have no problem with importing it.

Sample code should look like this:

 

 TubeVisual3D tube = new TubeVisual3D();
            tube.Path = new Point3DCollection();
            tube.Path.Add(new Point3D(2, 3, 5));
            tube.Path.Add(new Point3D(1, 4, -5));
            tube.Path.Add(new Point3D(1,2,1));
            tube.Diameter = 15;
            tube.ThetaDiv = 15;
            tube.Fill = Brushes.Navy;
            tube.IsPathClosed = true;
            //this adding into children does not work
            MainViewPort.Children.Add(tube);

            BillboardTextVisual3D bt = new BillboardTextVisual3D();
            bt.Text = "RndText";
            Height = 80;
            Width = 250;
            //this adding into children works
            MainViewPort.Children.Add(bt);

 What's wrong with my approach?

edit: solved :)

It's impossible to crete tube points this way.


objo wrote at 2013-01-18 13:06:

try to add the points in a Point3DCollection before setting the tube.Path property. Also, set the tube.Path property after all the other properties (for performance reasons).

0

Build problems.

Anonymous 11 years ago 0
This discussion was imported from CodePlex

noemata wrote at 2010-02-26 16:17:

Though previous releases of Helix 3D build without issue, I was not able to build the most recent archive (41796).

Any suggestions?

Also, I would like to display platonic solids algorithmically ... what approach would be best in the context of your formula based SurfaceDemo.  Ideally, I would like to have parameters control the construction of a given n-level platonic solid (would be cool to be able to show them in a partially unwrapped state).


objo wrote at 2010-02-27 17:47:

I have reverted some of the changes from that changelist, the new version 41967 hould build fine.

I don't think the frame rate calculation is correct - will consider to remove it if it is not possible to get the correct numbers. 

It would be cool to add a demo showing platonic solids - I would create a ModelVisual3D - do it a similar way as the BoxVisual3D. Or just render the edges by a SegmentCollectionVisual3D. Do you have the algorithm calculating the positions of the vertices? I would also like to create a geodesic dome/sphere visual later... :)

 


noemata wrote at 2010-02-27 19:49:

Great!! Everything builds again.  I think I have the code bits you would need.  How can I send this to you more directly.  Can you provide me with an email address?

Thanks a bunch!


ReedCopsey wrote at 2010-05-14 21:09:

FYI -  The latest build (48034) does not build, due to missing app.config files.


objo wrote at 2010-05-14 22:54:

Thanks for the notice! I have added the app.config files now and tested the latest change set with VS 2010.
0

IsHitTestVisible in Overlay example

Anonymous 11 years ago updated by everytimer 10 years ago 2
This discussion was imported from CodePlex

everytimer wrote at 2014-03-17 23:18:

By default in the example "Overlay" the canvas situated after the HelixViewPort3D has set the IsHitTestVisible property to False. What I want is to enable mouse events of the elements that I've rendered. I've set IsHitTestVisible to True, and now I can capture the user input clicks and everything seems to work correctly.

Are there any reason to disable that behavior? Any future disadvantages? If that's the case, what should I do to enable events to the visual element that are plotted? Thanks

objo wrote at 2014-04-29 10:55:

I guess the only issue is that you don't get rotate/zoom etc working when your mouse is over the visuals in your overlay.

everytimer wrote at 2014-04-29 18:15:

Thanks, I've realized about that just after trying it by myself.
0

TriangleIndices & Vertex Positions to LinesVisual3D

Anonymous 11 years ago 0
This discussion was imported from CodePlex

alexalthauser wrote at 2012-04-13 03:09:

Hey Guys,

I import a model using the Helix3d toolkit. Next, I perform a hit-test on the 3Dmodel. ThenI get the MeshGeometry3D information from rayMeshResult.Meshit. Finally I get the vertex position information, and triangleIndices from the MeshGeometry3D. Now I clone the points from LinesVisual3D, and then I feed the triangleIndices/vertex info into the clone. Finally, I copy the clone's point data into LinesVisual3D.Points, and add the lines to my viewport.

As you can see from the picture at the link, not all of the edges of the cube are drawn, yet all of the points are there.

http://www.freeimagehosting.net/fhws5

GeometryModel3D hitgeo = rayMeshResult.ModelHit as GeometryModel3D;
                MeshGeometry3D newGeom = rayMeshResult.MeshHit as MeshGeometry3D;
                Point3DCollection srtpnt = modelLines.Points.Clone();

                for (int i = 0; i < newGeom.TriangleIndices.Count; i ++)
                {
                    srtpnt.Add(newGeom.Positions[newGeom.TriangleIndices[i]]);
                    textBlock4.Text += newGeom.Positions[newGeom.TriangleIndices[i]].ToString() + "\n";
                }

                modelLines.Points = srtpnt;
                modelPoints.Points = srtpnt;

                modelPoints.Color = Colors.Red;
                modelPoints.Size = 15;

                modelLines.Thickness = 6;
                modelLines.Color = Colors.Blue;

                MainViewport.ClearChildren();
                MainViewport.Children.Add(modelLines);
                MainViewport.Children.Add(modelPoints);
                UpdateResultInfo(rayMeshResult);
            }


alexalthauser wrote at 2012-04-13 04:20:

I'm going to go out on a limb here and guess that the problem is that I'm calling the geometry information from the Meshhit, instead of from the imported model.


objo wrote at 2012-04-14 00:11:

I think the problem is that you are using the same points for the modelPoints and the modelLines.

The Points collection in the LinesVisual3D defines line segments.

It treats each pair of points as an independent line segment. Vertices 2 n - 1 and 2 n define line N / 2 lines are drawn.


alexalthauser wrote at 2012-04-14 00:37:

I understand what you are saying, but whether I use the points for modelPoints, or not, the modelLines, do not fully cover the cube.


alexalthauser wrote at 2012-04-14 02:20:

Ah, nevermind. I understand, it's my bad. Of course a model won't contain information for drawing lines from each vertex, I will have to code a method myself.

0

3D Surface Chart Axes

Anonymous 11 years ago 0
This discussion was imported from CodePlex

gizmodomn wrote at 2013-02-04 13:41:

I am using helix toolkit in my WPF application to show 3D surface charts. The one issue I have is that scales for the axes for the chart are not the same. I can get the data to show, but it is not very useful. Is there some type of scaling for these that I am missing, or is this something that needs to be done manually?

objo wrote at 2013-02-07 20:17:

I guess you are doing something similar to the SurfacePlot example?
You could apply a ScaleTransform3D to your Model3D or Visual3D object, but this will also scale labels and lines.
I think I would try to manually scale the positions of the mesh, and not use transforms!

gizmodomn wrote at 2013-02-14 14:43:

Yes, I am using the SurfacePlot as my example that I'm working from.

That's what I was thinking too. I'll give that a try, thanks!
0

Draw a pipe with layers ???

Anonymous 11 years ago 0
This discussion was imported from CodePlex

terry_513 wrote at 2014-01-16 10:43:

Hello friends,
I have to draw a area, that has 5 vertical areas (lets say layers of different color) each of difference length long. I want the total area (sort of surface) to be X wide and Y long. That will be as a background of the area. On that I got to draw an inclined pipe at certain point and angle. 

I am new in 3D world. I want to achieve this using Helix. I refereed tutorial http://kindohm.com/technical/WPF3DTutorial.htm and ExampleBrowser.exe execution. I couldn't get how to get started on my needs. 

Can anyone please help me know how to get started and achieve my goal. Any link for tutorial may also be helpful - as I am beginner in 3D & Helix. Awaiting for your guidance.

Thanks a lot.

objo wrote at 2014-01-26 20:39:

To learn WPF 3D I recommend:
http://www.charlespetzold.com/3d/
http://www.ericsink.com/wpf3d/

To learn HelixToolkit, I recommend getting the source code (clone or download) and play with the examples in the debugger!
0

Material won't load

Anonymous 11 years ago 0
This discussion was imported from CodePlex

gautamonline wrote at 2012-04-26 07:27:

Hi,

I created a project, added reference to the Helixtoolkit.Wpf project, and took a sphere from the EarthDemo. I placed the png file in the folder which contains the bin, obj and properties folder. The application uses Kinect input, so the user can manipulate the sphere using Kinect.

However materials do not show up when I run the application. Below is the code for the sphere. Please let me know what am I missing in using materials on sphere.

<h:HelixViewport3D x:Name="helixViewport3D1"  InfiniteSpin="True" ZoomExtentsWhenLoaded="True">
            <h:DefaultLights />
            <h:SphereVisual3D Radius="1" Material="{h:ImageMaterial TimeZones2008.png}" ThetaDiv="45" PhiDiv="30" Fill="#FF802121" />
        </h:HelixViewport3D>

thanks

Gautam


objo wrote at 2012-04-26 08:16:

I think your Fill property overrides the Material property. Remove the Fill setting. And make sure the png file is included as Content in your project.


gautamonline wrote at 2012-04-26 08:48:

Thanks for the help! The material is loading. File was in the wrong location. Fill settings did not affect the texture. 

One more question: The transparency which has been applied on the cloud.jpg, is not working. I copied the exact code.

I tried replacing jpg with a PNG file, but it didn't work. If the Binding in removed in the XAML, then the texture loads correctly, but without transparency. 

public static readonly DependencyProperty CloudsProperty = DependencyProperty.Register(
            "Clouds", typeof(Material), typeof(MainWindow), new UIPropertyMetadata(null));

this.Clouds = MaterialHelper.CreateImageMaterial("clouds.jpg", 0.5);

public Material Clouds
        {
            get
            {
                return (Material)this.GetValue(CloudsProperty);
            }

            set
            {
                this.SetValue(CloudsProperty, value);
            }
        }


<h:SphereVisual3D Radius="1.05" Material="{Binding Clouds}" ThetaDiv="90" PhiDiv="45"/>

0

Load 3d objects

Anonymous 11 years ago 0
This discussion was imported from CodePlex

baucez wrote at 2011-09-18 11:08:

Hi,

I am developing an app in which I have to load many 3d object (some of them are big).
Initially I tryed to include them as xaml in the resources but I reach the maximum dimension and visual studio cannot compile them, so I extract them in external xamls that I load dynamically when I need them but loading/parsing xaml files is slow.

I had the idea to compile them in BAML and see if they are faster but i read that baml files are not supported by microsoft

So now I ask to you..

Which is the best way to do it? Which is the fastest way (file format) to read an external 3d object?

 

Thanks,
Roberto.


objo wrote at 2011-09-18 13:52:

hi Roberto! I have not tested the performance on model loading of large files - but I guess the .3ds and .lwo importers (both binary files formats) in Helix toolkit are faster than xaml, baml, stl and .obj importers. Can you try to convert to .3ds or .lwo and compare? It would be interesting to know the result!


baucez wrote at 2011-09-18 16:48:

Actually i never use tools for 3d drawing so I don't know how to convert from autocad 2010/DXF/XAML to 3DS/LWO
I will try to convert files to those fomat and if I'll have success I'll give you feedback about performances.

Of course suggestion on how to convert my models to 3ds or lwo are welcome!! :)


baucez wrote at 2011-12-04 09:58:

It seems to be much more faster with 3ds, however I cannot have the same quality as the xaml version because of the conversoin tools.


objo wrote at 2011-12-04 10:40:

for conversion, try http://meshlab.sourceforge.net/ (open source) or http://www.okino.com/conv/filefrmt_3dexport.htm (commercial)