Fellows,
I do a lot of untrimming surfaces and then extend them. at the moment I extend every edge per time.
is there a way to extend all edges in one?
for example ‘extendsrf>extend all edges>100(mm)’
looking forward for your reply,
Albert
Fellows,
I do a lot of untrimming surfaces and then extend them. at the moment I extend every edge per time.
is there a way to extend all edges in one?
for example ‘extendsrf>extend all edges>100(mm)’
looking forward for your reply,
Albert
you have to do it with a script I think
import rhinoscriptsyntax as rs
srf = rs.GetObject("pick srf",rs.filter.surface)
num = rs.GetReal("distance to extend")
if num and srf and not rs.IsSurfaceTrimmed(srf):
du = rs.SurfaceDomain(srf,0)
dv = rs.SurfaceDomain(srf,0)
dum = (du[0] + du[1]) / 2.0
dvm = (dv[0] + dv[1]) / 2.0
length = num #5
rs.ExtendSurface(srf,(du[1],dvm),length)
rs.ExtendSurface(srf,(du[0],dvm),length)
rs.ExtendSurface(srf,(dum,dv[1]),length)
rs.ExtendSurface(srf,(dum,dv[0]),length)
!_ RunPythonScript “… path to the script…”
run the script from the commandline, the macroeditor or from a button
ExtendTrimmedSrf_allEdges_01.py (547 Bytes)
hope this helps - kind regards -tom
Hi Tom,
Thanks a lot! I have a few questions:
Can we make the macro so that it works on more selected surfaces at the same time?
How do I get it into a button?
for multiple surfaces:
ExtendMultipleTrimmedSrfs_allEdges_01.py (770 Bytes)
the link above shows how to assign a script to a button.
HI tom,
I switched to Rhino 8, it looks like it can’t run python scripts anymore.
do you know a way to solve this?
thanks, Albert
Hi Albert -
Did you use the RunPythonScript
command?
-wim
no I didn’t, I always went there through options…
thanks for the headsup!
Hi Tom,
I use the script a lot, there is one small thing: it extends 3 sides only. can you make it that it extends all sides?
thanks a lot!
best regards, Albert
fast and dirty…
ExtendMultipleTrimmedSrfs_allEdges_02.py (1.1 KB)
?
if it does not do the job - please post a file where the script does not work
I tried it, it worked.
I’m going to use it further and see if it works in reality. keep you posted…