AB4D Forum

Full Version: Get 2D representation of geometries/models that intersect a plane
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Suppose I have a programmatically constructed 3D model containing some geometries that tessellate together.

I'm retrieving data from a SQL Server database as WKT from geometry-type fields, getting the co-ordinates, creating List<Point> objects, extruding them, then performing subtractions based on chronological order.

The "Slice" related methods in Ab3d.Utilities all deal with returning 3D data that exists in front of and/or behind the plane in question, which gets me part-way where I want to go, but what I'd really like to do is return a 2D representation of the geometry that exists at the exact location of the plane. A zero-thickness slice, if that makes sense.


Start with a shape having a recess.

[Image: https://i.imgur.com/LavF8XW.png]

Add a shape that tessellates into that recess.

[Image: https://i.imgur.com/kNzYLOo.png]

I need to select an arbitrary plane (elevation planes in my application)...

[Image: https://i.imgur.com/FH4ylVf.png]

...and get back a list of 2D geometry based on where the 3D geometry cross the plane.

[Image: https://i.imgur.com/9vwed7s.png]

Ideally the result is a collection of 2D shape objects that contain references back to the original 3D objects. I have a custom class that extends ModelVisual3D and stores metadata from the SQL Server database about what the shapes represent.

Any ideas?
Sorry for not answering before. This was a slightly more complicated task so I have postponed it. But when it was finished I have forgotten to reply to the post.

Anyway, the samples project that comes with the new version of Ab3d.PowerToys (v8.2) now includes code that can create and show 2D geometry that is created from a sliced 3D object (see the content in the left rectangle below):

[Image: https://www.ab4d.com/images/Ab3d_PowerTo...erToys.PNG]