-
Notifications
You must be signed in to change notification settings - Fork 256
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
Extrude until contact/overlap #1077
Labels
Comments
Yes - I will try implementing it now. |
I implemented this but i'm not sure if it works the intended way (i may not understand the vtk filter...): Also there is another possibility by "sweeping" a Line along a spline: from vedo import *
sphere = Sphere([-1,0,4]).rotate_x(25).wireframe().color('r')
circle = Circle([0,0,0], r=2, res=100).color('b6')
extruded_circle = circle.extrude_and_trim_with(
sphere,
direction=[0,-0.2,1],
strategy="bound",
cap=True,
cap_strategy="intersection",
)
circle.lw(3).c("tomato").shift(dz=-0.1)
show(circle, sphere, extruded_circle, axes=1).close() and: from vedo import *
aline = Line(Circle().coordinates)
spline = Spline([(0,0,0), (1,1,1), (2,3,3), (1,1,4), (0,1,5)]).lw(5)
pts = spline.coordinates
surfs = []
for i in range(1, len(pts)-1):
p0, p1 = pts[i-1:i+1]
surf = aline.sweep(p1 - p0)
surfs.append(surf)
surface = merge(surfs, flag=True)
surface.c("gold").lw(0.1).pickable(True)
show(spline, surface, aline, axes=1).close() |
Oh I forgot the other option is to use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like a way to run
mesh.extrude()
where it extrudes until contact with the previous mesh (and then stops on a point by point basis). Is there a way to do this? At the moment some parts exceed through the mesh.The text was updated successfully, but these errors were encountered: