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!

Help with cutting plane group

Nit29 3 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}">
<MultiBinding Converter="{StaticResource CuttingPlaneConverter}">
<Binding Path="DataContext.IsBindableCuttingPlanesEnabled.DataValue" RelativeSource="{RelativeSource AncestorType=UserControl}" />
<Binding Path="DataContext.MainViewTitle.DataValue" RelativeSource="{RelativeSource AncestorType=UserControl}" />
<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 x:Name="SecondTeethPlanesContainerElement" Visibility="{Binding SecondToothPlanesVisibility.DataValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Transform="{Binding InvertedModelTransform.DataValue}">
<controls:PlanesControl Transform="{Binding SecondToothPlanesTransform.DataValue}"/>
<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 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>


Purpose of EnableCurrentPosition property

everytimer 4 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:

protected override void OnMouseMove(MouseEventArgs e)

if (this.EnableCurrentPosition)
var pt = e.GetPosition(this);
var pos = this.FindNearestPoint(pt);
if (pos != null)
this.CurrentPosition = pos.Value;
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?

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 =>

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

Ardahan 3 years ago in Question • updated 3 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

facematerial manipulator in code

Solutionideas mod 3 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

Camera LookDirection Automatically

Ardahan 3 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.


How to change default world coordinates

Michael Powell 4 years ago in Question • updated 4 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.

How to read facets one by one from already loaded STL file?

Ardahan 3 years ago in Question 0

I am loading STL file into viewport and then I want to read each facet in that model. In helixtoolkit STLReader class it is done from reading stream, but this methods is private so I can't call it in my program. Is there any public method for reading facets or should I override this existing methods?


Finding intersection point between a PipeVisual3D and ModelVisual3D

Nit29 3 years ago in Question • updated 3 years ago 1
Is there a way to find the intersection point of a pipevisual3d and a modelvisual3d element?
Under review

3D Surface with Pointcloud

Misunderstood 4 years ago in Question • updated 4 years ago 2

thanks for that great toolkit! Really like to work with it. Actually i am searching for a way to calculate a 3D surface out of a pointcloud. How am i able to do that? I allready got the points in a list (
The result should be a rectangle with drillholes.

I appreciate any kind of help.