Rhinocommon copy points and creating a plane

I am trying to create a plane by moving points, but the x-point changes with while creating an y-point.
What am I doing wrong?

Thank you for your response. :slight_smile:

20190202 problem rhinocommon 00.gh (5.0 KB)

Most likely you cannot make a copy with the assignment operator:

copyxpn = xpn # both variables are a reference to the same point-object

It should be something like

copyxpn = xpn.Duplicate() 
1 Like

I tried that before, but it then says

Runtime error (MissingMemberException): 'Point3d' object has no attribute 'Duplicate'

  line 4, in script

Hi @ForestOwl, @menno is right, both references point to the same point. There isn’t a Duplicate method but you can simply create a new point like so copyxpn = rg.Point3d(xpn)
Refer to https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Point3d__ctor.htm


Great! Thank you both :smile: