In the example attached, I want to make the surface bigger at one corner. ReplaceEdge doesn’t help me and ExtendSrf doesn’t help me. Instead, right now I’d probably Dupborder, untrim the surface, and re-trim. If there were a faster way, that would be really helpful.
For instance, it would be great if there were a way to project a curve onto the untrimmed version of a surface (after which I could use ReplaceEdge), or if there were a way to use ReplaceEdge without the curves needing to be on the surface (like a Project option in ReplaceEdge?)
Dear @phcreates
your surface in question is planar. that is a very simple case.
why don t you use _planarSrf or _curveBoolean to get what you need ?
I would recommend _curveBoolean with output = Surface and simplify = Yes.
make sure to start the command without preselection / start it without any selection.
_curveBoolean
… select curves (this will allow selecting edges)
Allregions
output = surfaces
Oh, I meant to send an example with a non-planar surface. Here is a better example. Though it actually doesn’t matter much.
I’m aware how to use curveboolean and planarsrf. I’m looking to make this process happen more quickly. Actually, I think I’m specifically hoping for a tool or method to Project onto the untrimmed version of a surface, because I know there are other cases that I’m not thinking of right now where this would be super helpful.
To reiterate: I think the process of duplicating a border, untrimming and then re-trimming is tedious. I’m wondering if there is a better way.
I’ll fix my example file & attach it here, along with another example. ReplaceEdge (as mentioned in my first post) is great and has helped a lot, but aren’t helpful afaik in this kind of case.
From that other thread you mentioned, [quote=“Gijs de Zwart, post:2, topic:135137, username:Gijs”]
In cases like that I’d do an _Untrim with keep trim objects, _Explode the curve, remove the parts you want to replace from the selection, add the new trim curve and _Trim again.
[/quote]
That’s the tedium I’m trying to find a way to make less tedious.
From another thread, @Willem created this script. If this could be adapted to use Project instead of Pull, this would be a step that would help. Anyone able to do that? Not as good as a full-on Retrim tool, but it might help.
import rhinoscriptsyntax as rs
import scriptcontext as sc
def pull_curve_to_untrimmed():
curve_id = rs.GetObject('select curve', filter = rs.filter.curve)
srf_id = rs.GetObject('select surface', filter = rs.filter.surface)
curve = rs.coercecurve(curve_id)
brep = rs.coercebrep(srf_id)
surface = brep.Faces[0].UnderlyingSurface()
surface_brep = surface.ToBrep()
new_curves = list(curve.PullToBrepFace(surface_brep.Faces[0], sc.doc.ModelAbsoluteTolerance))
if not new_curves :
print ('Error: pull resulted in no curves')
return
if len(new_curves) > 1:
print ('Error: pull resulted in multiple curves')
return
sc.doc.Objects.Replace(curve_id , new_curves[0])
This seems to work - at least it’s a step in the right direction. Still requires me to split edges and run ReplaceEdge to get what I want, but it’s a start.
import rhinoscriptsyntax as rs
import scriptcontext as sc