Skip to content

LineSegments linewidth not working #141

@nikhilmishra000

Description

@nikhilmishra000

It seems that the linewidth property is ignored -- the visualization looks the same regardless of the linewidth that I set.

import meshcat

viz = meshcat.Visualizer()

start, end = np.zeros(3), np.ones(3)
linewidth = 100     # try 0.1, 1, 10, ...

viz["lines"].set_object(
    meshcat.geometry.LineSegments(
        meshcat.geometry.PointsGeometry(np.stack([start, end], axis=-1)),
        meshcat.geometry.LineBasicMaterial(linewidth=linewidth),
    )
)

In pythreejs, I could do something like this:

geometry = pythreejs.LineSegmentsGeometry(positions=np.stack([start, end])[None])
material = pythreejs.LineMaterial(linewidth=1)
pythreejs.LineSegments2(geometry, material)

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