|
Mesh3DFactoryCreateExtrudedMeshGeometry(IListPoint, Boolean, Vector3D, Vector3D, Vector3D, ExtrudeTextureCoordinatesGenerationType, Boolean, Boolean) Method |
Returns a MeshGeometry3D that is created from 2D polygon defined by positions and that is extruded by using extrudeVector.
Namespace: Ab3d.MeshesAssembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax public static MeshGeometry3D CreateExtrudedMeshGeometry(
IList<Point> positions,
bool isSmooth,
Vector3D modelOffset,
Vector3D extrudeVector,
Vector3D shapeYVector,
ExtrudeTextureCoordinatesGenerationType textureCoordinatesGenerationType = ExtrudeTextureCoordinatesGenerationType.Cylindrical,
bool addBottomTriangles = true,
bool addTopTriangles = true
)
Parameters
- positions IListPoint
- IList of 2D position that define the polygon that is used as the bottom and top surface
- isSmooth Boolean
- If true than the mesh appears smooth, if false the edges are sharp
- modelOffset Vector3D
- Vector3D that defines an offset of the model - offset is added to each position
- extrudeVector Vector3D
- Vector3D that defines the extrusion direction and the distance from the start and end surfaces
- shapeYVector Vector3D
- Vector3D that defines the 3D direction of the y axis in the positions list
- textureCoordinatesGenerationType ExtrudeTextureCoordinatesGenerationType (Optional)
- type of texture geometry generation (Cylindrical by default)
- addBottomTriangles Boolean (Optional)
- when true (by default) the triangles for the bottom part of the object are created, otherwise the bottom part is opened
- addTopTriangles Boolean (Optional)
- when true (by default) the triangles for the top part of the object are created, otherwise the top part is opened
Return Value
MeshGeometry3DMeshGeometry3D that is created from 2D polygon defined by positions and that is extruded by using extrudeVector
Exceptions Exception | Condition |
---|
FormatException | This method can throw FormatException when positions are not correctly defined - for example if lines intersect each other |
Remarks CreateExtrudedMeshGeometry creates a MeshGeometry3D that represent an extruded 3D objects that is defined with 2D polygon (defined by positions) and that is extruded by using extrudeVector.
This method uses Triangulator to create 3D surface from 2D positions.
NOTE:
Because CreateExtrudedMeshGeometry is calling CreateTriangleIndices method (defined in Ab3d.Utilities.Triangulator class), it can throw FormatException when positions are not correctly defined - for example if lines intersect each other.
See Also