Skip to content

Commit 739c457

Browse files
committed
ghpython vizualize trajectory component fix
1 parent c48502e commit 739c457

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Removed
1515

16+
### Fixed
17+
* Replaced the deprecated `draw_frame` function with `frame_to_rhino_plane` in the *Visualize Trajectory* GhPython component to restore correct frame visualization.
18+
1619

1720
## [1.1.2] 2025-10-31
1821

CONTRIBUTING.rst

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,28 @@ We love pull requests from everyone! Here's a quick guide to improve the code:
1212

1313
1. Fork `the repository <https://github.com/compas-dev/compas_fab>`_ and clone the fork.
1414
2. Create a virtual environment using your tool of choice (e.g. ``virtualenv``, ``conda``, etc).
15-
3. Install development dependencies:
15+
3. Install the development dependencies:
1616

1717
::
1818

1919
pip install -r requirements-dev.txt
20+
pip install -e .
2021

21-
4. From the `compas_fab` directory, run the docker containers:
22+
.. note::
23+
24+
**Windows users:** The ``pybullet`` package often fails to build from source when installed
25+
via ``pip`` due to missing C++ build tools.
26+
To avoid this, **comment out the ``pybullet`` line in ``requirements-dev.txt``** before running
27+
``pip install -r requirements-dev.txt`` and then install ``pybullet`` separately using:
28+
29+
::
30+
31+
conda install -c conda-forge pybullet
32+
33+
This ensures that the precompiled conda-forge package is used instead of attempting
34+
to compile ``pybullet`` from source.
35+
36+
1. From the `compas_fab` directory, run the docker containers:
2237

2338
::
2439

@@ -30,6 +45,16 @@ We love pull requests from everyone! Here's a quick guide to improve the code:
3045

3146
invoke test --doctest --codeblock
3247

48+
.. note::
49+
50+
If you see the error ``No idea what '--codeblock' is!'', it means your version of the
51+
task definitions does not support the ``--codeblock`` option.
52+
In that case, simply remove ``--codeblock`` and run:
53+
54+
::
55+
56+
invoke test --doctest
57+
3358
6. Start making your changes to the **main** branch (or branch off of it).
3459
7. Make sure all tests still pass:
3560

src/compas_fab/ghpython/components/Cf_VisualizeTrajectory/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
COMPAS FAB v1.1.2
55
"""
66

7-
from compas_ghpython import draw_frame
7+
from compas_rhino.conversions import frame_to_rhino_plane
88
from compas_ghpython.sets import list_to_ghtree
99
from ghpythonlib.componentbase import executingcomponent as component
1010

@@ -29,7 +29,7 @@ def RunScript(self, robot, group, trajectory):
2929
robot.merge_group_with_full_configuration(c, trajectory.start_configuration, group)
3030
)
3131
frame = robot.forward_kinematics(c, group, options=dict(solver="model"))
32-
planes.append(draw_frame(frame))
32+
planes.append(frame_to_rhino_plane(frame))
3333
positions.append(c.positions)
3434
velocities.append(c.velocities)
3535
accelerations.append(c.accelerations)

0 commit comments

Comments
 (0)