BlockResearchGroup / compas_assembly

Assembly data structures for the COMPAS framework.
https://blockresearchgroup.github.io/compas_assembly
MIT License
9 stars 17 forks source link

AssemblyArtist.draw_interfaces error : 'module' object has no attribute 'draw_faces'. #1

Closed yck011522 closed 5 years ago

yck011522 commented 5 years ago

Describe the bug In class compas_assembly.rhino.AssemblyArtist The method AssemblyArtist.draw_interfaces is not working.

It throws an error 'module' object has no attribute 'draw_faces'. On line 189, in draw_interfaces, "C:\Users\leungp\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas_assembly\rhino\artists.py"

I think the line compas_rhino.draw_faces(faces, layer=layer, clear=False, redraw=False) is not working.

To Reproduce Steps to reproduce the behavior:

  1. Code written in Rhino Python Script editor
  2. Sample script:
    
    from compas_assembly.rhino import AssemblyArtist
    from compas_assembly.datastructures import Assembly

Load Assembly Interfaces

assembly = Assembly.from_json('assembly_with_interfaces.json')

from compas_assembly.rhino import AssemblyArtist

artist = AssemblyArtist(assembly,layer='Assembly')

artist.clear_blocks()

artist.draw_blocks(show_faces=False, show_edges=True)

artist.draw_interfaces()


3. Sample data
https://we.tl/t-ocHpWKS0nP 
(Can send you the data file if necessary)

4. See error

Message: 'module' object has no attribute 'draw_faces'

Traceback:
  line 189, in draw_interfaces, "C:\Users\leungp\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas_assembly\rhino\artists.py"
  line 17, in <module>, "G:\01_Projekte\270_PhD_SpatialTimberStructures\03_Design\20190716 YiJiang Integration\03VisualizeInterface.py"

**Expected behavior**
Expect it to work. See mesh faces drawn on screen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - Windows 10 64 bit
 - Python 3.6.5 |Anaconda custom (64-bit)|
 - Conda virtual environment

**Additional context**
The sample data is created by xFunc call:
`assembly_interfaces_xfunc = XFunc('compas_assembly.datastructures.assembly_interfaces_xfunc', python='C:\ProgramData\Anaconda3\python.exe')`
tomvanmele commented 5 years ago

version of COMPAS and of compas_assembly?

yck011522 commented 5 years ago

compas.version '0.7.1' compas_assembly.version '0.1.7'

On Wed, 17 Jul 2019 at 13:47, Tom Van Mele notifications@github.com wrote:

version of COMPAS and of compas_assembly?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BlockResearchGroup/compas_assembly/issues/1?email_source=notifications&email_token=AAJ4Z5JIYAPEKQSNVIW2B43P74BDHA5CNFSM4IEPK24KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2D5UVY#issuecomment-512219735, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ4Z5KKYZ55MU2KWDZ4SBDP74BDHANCNFSM4IEPK24A .

-- Cheers

Victor Leung victorleung.info

tomvanmele commented 5 years ago

let me know if this is still an issue in 0.2.1...

yck011522 commented 5 years ago

Hi Tom, Thanks for the speedy update. Now it all works.