Duplicate Edge of a block


#1

Hi Steve
How do I duplicate an edge of a block?
The below script works with a single object or a group but not with a block.
Can You Help me?

#-*- encoding: UTF-8 -*-
#***** makes offset of surface edge
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs

def MoveEdgeTan():    
    filter= Rhino.DocObjects.ObjectType.Curve
    rc, objrefs = Rhino.Input.RhinoGet.GetOneObject("Seleziona Curva o Edge",False, filter)
    if rc!=Rhino.Commands.Result.Success: return 
    #rs.MessageBox(objrefs)
    brep_edge=objrefs.Curve()    
    curva=brep_edge.DuplicateCurve()
    id=objrefs.ObjectId    
    
    
MoveEdgeTan()

Ciao Vittorio


Is it possible to select the edge of a polysurface inside a block?
(Dale Fugier) #2

@mikko, is this possible?


#3

Hi Mikko
Can you give me an answer?
Ciao Vittorio


(Dale Fugier) #4

Although the DupEdge command and RhinoScript’s GetEdgeCurves method can duplicate the edges of surfaces buried in a block definition (highlighting does not work - this is known), it looks like RhinoPython/RhinoCommon cannot. I have an idea why, although I am not sure how to fix it. Let me chat with @stevebaer and see where we get.

– Dale


Is it possible to select the edge of a polysurface inside a block?
#5

Dale thanks for interest in my problem
Ciao Vittorio


#6

Hi Steve and Dale
In the attached video you can see how to work a script MoveAlongEdge.
The script works with a single object or a group but not with a block.
Ciao Vittorio