World/Cplane

Hi ,

How to use Cplane coordinate instead world ?

In my little example, arrPoint return world coordinate , how can i do the same for any Cplane ?

I thougt something like that : arrPoint = array(Cplane0, 0, 0) , but seems it’s not a good idea :confused:

and i don’t find solution in help file.

Thanks.

Dim arrPoint

arrPoint = array(0, 0, 0)

If IsArray(arrPoint) Then

	Rhino.AddPoint arrPoint

End If

Hi @Cyver,

Look into XformWorldToCplane and XformCplaneToWorld methods.

Hth,

Jarek

1 Like

Hey Jarek,

Thanks for help,

but there is something i don’t understand, my script place a point a the exact opposite of my cplane coordinate , like if all was flipped.

Any idea ?

Sub Main()
Dim arrPlanePt, arrPlane, arrPoint

arrPoint = Array(0.0, 0.0, 0.0)

arrPlane = Rhino.ViewCPlane

arrPlanePt = Rhino.XformWorldToCPlane(arrPoint, arrPlane)

Rhino.AddPoint arrPlanePt

End Sub

Hi @Cyver,

If you are providing coords in Cplane space, use XformCplaneToWorld to convert the point back to world coords.

Jarek

Jarek,

Ok, was a bit obscur , Thanks !

And what about DigToolbox ? my Armadillo need a friend :wink:

Sure, glad it worked. Took me a while to figure out the logic behind all of the Xform… methods as well.

DigToolbox will come eventually, thanks for asking. I am currently working on another plugin project that should become a good friend of Armadillo. I will share more info as soon as it is available.

-j

1 Like

Sounds good :slight_smile: