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>