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

getting bounds of viewport...

Anonymous 10 years ago updated by ไอยดา สุรีวงค์ 3 years ago 1
This discussion was imported from CodePlex

NMorgan wrote at 2011-08-22 16:45:

I was wondering how I could get the cordinate bounds that are being displayed in a viewport?  For instance the top left corner is (-100,100) and the bottom left corner is (100,-100).


objo wrote at 2011-08-22 20:37:

hi NMorgan, I don't quite understand what coordinates you need. Do you need the actual client rectangle of the HelixView control? Did you try

new Rect(VisualOffset.X, VisualOffset.Y, ActualWidth, ActualHeight);

(Temporarily arranging a control to VisualOffset=(0,0) helped me out in another project when I was rendering to a RenderTargetBitmap..)

If you need to project 3D coordinates on the 2D view, see the Helpers/ViewPort3DHelper class.


NMorgan wrote at 2011-08-23 14:49:

Hello, thanks for the reponse what I am looking for a rectangle (or just the coordinates of the points) that represents the area being displayed by the viewport. 


objo wrote at 2011-08-23 15:48:

Still do not understand. The HelixView control displays a 3D frustum (when using a ProjectionCamera).


NMorgan wrote at 2011-08-23 15:50:

I am using a orthographic camera not a projection. Basicly if I wanted to draw a point at the upper right hand corner of the viewpoint how would I go about getting the coordinates of that point.


objo wrote at 2011-08-23 20:24:

try

HelixToolkit.Viewport3DHelper.Point2DtoRay3D(yourViewport, new Point(yourViewport.ActualWidth,0))

I have not tested it, but I think this will work with an orthographic camera. Note that this will give you a ray, you can use the Point2DtoPoint3D method if you want a point at the near or far clip plane.
Petzold's 3D programming book could also be a good source for more solutions to this!  

0

import .max to Helix 3D Toolkit

Anonymous 10 years ago 0
This discussion was imported from CodePlex

francolico88 wrote at 2013-04-04 17:06:

Hello, as you can import models .max____? is compatible?
It is for an application I'm doing with KINECT SDK 1.7 with C# in Visual Studio 2012. I want to include in the Implementation of SkeletonPainter3D these models.
Help friends!

objo wrote at 2013-04-15 12:12:

Sorry, this toolkit cannot import .max models, but it has partial support for .3ds models!
0

Using Rotate Manipulator

Anonymous 10 years ago 0
This discussion was imported from CodePlex

ftp25 wrote at 2013-05-30 14:11:

Hi,
wanted to use a RotateManipulator in my application to rotate a Model (CubeVisual3D) all the time.

Now my problem is that I can see in Task-Manager that the memory usage of my application is always increasing as long as the cube is rotating.

Is this normal behaviour or am I missing something here?

Would be glad for any advice how to solve this problem.

objo wrote at 2013-06-08 07:20:

Can you try to run a memory profiler on your application to check whether there is an error in this library or in your application?
The RotateManipulator should just modify the transform of the cube, I don't expect a memory leak here.

ftp25 wrote at 2013-06-16 21:47:

I have spent now lot of time for finding the poblem causing the memory leak.
Now I know that the problem is not the rotate manipulator.
Everytime I'm using basic transformation like this with helixtoolkit
var g = new Transform3DGroup();
g.Children.Add(rotateTransform);
the problem is occuring.

I don't see the problem if I'm defining the rotation transformation in xaml like that:
                     <Transform3DGroup>
                            <RotateTransform3D>
                                <RotateTransform3D.Rotation>
                                    <AxisAngleRotation3D Axis="0,1,0" Angle="{Binding RotationAngle}"/>
                                </RotateTransform3D.Rotation>
                            </RotateTransform3D>
                        </Transform3DGroup>
I don't know why but it is like that.
Think I have to find a workaround for my problem.

Anyway, thanks for the great helixtoolkit!

BR
ftp25

Ranik wrote at 2014-04-15 12:20:

I am having the same issue as ftp25.
When I perform any camera gesture (zoom/rotate/pan) the amount of memory used by the application jumps by ~450MB.
I ran ANTS memory profiler on the application and it showed that all these extra memory is categorized under "Unmanagad Memory" and no further details where given by the profiler regarding this.
What could be the issue and what should I investigate?

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

I guess this is due to how WPF works internallly. Please let us know if you find any issues. Is the memory released later? It does not continue to increase, right?
0

Helix Controls

Anonymous 10 years ago 0
This discussion was imported from CodePlex

alexalthauser wrote at 2012-02-19 00:21:

Hi,

Are the Helix controls meant to show in the toolbox? Mine do not. If they are, which I kind of doubt, but if they are, can somebody plz give me a point in the right direction? I thought they might, since they are referred to as 'custom controls', but I could be mistaken. Either way, it's a really great library.

Thanks!


objo wrote at 2012-02-21 20:45:

are you auto populating the toolbox items? http://karlshifflett.wordpress.com/2009/10/27/new-options-for-visual-studio-2010-beta2-wpf-and-silverlight-projects/

I think it is also possible to right click in the toolbox and "choose items...", but I have not tried myself. All HelixToolkit.Wpf controls are showing up in the toolbox when I open the HelixToolkit solution here.

0

How to set cameras target point

Anonymous 10 years ago updated by manypage 7 months 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 10 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 10 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 10 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 10 years ago updated by everytimer 9 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 10 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.