Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I calculate the PI of Alignment Spiral?

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
handgth
704 Views, 10 Replies

How can I calculate the PI of Alignment Spiral?

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.

10 REPLIES 10
Message 2 of 11
essam-salah
in reply to: handgth

@handgth 

have you tried using:

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

instead, it doesn't ask for PI.

Message 3 of 11
essam-salah
in reply to: handgth

@handgth 

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

 

spiral pi.PNG

Message 4 of 11
handgth
in reply to: handgth

@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? 

Message 5 of 11
handgth
in reply to: handgth

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)?

 

Message 6 of 11
essam-salah
in reply to: handgth

@handgth
if you able to post your code it would be helpful.
Message 7 of 11
essam-salah
in reply to: handgth

 

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.

 

 

Message 8 of 11
essam-salah
in reply to: handgth


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
in reply to: essam-salah


@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.

Message 10 of 11
handgth
in reply to: handgth

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

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

 

 

 

 

Message 11 of 11
handgth
in reply to: handgth

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

Thanks everyone for the support.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report