Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move math #250

Closed
wants to merge 5 commits into from
Closed

Move math #250

wants to merge 5 commits into from

Conversation

Kayvv
Copy link
Contributor

@Kayvv Kayvv commented Apr 18, 2024

Move scaffoldmaker vector functions to vectorops.py

Copy link
Member

@rchristie rchristie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first change is to increment version of cmlibs.maths to 0.6.0 and make that a dependency in scaffoldmaker setup.py.

# nd2 = interp.smoothCubicHermiteDerivativesLine(nx, nd2, fixAllDirections=True)
# px, pd2, pe, pxi = interp.sampleCubicHermiteCurves(nx, nd2, elementsCountAcross)[0:4]
# pd1 = interp.interpolateSampleLinear(nd1, pe, pxi)
# pd3 = [vector.setMagnitude(vector.crossproduct3(pd1[n2], pd2[n2]), commonOstiumWallThickness)
# pd3 = [set_magnitude(vector.crossproduct3(pd1[n2], pd2[n2]), commonOstiumWallThickness)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed one.

@@ -579,7 +579,7 @@ def generateOstiumMesh(region, options, trackSurface, centralPath, startNodeIden
# od2[n3][oa] = [-d for d in ld2[0]]
# od2[n3][ob] = ld2[-1]
# if useCubicHermiteThroughOstiumWall:
# pd3Element = [vector.setMagnitude(vector.crossproduct3(pd1[n2], pd2[n2]),
# pd3Element = [set_magnitude(vector.crossproduct3(pd1[n2], pd2[n2]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed one.

d2Mag = vector.magnitude(cx_tube_group[2][n])
v2r = normalize(cx_tube_group[2][n])
v3r = normalize(cx_tube_group[4][n])
d2Mag = magnitude(cx_tube_group[2][n])
r2 = (d2Mag - distance - wallThickness) / 2
# d3Mag = vector.magnitude(cx_tube_group[4][n])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should change this as well.

@hsorby
Copy link
Contributor

hsorby commented Jul 23, 2024

Superseded by #260.

@hsorby hsorby closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants