Cyver
May 3, 2016, 6:20pm
1
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
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
Jarek
May 3, 2016, 6:38pm
2
Hi @Cyver ,
Look into XformWorldToCplane and XformCplaneToWorld methods.
Hth,
Jarek
1 Like
Cyver
May 4, 2016, 7:37am
3
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
Jarek
May 4, 2016, 8:06am
4
Hi @Cyver ,
If you are providing coords in Cplane space, use XformCplaneToWorld to convert the point back to world coords.
Jarek
Cyver
May 4, 2016, 8:28am
5
Jarek,
Ok, was a bit obscur , Thanks !
And what about DigToolbox ? my Armadillo need a friend
Jarek
May 4, 2016, 6:29pm
6
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