Skip to content

Commit

Permalink
Fixing workspaceId (see #47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregwar committed Mar 2, 2021
1 parent 5f69c32 commit 0614664
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions onshape_to_robot/load_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
config['versionId']+' ...' + Style.RESET_ALL)
elif config['workspaceId'] != '':
print("\n" + Style.BRIGHT + '* Using configuration workspace ID ' +
config['workspace']+' ...' + Style.RESET_ALL)
config['workspaceId']+' ...' + Style.RESET_ALL)
workspaceId = config['workspaceId']
else:
print("\n" + Style.BRIGHT + '* Retrieving workspace ID ...' + Style.RESET_ALL)
document = client.get_document(config['documentId']).json()
Expand All @@ -29,9 +30,6 @@
if config['versionId'] != '':
elements = client.list_elements(
config['documentId'], config['versionId'], 'v').json()
elif config['workspaceId'] != '':
elements = client.list_elements(
config['documentId'], config['workspaceId'], 'w').json()
else:
elements = client.list_elements(config['documentId'], workspaceId).json()
assemblyId = None
Expand All @@ -54,9 +52,6 @@
if config['versionId'] != '':
assembly = client.get_assembly(
config['documentId'], config['versionId'], assemblyId, 'v')
elif config['workspaceId'] != '':
assembly = client.get_assembly(
config['documentId'], config['workspaceId'], assemblyId, 'w')
else:
assembly = client.get_assembly(
config['documentId'], workspaceId, assemblyId)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="onshape-to-robot",
version="0.3.8",
version="0.3.9",
author="Rhoban team",
author_email="[email protected]",
description="Converting OnShape assembly to robot definition (SDF or URDF) through OnShape API ",
Expand Down

0 comments on commit 0614664

Please sign in to comment.