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

Help with cutting plane group

Nit29 10 years ago 0
I have a bindable version of cutting plane group(a custom control wrapping the cutting plane group to make it bindable) that cuts the model correctly. However, other items are not cut in the group. The other items are custom control of type Visual3D. ModelVisual3D nested within the cuttingplane group gets cut but not the 'PlanesControl'. Below is the xaml-

<controls:BindableCuttingPlaneGroup Operation="Intersect" BindableCuttingPlanes="{Binding ModelCuttingPlanes.DataValue}">
<controls:BindableCuttingPlaneGroup.IsCuttingPlanesEnabled>
<MultiBinding Converter="{StaticResource CuttingPlaneConverter}">
<Binding Path="DataContext.IsBindableCuttingPlanesEnabled.DataValue" RelativeSource="{RelativeSource AncestorType=UserControl}" />
<Binding Path="DataContext.MainViewTitle.DataValue" RelativeSource="{RelativeSource AncestorType=UserControl}" />
</MultiBinding>
</controls:BindableCuttingPlaneGroup.IsCuttingPlanesEnabled>
<ContainerUIElement3D x:Name="MainContainer" Transform="{Binding ModelTransform.DataValue}">
<ModelVisual3D x:Name="Model3D" Content="{Binding Model3DGroupObj.DataValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<ContainerUIElement3D x:Name="FirstTeethPlanesContainerElement" Visibility="{Binding FirstToothPlanesVisibility.DataValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Transform="{Binding InvertedModelTransform.DataValue}">
<controls:PlanesControl Transform="{Binding FirstToothPlanesTransform.DataValue}"/>
</ContainerUIElement3D>
<ContainerUIElement3D x:Name="SecondTeethPlanesContainerElement" Visibility="{Binding SecondToothPlanesVisibility.DataValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Transform="{Binding InvertedModelTransform.DataValue}">
<controls:PlanesControl Transform="{Binding SecondToothPlanesTransform.DataValue}"/>
</ContainerUIElement3D>
<ContainerUIElement3D x:Name="ImplantationPlanesContainerElement" Visibility="{Binding ImplantationPlanesVisibility.DataValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Transform="{Binding InvertedModelTransform.DataValue}">
<controls:PlanesControl Transform="{Binding ImplantationPlanesTransform.DataValue}"/>
<ht:PipeVisual3D Fill="Red" Diameter="0.5" InnerDiameter="0" Point1="0,0,25" Point2="0,0,-25"></ht:PipeVisual3D>
</ContainerUIElement3D>
<ContainerUIElement3D x:Name="AdjContactContainer" Transform="{Binding InvertedModelTransform.DataValue}">
<ht:SphereVisual3D Radius="0.75" Fill="Red" Center="{Binding AdjContact1Point.DataValue}" Visible="{Binding AdjContact1Point.DataValue, Converter={StaticResource BoolConverter}}" />
<ht:SphereVisual3D Radius="0.75" Fill="Red" Center="{Binding AdjContact2Point.DataValue}" Visible="{Binding AdjContact2Point.DataValue, Converter={StaticResource BoolConverter}}" />
<ht:PipeVisual3D Fill="DodgerBlue" Diameter="0.5" InnerDiameter="0" Point1="{Binding AdjContact1Point.DataValue}" Point2="{Binding AdjContact2Point.DataValue}" Visible="{Binding AdjContactMidPoint.DataValue, Converter={StaticResource BoolConverter}}" />
<ht:SphereVisual3D Radius="0.75" Fill="Green" Center="{Binding AdjContactMidPoint.DataValue}" Visible="{Binding AdjContactMidPoint.DataValue, Converter={StaticResource BoolConverter}}" />
<ht:PipeVisual3D Fill="Yellow" Diameter="0.5" InnerDiameter="0" Point1="{Binding AdjContactMidPointVectored1.DataValue}" Point2="{Binding AdjContactMidPointVectored2.DataValue}" Visible="{Binding AdjContactMidPoint.DataValue, Converter={StaticResource BoolConverter}}"></ht:PipeVisual3D>
</ContainerUIElement3D>
</ContainerUIElement3D>
</controls:BindableCuttingPlaneGroup>



0

Purpose of EnableCurrentPosition property

everytimer 11 years ago updated by anonymous 8 years ago 3
What is the purpose of the EnableCurrentPosition property?

If we inspect the code we can see that it controls whether CurrentPosition is calculated or not:

[HelixViewport3D.cs]
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);


if (this.EnableCurrentPosition)
{
var pt = e.GetPosition(this);
var pos = this.FindNearestPoint(pt);
if (pos != null)
{
this.CurrentPosition = pos.Value;
}
else
{
var p = this.Viewport.UnProject(pt);
if (p != null)
{
this.CurrentPosition = p.Value;
}
}
}
}

So, each time OnMouseMove method is called the (Point3D) pos is calculated (by FindNearstPoint) and that may be a costly operation to perform each time the mouse is moved.

Why CurrentPosition is needed and why it is optional?
0

Dynamic Texture on "Earth"

Anonymous 11 years ago 0
This discussion was imported from CodePlex

Robert_Smart wrote at 2014-07-02 11:58:

Hi,

I've just started looking at Helix3D. It looks pretty awesome.

I was just wondering if anyone knew if it was possible or how difficult it would be to add a dynamic texture to something like the Earth demo, so as you zoomed in, you give the zoomed in region higher resolution textures? there are already a map tiling library (brutile) that can handle the fetching of the correct tiles from a mapserver, so it would just be a matter of replacing the texture with the correct resolution one in the correct place right?

Thanks,

Rob

objo wrote at 2014-07-02 13:06:

Yes, this would be a nice demo! I think you also need some level-of-detail (LOD) algorithm here - if you zoom in and tilt you will expose a large number of tiles! Does anyone know an easy way to solve this?

Robert_Smart wrote at 2014-07-02 15:11:

How would the dynamic texture work though? I don't know much about this kind of thing. I know how it works in a 2d environment, but am out of my depth with 3d at the moment.

MapSUI is a great example of map streaming using brutile, so i guess it would be a similar thing to this. I would be willing to lend a hand with the mapping side of things if someone can help with the 3d side of things!

If we can get this working i can see it looking like google earth, which would be awesome.

Thanks
0
Answered

Transparency drawing brush problem

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

behnam263 wrote at 2014-08-26 13:22:

I have perspective camera in helix 3d view and i assigned solidcolorbrush with materialhelper behind my object which is a modelvisaul3D. I assigned a drawing brush with transparent background but I have problem with transparency.When i want to draw modelvisual3D with transparent background on the modelvisual3D with solidcolorbrush, but My problem is about Order of drawing this in helixviewer! Is there any problem with wpf or helix with this?

behnam263 wrote at 2014-08-27 06:01:

I think this link can tell my problem better =>
http://m.blog.csdn.net/blog/wmjcom/4038384
0

sharpdx TeamCity??

Anonymous 11 years ago 0
This discussion was imported from CodePlex

eonxxx wrote at 2014-04-21 23:34:

Hi there,

got following Problems at runtime, usoing the sharpdx Alpha package from nuget.
StackTrace:
       bei HelixToolkit.Wpf.SharpDX.Viewport3DX.HelixToolkit.Wpf.SharpDX.IRenderer.Render(RenderContext context) in c:\TeamCity\buildAgent\work\4ff441572eb3435d\Source\HelixToolkit.Wpf.SharpDX\Controls\Viewport3DX.cs:Zeile 890.
and s on...

any suggestions? what is TeamCity and do I Need it to run the sharpdx Alpha?

thanks for help

eonxxx wrote at 2014-04-24 08:13:

Ok. Got it:

The problem was, that I didn't set the sharpdx_direct3d11_effects_x64.dll to be copied to the debug/release output folder (properties of the DLL).

Missed controls are just a side effect.
0

Overlay does not function when extending a template from a different project

Anonymous 11 years ago 0
This discussion was imported from CodePlex

JasonXtreme wrote at 2014-03-31 13:57:

Good day,

I have two projects in a WPF solution, P1 is the main .exe assembly including the Helix3DViewport and an object that extends a base class in P2. The base class in P2 sets up an interface and contains a function that among other things sets a text overlay via Overlay.SetPosition3D and updates it on interaction. If this base class is situated in P1, the overlay works perfectly, but if the base class is moved to the other project, the overlay simply applies the text to the bottom left corner of the overlay canvas. Could there be a workaround for this, as I really need the base class to be in a class library rather than in P1?

Thank you in advance,
Jason

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

This was difficult, can you create a small example that we can use to debug?

JasonXtreme wrote at 2014-04-30 01:41:

Terribly sorry I forgot, I found that I added the overlay static class manually (copied and pasted the code as it was not in the library for some reason). Adding this class to both projects solved the issue. I find it weird that I received no error though.
0

Fix for Memory Leak on MeshElement3D

Anonymous 11 years ago 0
This discussion was imported from CodePlex

crashedapp wrote at 2011-10-08 00:13:

I noticed I was getting a memory leak when removing a control from a page that was using several SphereVisual3D objects.

I was able to find the casue.

In MeshElement3D there is an event wired up to CompositionTarget.Rendering

The event doesn't even appear to be needed so I commented it out.

The memory leak is gone.

Thanks to Ants for their great profiler and thanks to you for your great Project!


objo wrote at 2011-10-08 20:53:

thanks for pointing this out!

I removed the subscription to the CompositionTarget.Rendering event, you are right - it should not be needed.

I also improved the ScreenSpaceLines CompositionTarget.Rendering event wiring - it should now unsubscribe automatically when an element is removed from the visual tree.

0

UpDirection Demo problem?

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

Elemental wrote at 2011-09-30 08:40:

Hello,

first of all I want to thank you for this great toolkit.

I downloaded it a few months ago when I started developing WPF3D apps and it helped me a lot to understand how things have to be done.

Today I downloaded the source again, but now the UpDirection demo does not work correctly anymore.

When rotating via right mouse button and moving the to the left or right, the rotation suddenly stops and I cannot rotate any further.

Can you confirm this problem? What is wrong here?

 

Best Regards


objo wrote at 2011-10-02 08:19:

Thanks for the notification! This should be corrected now, see revision 70973.


objo wrote at 2011-10-02 08:25:

Sorry, I forgot the importartant changes in CameraController\RotateHandler.cs, included in revision 70974.

0

How to apply a Matrix3D transform for MatrixCamera to the camera?

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

boyweb wrote at 2011-01-08 12:44:

We're using the Helix Toolkit to develop a application, and we've just met a problem, hope it can be solved.

We have used the ARToolkit to get the transform matrix of a model, and it gives us the Matrix3D which is for MatrixCamera. However, your camera is ProjectionCamera, we can't set the Matrix3D to it.

Do you have some way to solve it?

Sorry for my poor English.

:P 


objo wrote at 2011-01-10 07:59:

yes, the Helix Toolkit CameraController requires a ProjectionCamera for the transformations of the camera position. It would be interesting to include support for MatrixCameras too, but I have no solution to this right now. I guess it requires some math to find the right transformations for camera pan, rotate and zoom. I'll add it to the issue tracker!

0

Flights Demo - Rotate into View

Anonymous 11 years ago 0
This discussion was imported from CodePlex

crashedapp wrote at 2011-01-28 18:37:

Looking at the Flights Demo.

If I click on the model of earth - how would I go about moving the camera so it is directly looking at the point - giving the effect that the globe spun to that point etc...??

I tried view1.lookat... - it appears to just to pan.

-Great Project by the way!

 

private void OnMouseDown(object sender, MouseButtonEventArgs e) {

 var pt = view1.FindNearestPoint(e.GetPosition(view1));

 

if (pt.HasValue) {//todo rotate to clicked point}

 }

 

 

 

 

 

// Flights Demo window.xaml.cs - modify to sping glope so click point is centered in view


objo wrote at 2011-01-28 18:58:

I would like to get a Google Earth camera behaviour in that demo, but I'm not sure how to do this yet. Camera position and direction should be defined by lat, lon, altitude, heading and tilt...

The LookAt method changes the position of the camera and keeps the direction fixed.