Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render_joints=True animation issue #138

Open
javimixet opened this issue Dec 24, 2024 · 1 comment
Open

render_joints=True animation issue #138

javimixet opened this issue Dec 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@javimixet
Copy link

Hi. I'm playing with ocp_viewer's animation features and render_joints=True seems to mess the reference for the animation:

from build123d import *
from ocp_vscode import *
from bd_warehouse.pipe import PipeSection

set_defaults(reset_camera=Camera.KEEP)

with BuildPart() as pipe_builder:
    # Create the pipe
    with BuildLine():
        path = TangentArc((0, 0, 0), (2 * FT, 0, 1 * FT), tangent=(1, 0, 0))
    with BuildSketch(Plane(origin=path @ 0, z_dir=path % 0)):
        PipeSection("10", material="stainless", identifier="40S")
    sweep()

    RigidJoint(label="outlet", joint_location=path.location_at(1))

with BuildPart() as ball:
    Sphere(0.25 * FT)

    RevoluteJoint(label="ball_j")

pipe_builder.part.joints["outlet"].connect_to(ball.part.joints["ball_j"])

pipe_builder.part.label = "pipe"
ball.part.label = "ball"

assembly = Compound(
    label="assembly",
    children=[pipe_builder.part, ball.part],
)

show(assembly)
# show(assembly, render_joints=True)

anim = animation.Animation(assembly)
anim.add_track("/assembly/ball", "rz", [0, 1, 2, 3, 4], [0, 90, 180, 270, 360])
anim.animate(1)
anim_nrj.mp4
anim_rj.mp4
@bernhard-42 bernhard-42 added the bug Something isn't working label Feb 4, 2025
@bernhard-42
Copy link
Owner

This is not a quick fix, it needs some deeper analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants