why follow Error "curve must be in the plane"

why follow Error "curve must be in the plane"

Anonymous
Not applicable
1,398 Views
8 Replies
Message 1 of 9

why follow Error "curve must be in the plane"

Anonymous
Not applicable

 

   Dim application As Autodesk.Revit.ApplicationServices.Application = document.Application
   Dim startPoint As New XYZ(0, 0, 0)
   Dim endPoint As New XYZ(10, 10, 0)
   Dim geomLine As Line = Line.CreateBound(startPoint, endPoint)
   Dim end0 As New XYZ(1, 0, 0)
   Dim end1 As New XYZ(10, 10, 10)
   Dim pointOnCurve As New XYZ(10, 0, 0)
   Dim geomArc As Arc = Arc.Create(end0, end1, pointOnCurve)
   Dim origin As New XYZ(0, 0, 0)
   Dim normal As New XYZ(1, 1, 0)
  Dim geomPlane As Plane = Plane.CreateByNormalAndOrigin(normal, origin)
   Dim sketch As SketchPlane = SketchPlane.Create(document, geomPlane)
   Dim line__1 As ModelLine = TryCast(document.Create.NewModelCurve(geomLine, sketch), ModelLine)
   Dim arc__2 As ModelArc = TryCast(document.Create.NewModelCurve(geomArc, sketch), ModelArc)

0 Likes
1,399 Views
8 Replies
Replies (8)
Message 2 of 9

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @Anonymous ,

change the normal value to  Dim normal As New XYZ(0, 0, 1)

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 9

Anonymous
Not applicable

Thanks for support..

-RK

0 Likes
Message 4 of 9

lariasGHNFM
Contributor
Contributor

this did not work for me.

Is there something else that I should try? 

0 Likes
Message 5 of 9

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @lariasGHNFM ,

 

Please provide us with a non-confidential sample code you used. It will help us figure out what's going wrong.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 6 of 9

jeremy_tammik
Alumni
Alumni

Yes, totally agree. Also, a few words explaining what you are trying to achieve might help... Thx!

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 7 of 9

lariasGHNFM
Contributor
Contributor

Thank you for your reply, 

I got it to work by changing the normal XYZ(1,1,0)

to  XYZ(0,0,1) like you suggested.

in order to understand it I had to visualize the plane in Dynamo.

 

0 Likes
Message 8 of 9

RPTHOMAS108
Mentor
Mentor

From the fact you say you need Dynamo to understand a plane with a normal direction of 0,0,1 it sounds like you would benefit from learning more about what defines a plane i.e. Normal and Origin.

 

Plane (geometry) - Wikipedia

 

If you are just putting numbers in to make it work then yes you will find a way to make it work for that situation, but do you understand how to make it work for all situations i.e. the curve that isn't bound to a plane with normal 0,0,1?

0 Likes
Message 9 of 9

lariasGHNFM
Contributor
Contributor

Dynamo is a great tool for me it has helped me understand a lot of geometry.. also building adaptive families has helped me understand planes. I still have a lot of learning to do. Can you give me suggestions on how to better understand and make it work for all situations? 

0 Likes