+
Skip to content

bezier.tri yields two different element orientation #725

@scdivi

Description

@scdivi

Hi,

I could create a VTK (or STL) based on extracting bezier.tri as connectivity to a set of vertices as follows:

bezier = domain.sample('bezier', 10)
points = bezier.eval(geom)
export.vtk(vtkpath, bezier.tri, points)

However, after exporting the generated geometry to a tool and observing the normal direction in each element, it shows that every alternative element has a inverted element orientation (see image below). I think this is not intentional and it would be better to rotate the orientation all to a direction.

For now, a simple fix is done using the following lines:

# Change element orientation
tri = bezier.tri.copy()
tri[1::2, 1] = bezier.tri[1::2, 2]
tri[1::2, 2] = bezier.tri[1::2, 1]

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载