Skip to content

Commit 8c97072

Browse files
authored
Merge branch 'main' into robot_visuals_blender
2 parents 14981d9 + 25e2891 commit 8c97072

File tree

12 files changed

+34
-29
lines changed

12 files changed

+34
-29
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: build
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
build-packages:

.github/workflows/cleanup.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: cleanup
22

3-
# triggered whenever a PR submitted to master is merged or closed
3+
# triggered whenever a PR submitted to main is merged or closed
44
on:
55
pull_request:
6-
types: [closed]
6+
types: [closed]
77
branches:
8-
- master
8+
- main
99

1010
jobs:
1111
build:
@@ -40,6 +40,6 @@ jobs:
4040
with:
4141
target_branch: gh-pages
4242
build_dir: ./
43-
keep_history: false
43+
keep_history: false
4444
env:
45-
GH_PAT: ${{ secrets.GH_PAT }}
45+
GH_PAT: ${{ secrets.GH_PAT }}

.github/workflows/docs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: docs
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
tags:
88
- 'v*'
99
pull_request:
1010
branches:
11-
- master
11+
- main
1212

1313
jobs:
1414
build:
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
invoke docs
3737
# Get branch/tag/latest name from git
38-
GITHUB_REF_REGEX="tags/v[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}|(pull/[0-9]+)|heads/master"
38+
GITHUB_REF_REGEX="tags/v[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}|(pull/[0-9]+)|heads/main"
3939
if [[ $GITHUB_REF =~ $GITHUB_REF_REGEX ]]; then
4040
if [[ $BASH_REMATCH = pull* ]]; then
4141
echo This is a pull request
@@ -44,13 +44,13 @@ jobs:
4444
echo This is a version tag
4545
FOLDER_NAME=${BASH_REMATCH##*/v}
4646
else
47-
echo This is a commit to master branch
47+
echo This is a commit to main branch
4848
FOLDER_NAME=latest
4949
fi;
5050
fi;
5151
echo "Docs will be deployed to https://compas.dev/compas/$FOLDER_NAME"
5252
mkdir -p deploy/$BRANCH_OR_TAG && mv -T dist/docs deploy/$FOLDER_NAME/
53-
53+
5454
- name: Deploy docs
5555
if: success() && env.GH_PAT != ''
5656
uses: crazy-max/ghaction-github-pages@v2
@@ -77,9 +77,9 @@ jobs:
7777
run: |
7878
>doc_versions.txt
7979
for folder in $(ls -rd */ | tr -d '/')
80-
do
80+
do
8181
if [[ $folder =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}$|^latest$ ]]
82-
then
82+
then
8383
echo ${folder} >> doc_versions.txt
8484
fi
8585
done
@@ -92,6 +92,6 @@ jobs:
9292
with:
9393
target_branch: gh-pages
9494
build_dir: ./
95-
keep_history: false
95+
keep_history: false
9696
env:
9797
GH_PAT: ${{ secrets.GH_PAT }}

.github/workflows/ironpython.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: ironpython
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
build:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Changed
1515

1616
* Fixed bug in parameter list of function `mesh_bounding_box` bound as method `Mesh.bounding_box`.
17+
* Fixed bug in `RobotModel/RobotModelArtist.update` which raised an error when the geometry had not been loaded.
1718
* Changed exception type when subdivide scheme argument is incorrect on `mesh_subdivide`.
1819
* The `compas_rhino.artist.RobotModelArtist` functions `draw_visual` and `draw_collision` now return list of newly created Rhino object guids.
1920
* Added ability of `RobotModel.add_link` to accept primitives in addition to meshes.
2021
* Fixed bug regarding the computation of `Joint.current_origin`.
2122
* Fixed bug regarding a repeated call to `RobotModel.add_joint`.
2223
* Fixed bug in :class:`compas_blender.RobotModelArtist.update`.
24+
* Fixed bug in `compas.datastructures.mesh_slice_plane`.
2325

2426
### Removed
2527

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def linkcode_resolve(domain, info):
320320
else:
321321
return None
322322

323-
return f"https://github.com/compas-dev/compas/blob/master/src/{filename}.py#L{lineno}"
323+
return f"https://github.com/compas-dev/compas/blob/main/src/{filename}.py#L{lineno}"
324324

325325
# extlinks
326326

src/compas/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
if os.path.exists(git_head_file):
6767
# git head file contains one line that looks like this:
68-
# ref: refs/heads/master
68+
# ref: refs/heads/main
6969
with open(git_head_file, 'r') as git_head:
7070
_, ref_path = git_head.read().strip().split(' ')
7171
ref_path = ref_path.split('/')
@@ -149,7 +149,7 @@ def get(filename):
149149
This folder is only locally available if you installed **COMPAS** from source,
150150
or if you are working directly with the source.
151151
In all other cases, the function will get the corresponding files directly from
152-
the GitHub repo, at https://raw.githubusercontent.com/compas-dev/compas/master/data
152+
the GitHub repo, at https://raw.githubusercontent.com/compas-dev/compas/main/data
153153
154154
Examples
155155
--------
@@ -174,7 +174,7 @@ def get(filename):
174174
if os.path.exists(localpath):
175175
return localpath
176176
else:
177-
return "https://github.com/compas-dev/compas/raw/master/data/{}".format(filename)
177+
return "https://github.com/compas-dev/compas/raw/main/data/{}".format(filename)
178178

179179

180180
def get_bunny(localstorage=None):

src/compas/datastructures/mesh/slice.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def positive(self):
9090
vdict = {key: self.mesh.vertex_coordinates(key) for key in vertices + self.intersections}
9191
fdict = [self.mesh.face_vertices(fkey) for fkey in faces]
9292
mesh = self.meshtype.from_vertices_and_faces(vdict, fdict)
93-
mesh.add_face(mesh.vertices_on_boundary(True))
93+
mesh.add_face(mesh.vertices_on_boundary())
9494
return mesh
9595

9696
def is_positive(self, key):
@@ -119,7 +119,7 @@ def negative(self):
119119
vdict = {key: self.mesh.vertex_coordinates(key) for key in vertices + self.intersections}
120120
fdict = [self.mesh.face_vertices(fkey) for fkey in faces]
121121
mesh = self.meshtype.from_vertices_and_faces(vdict, fdict)
122-
mesh.add_face(mesh.vertices_on_boundary(True))
122+
mesh.add_face(mesh.vertices_on_boundary())
123123
return mesh
124124

125125
def is_negative(self, key):

src/compas/robots/base_artist/_artist.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,11 @@ def _apply_transformation_on_transformed_link(self, item, transformation):
217217
-------
218218
None
219219
"""
220-
relative_transformation = transformation * item.current_transformation.inverse()
221-
for native_geometry in item.native_geometry:
220+
if getattr(item, 'current_transformation'):
221+
relative_transformation = transformation * item.current_transformation.inverse()
222+
else:
223+
relative_transformation = transformation
224+
for native_geometry in item.native_geometry or []:
222225
self.transform(native_geometry, relative_transformation)
223226
item.current_transformation = transformation
224227

src/compas/robots/resources/github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ class GithubPackageMeshLoader(AbstractMeshLoader):
2626
Name of the support package containing URDF, Meshes
2727
and additional assets, e.g. 'abb_irb4400_support'
2828
branch : str
29-
Branch name, defaults to ``master``.
29+
Branch name, defaults to ``main``.
3030
"""
3131

3232
HOST = 'https://raw.githubusercontent.com'
3333

34-
def __init__(self, repository, support_package, branch='master'):
34+
def __init__(self, repository, support_package, branch='main'):
3535
super(GithubPackageMeshLoader, self).__init__()
3636
self.repository = repository
3737
self.support_package = support_package

0 commit comments

Comments
 (0)