Click or drag to resize
AB4D logo

PlaneSliceGeometryModel3D(GeometryModel3D, Transform3D) Method

Slices the 3D model defined by GeometryModel3D with this Plane. If the geometryModel3D is fully in front of the Plane (in the direction of plane's Normal vector), then the same geometryModel3D is returned. If geometryModel3D intersects the plane, then a new sliced GeometryModel3D is returned. If geometryModel3D is in the back of the plane, then null is returned.

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public GeometryModel3D SliceGeometryModel3D(
	GeometryModel3D geometryModel3D,
	Transform3D parentTransform = null
)

Parameters

geometryModel3D  GeometryModel3D
GeometryModel3D
parentTransform  Transform3D  (Optional)
Transform3D that is added to the geometryModel3D (null by default)

Return Value

GeometryModel3D
GeometryModel3D that is in front of the plane
Remarks

SliceGeometryModel3D slices the 3D model defined by GeometryModel3D with this Plane. If the geometryModel3D is fully in front of the Plane (in the direction of plane's Normal vector), then the same geometryModel3D is returned. If geometryModel3D intersects the plane, then a new sliced GeometryModel3D is returned. If geometryModel3D is in the back of the plane, then null is returned.

Note for using with textured objects: SliceGeometryModel3D correctly calculates sliced TextureCoordinates, but to show the texture correctly, the ViewportUnits on ImageBrush needs to be set to BrushMappingMode.Absolute. It should not be set to BrushMappingMode.RelativeToBoundingBox (a default value in WPF). In case of RelativeToBoundingBox, both sliced parts of the 3D model will still show the whole texture).

See Also