Skip to content

Commit

Permalink
Fix solidsphere2 creation of axes.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsorby committed Jul 23, 2024
1 parent 4824f65 commit 9ceda08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scaffoldmaker/meshtypes/meshtype_3d_solidsphere2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from __future__ import division

from cmlibs.maths.vectorops import identity_matrix, matrix_vector_mult
from cmlibs.maths.vectorops import identity_matrix, matrix_vector_mult, matrix_mult, mult
from cmlibs.utils.zinc.field import findOrCreateFieldCoordinates
from scaffoldmaker.annotation.annotationgroup import AnnotationGroup
from scaffoldmaker.meshtypes.scaffold_base import Scaffold_base
Expand Down Expand Up @@ -173,7 +173,8 @@ def generateBaseMesh(region, options):
annotationGroups = [boxGroup, transitionGroup]

centre = [0.0, 0.0, 0.0]
axes = matrix_vector_mult(identity_matrix(3), radius)
identity = identity_matrix(3)
axes = [mult(identity[i], r) for i, r in enumerate(radius)]
elementsCountAcross = [elementsCountAcrossAxis1, elementsCountAcrossAxis2, elementsCountAcrossAxis3]

sphere1 = SphereMesh(fm, coordinates, centre, axes, elementsCountAcross,
Expand Down

0 comments on commit 9ceda08

Please sign in to comment.