ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
21.39k stars 1.56k forks source link

I tried to render 3D polyhedron using --renderer=opengl --write_to_movie to speed up, the following bug appears. #3247

Open HanwenJin16 opened 1 year ago

HanwenJin16 commented 1 year ago

Here is the code I used

from manim import *
import pywavefront
class MyObj(ThreeDScene):
    def construct(self):
        self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
        my_obj=pywavefront.Wavefront("myobj.obj",collect_faces=True)
        faces=my_obj.mesh_list[0].faces
        vertices=my_obj.vertices
        my_obj_mobj= Polyhedron(vertices, faces)
        for i in range(len(vertices)):
            my_obj_mobj.graph[i].scale(0)

        self.add(my_obj_mobj)

        self.begin_ambient_camera_rotation(rate=1)
        self.wait(6)

The bug says AttributeError: 'Dot3D' object has no attribute 'has_fill' myobj.txt

I have also incuded a text version of myobj.obj

MrDiver commented 1 year ago

Tip:

```py # Your code here class FunnyCode(): pass ```

can be used to create

# Your code here
class FunnyCode():
pass