Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

compas_ghpython.draw_points() broken

See original GitHub issue

Issue Description

I think the code for these drawing methods need some update

for example pos = p['pos'] gives a bug on a new compas.Point

I don’t have the latest HEAD at hand at the moment, but I believe the following code will not run in gh_python:

from compas_rhino.geometry import RhinoPoint
from compas_ghpython import draw_points
compas_points = []
compas_points  .append(RhinoPoint.from_geometry(point_input).to_compas())
output = draw_points(compas_points)

on my environment (c065d430021deed86fec09abee43ec7a87fa453a) it returns

Runtime error (TypeErrorException): not all arguments converted during string formatting

  line 169, in __getitem__, "C:\Users\leungp\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\geometry\_primitives\"
  line 75, in draw_points, "C:\Users\leungp\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas_ghpython\utilities\"
  line 21, in script

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

brgcodecommented, Jul 16, 2020

this should be documented now. artists are in the works…

brgcodecommented, Jul 7, 2020

@gonzalocasas yes indeed. i will see what can be done about this in the short term.

@yck011522 this does not replace compas and/or rhino geometry objects but smoothens out some of the issues you have highlighted. the low-level drawing functions should not be used directly and have more intuitive artist-based equivalents like is currently already the case (to some extent) in compas_rhino

Read more comments on GitHub >

github_iconTop Results From Across the Web

matplotlib: drawing lines between points ignoring missing data
Matplotlib only draws a line between consecutive (valid) data points, and leaves a gap at NaN values. A solution if you are using...
Read more >
Polar plot — Matplotlib 3.6.2 documentation
Polar plot#. Demo of a line plot on a polar axis. import numpy as np import matplotlib.pyplot as plt r = np.arange(0, 2,...
Read more >
Python API - CARLA Simulator - Read the Docs
Applies an angular impulse at the center of mass of the actor. This method should be used for instantaneous torques, usually applied once....
Read more >
CodeWars-7-kyu-Soluitions-part-2 - GitHub
Balanced ().js · Create Balanced ().js. 3 years ago ... Broken Collatz.js · Create Broken Collatz.js. 3 years ago ... Canvas Fun #1:...
Read more >
TikZ and pgf
\tikzstyle{edge from parent}=[snake=expanding waves,segment length=1mm,segment angle=10,draw]. \tikz [grow cyclic,shape=circle,very thick,level ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found