Git Product home page Git Product logo

Comments (9)

kilacoda-old avatar kilacoda-old commented on July 19, 2024 1

Ah yeah, guess I missed that when I was moving to the TexTemplates. Will push a fix soon.

from chanim.

kilacoda-old avatar kilacoda-old commented on July 19, 2024 1

@emonhossainraihan fixed in 4c079c6

from chanim.

Popular-Matter avatar Popular-Matter commented on July 19, 2024

Edit: So I realized what the issue may be. Whenever I try to use the Write function within self.play, apparently the arrow (and everything after it) cannot be written. Hope this makes sense. If you need clarification do let me know.

Curious to know why it's having that issue.

from chanim.

kilacoda avatar kilacoda commented on July 19, 2024

I was having such problems with Reaction as well earlier but it somehow automatically worked after a few days. I have no idea whatsoever why.

from chanim.

Popular-Matter avatar Popular-Matter commented on July 19, 2024

My guess is that it could be a rendering issue of some sort. I was digging deeper into other issues that could appear with using chemfig through manim and found this: malhotra5/Manim-Tutorial#10

I'm assuming that you hadn't modified the code in any way and that's why you're unsure as to why it suddenly works now haha.

from chanim.

kilacoda avatar kilacoda commented on July 19, 2024

Haha. Though that should be fixed because everything in chanim is with stroke_width=2. That's why this thing works in the first place.

from chanim.

Popular-Matter avatar Popular-Matter commented on July 19, 2024

Gotcha.

Well I'll still keep this issue open. I'll give you the code that I made and a video showing the issues:

from manimlib.imports import *
from chanimlib.imports import *

class ReactionScheme(Scene):
    def construct(self):
        molecule1 = ['O*3(---)']
        molecule2 = ['O*4(----)']
        reaction1 = Reaction(molecule1, molecule2, 'forward', 1, 0, 'white', 'heat', 'neat')
        reaction1.set_stroke(WHITE, 1)
        self.play(reaction1.shift, LEFT*1)
        self.play(Write(reaction1))

Link to video: https://vimeo.com/413870747

Let me know if you spot anything that's off. I'm also reusing the default chem_objects.py and constants.py (your version).

Also I'm curious to know if this issue happens if you were to reinstall manim/chanim.

Thanks!

from chanim.

kilacoda avatar kilacoda commented on July 19, 2024

I guess I can rule out the possibility of this being an issue specific to my system then. And for some reason, this problem's occurring again for me.

from chanim.

emonhossainraihan avatar emonhossainraihan commented on July 19, 2024

@kilacoda I was facing an issue with ChemArrow, like

CArrow(text_up="Upper text",length=2)

give me,

AttributeError: ChemArrow object has no attribute 'template_tex_file_body'

I was guessing the problem was there wasn't defined what template_tex_file_body is inside the ChemArrow class,

class ChemArrow(MathTex):
    ...
        self.template_tex_file_body = self.template_tex_file_body.replace(
            "\\setchemfig{atom sep=2em}", f"{set_chemfig}"
        )

        arrow = "\\arrow{%s[%s][%s]}" % (self.arrows[_type], text_up, text_down)
        MathTex.__init__(self, arrow, stroke_width=stroke_width, **kwargs)

from chanim.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.