How can I calculate the PI of Alignment Spiral?

How can I calculate the PI of Alignment Spiral?

handgth
Enthusiast Enthusiast
1,528 Views
10 Replies
Message 1 of 11

How can I calculate the PI of Alignment Spiral?

handgth
Enthusiast
Enthusiast

Hello everyone,

 

I'm working with C3D API to create and modify Civil objects by C# and I want to create Alignment with some curve, spiral.

I want to use this method: 

public AlignmentSpiral AddFixedSpiral(
	int previousEntityId,
	Point3d startPoint,
	Point3d spiralPI,
	Point3d endPoint,
	SpiralType definitionType
)

to create alignment spiral.

But I can not find the Spiral PI.

 

How can I calculate the PI of spiral when I have start point, end point, length and radius of this spiral?

 

Please help me.

Thank you.

0 Likes
Accepted solutions (2)
1,529 Views
10 Replies
Replies (10)
Message 2 of 11

essam-salah
Advisor
Advisor

@handgth 

have you tried using:

AddFixedSpiral(int previousEntityId, double startRadius, double endRadius, double length, SpiralType spiralDefinition)

instead, it doesn't ask for PI.

0 Likes
Message 3 of 11

essam-salah
Advisor
Advisor
Accepted solution

@handgth 

PI is the intersection of the start/end tangents of the curve.

 

spiral pi.PNG

Message 4 of 11

handgth
Enthusiast
Enthusiast

@essam-salah, Thank you.

I try to use the method 

AddFixedSpiral(int previousEntityId, double startRadius, double endRadius, double length, SpiralType spiralDefinition)

But the application throw the error.

1660706280698.jpg

 

Did I pass something wrong? 

0 Likes
Message 5 of 11

handgth
Enthusiast
Enthusiast
public AlignmentSTS AddFreeSSBetweenCurves(
	int previousEntityId,
	int nextEntityId,
	double spRatio,
	SpiralParamType spType,
	SpiralType spiralDefinition
)


 

spRatioType: System.Double
Specifies spiral1 and spiral2 ratio (length or A-value) .

 

How can I pass the parameter for "spRatio" ( A-value of spiral1 or spiral2)?

 

0 Likes
Message 6 of 11

essam-salah
Advisor
Advisor
@handgth
if you able to post your code it would be helpful.
0 Likes
Message 7 of 11

essam-salah
Advisor
Advisor

 

1660706280698.jpg

 

Did I pass something wrong? 


this error because you passed a station out of the alignment range, try to check any station you pass is lies between alignment start station and end station.

 

 

0 Likes
Message 8 of 11

essam-salah
Advisor
Advisor
Accepted solution

spRatioType: System.Double
Specifies spiral1 and spiral2 ratio (length or A-value) .

How can I pass the parameter for "spRatio" ( A-value of spiral1 or spiral2)?

 


here is the >> Spiral Definitions << 

Message 9 of 11

handgth
Enthusiast
Enthusiast

@essam-salah wrote:

 

1660706280698.jpg

 

Did I pass something wrong? 


this error because you passed a station out of the alignment range, try to check any station you pass is lies between alignment start station and end station.

this error because you passed a station out of the alignment range, try to check any station you pass is lies between alignment start station and end station.

 



In the method
AddFixedSpiral(int previousEntityId, double startRadius, double endRadius, double length, SpiralType spiralDefinition)
do not have station.

0 Likes
Message 10 of 11

handgth
Enthusiast
Enthusiast

I want to create an alignment have 8 entities like this :

Line - Clothoid - Arc - Clothoid - Clothoid - Arc - Clothoid - Line.

 

 

 

 

0 Likes
Message 11 of 11

handgth
Enthusiast
Enthusiast

I solved my problem by using combination method to create Spiral and method to create STS.

Thanks everyone for the support.

 

0 Likes