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

Set zoom in/out capability

Michael Powell 5 years ago in Question • updated 5 years ago 1
More specifically, how to I set up a PerspectiveCamera (or better Camera, fit-to-purpose, i.e. orthogonal?) so that I can zoom in further than the default will allow?

Thank you...
WPF Media3D
0
Under review

Anyone any luck with WPF Attached Properties

Michael Powell 5 years ago in Question • updated by Øystein Bjørke 4 years ago 1
Hello,

I am interested to inject a ViewModel into the mix via the parent UserControl DataContext, which subsequently should relay that value to an Attached Dependency Property.

I'd like for interested views and models contained by the UserControl, or children therein, to be able to access the same attached property value.

I am studying some issues and 'tutorials' online, but thus far haven't had much luck retrieving the attached property value. I can listen for DataContext, no problem however.

Has anyone ever dealt with Attached Dependency Properties, or perhaps knows a good tutorial that explains it?

It's also possible that I need for 'children' of the problem to register with the property, but none of the examples stipulate that, or have conveniently left that part out (i.e. it's been alluded to in places).

Any insight is welcome.

Thank you...
WPF
0
Under review

Select Object into the view

Anonymous 5 years ago in Question • updated by Øystein Bjørke 5 years ago 1
This discussion was imported from CodePlex

CesarMayorine wrote at 2014-09-01 12:59:

how can I select a Object (Children) in view?

CesarMayorine wrote at 2014-09-01 13:00:

With mauseclick...
0

Help with cutting plane group

Nit29 4 years ago in Question 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 5 years ago in Question • updated by anonymous 2 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
Answered

Transparency drawing brush problem

Anonymous 5 years ago in Question • updated by Øystein Bjørke 5 years ago 2
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

How to store 3d models aspecially STL files in database?

Ardahan 4 years ago in Question • updated 4 years ago 5

I'am reading an STL file in my WPF c# application. I want to store it to database. All database connections are done but I don't know how to store 3d model in database. What kind of converting needed for this purpose? And later similarly I want to get that information from database to turn it 3d models.Is there any basic function for STL converting to binaries then merging it again?

WPF Media3D
0

facematerial manipulator in code

Solutionideas mod 4 years ago in Question 0

FaceMaterial default's color is blue , I need to change facematerial color by C#


I coding...

main.FaceMaterial = Materials.Red

and try to set transparent

main.FaceMaterial = nothing

it's not happen anything. 'main' it still 'Blue'


Please help. How can I change this property?

and Thanks to all answer and suggestion.

WPF Media3D
0

Camera LookDirection Automatically

Ardahan 4 years ago in Question • updated by anonymous 2 years ago 2

I adding to my viewport3d a model (STL file) using ModelImport function but first nothing show up. To see added 3DModel I have to do zoom out. My question is, are there any way to do dynamically/programmatically zoom out or rotate camera to the newly added model or anything needed to show it immediately.

I am using C# WPF.

WPF
0

How to change default world coordinates

Michael Powell 5 years ago in Question • updated 5 years ago 1
There's probably a simple way to do this, but how do I change the world coordinates? That is, when a default HelixViewport3D appears, and I include the gridlines, I want to extend this plane from its defaults.
WPF