Line transform

I have written a code for a polygon that encompass such lines similar to star. I could transform polygon in every point with changing Plane.Origin, but I couldn’t use this
for the lines. what is necessary to do for this transform and repeatetion in different points? thanks in advance for your helping.
Reza

is there any body to help me?

It is not clear from your question what you want, can you supply a sketch or a screenshot of your geometry / your desired result?

You might also have a look at our new users guide on how to ask questions that can be answered fast:

I want to repeat polygon and star between it at corner point of rhombus. then trim some line that have interference. so I have problem in repeat and moving star and then trimming some part of that.

You can transform (translate) your geometry to all points of your diamond grid, see:

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Transform_Translation.htm

thank you, I need some simple example for transforming lines. I couldn’t understand that, its confusing.

moved this to the scripting category

This is as simple as it gets:

``````# myLine is defined elsewhere in your code
# myVector is the vector from your grid origin to the grid corner you want to translate to

# create transformation
xTrans = Rhino.Geometry.Transform.Translation(myVector)

# transfrom line
line.Transform(xTrans)
``````

Have a look at the developer samples, there are several examples of moving and transforming:

I have written this code for my star transform but it doesn’t work.
def TransformBrep():
rc, objref = r.Input.RhinoGet.GetOneObject(“RotateExt”, True, r.DocObjects.ObjectType.Curve)
if rc!=r.Commands.Result.Success: return

``````xform = rgt.Translation(Points[i+1][j+1])
scriptcontext.doc.Objects.Transform(objref, xform, True)
scriptcontext.doc.Views.Redraw()
``````

g=TransformBrep()