Get PointAtParameter

Get PointAtParameter

Anonymous
Not applicable
3,785 Views
5 Replies
Message 1 of 6

Get PointAtParameter

Anonymous
Not applicable

using Autodesk.DesignScript;//.Geometry;
using Revit.Elements;
using Revit.GeometryConversion;

 

 

....

 

im cant use this method:

 

problem exactly in get .PointAtParameter

 

 

Point pt=Curve.PointAtParameter() 

 

 

0 Likes
Accepted solutions (1)
3,786 Views
5 Replies
Replies (5)
Message 2 of 6

aignatovich
Advisor
Advisor

Hi!

 

What is your Curve object type? If it is Autodesk.Revit.DB.Curve (or any descendant type), you need to invoke Evaluate method: http://www.revitapidocs.com/2017.1/1145f18e-3e01-60df-e438-e176c38c3ce9.htm

Message 3 of 6

Anonymous
Not applicable

Probably its

Autodesk.DesignScript.Geometry.Curve 

 

 

because of in dynamo its Point.At.Parameter node and im want to use them in VisualStudio....

0 Likes
Message 4 of 6

Anonymous
Not applicable

my_line_ - its Autodesk.DesignScript.Geometry  element 

 

param_1 - its range of integer 

 

 

 

 

im try do anythink here  (its still wrong):

 

...



public XYZ Evaluate(double parameter, bool normalized) ? - how i must to use it

 


foreach (var i in param_1)

{

Point pt=Autodesk.DesignScript.Geometry.Curve.PointAtParameter(my_line_, i)

 

 

in dynamo its looks like

 

# CCC.png

...

0 Likes
Message 5 of 6

BenoitE&A
Collaborator
Collaborator

Hey,

To find the parameter of a Curve in a point, project the point on the Curve : 

IntersectionResult intersection = myCurve.Project(myPoint);

The parameter is given by :

double myParameter = intersection.Parameter;

 

If you have the parameter value v you can access to the point of the Curve where the parameter value is v :

Point myPoint = myCurve.Evaluate(v);


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
Message 6 of 6

Anonymous
Not applicable
Accepted solution

Thank you @BenoitE&A for answer!

 

im find the solution

 

 

 Autodesk.DesignScript.Geometry.Line base_line = Autodesk.DesignScript.Geometry.Line.ByStartPointEndPoint(pt_1.ToPoint(), pt_2.ToPoint());

var param_1_pt = new List<Autodesk.DesignScript.Geometry.Point>();
foreach (int i in param_1_)
{
param_1_pt.Add(base_line.PointAtParameter(param_list[i]));
}


 here

in param_1_ - this list of      <doubles> from 0 to  

0 Likes