Home
Reply
Contributor
triet
Posts: 28

Creating a cone with top radius is zero

Hello,

 

I am using api_face_cylinder_cone() to create a cone. However, I've encountered the issue with it if my top radius parameter is zero. Is it true this function can not take zero top radius?

Is there another way to do this and it can maintain the cone properties? I know that we can use surface revolution operation to create one but the created surface does not the cone properties.

Also, zero radius is used the function fails and give this message "Cannot make zero area Cone". I am not sure what it means. If the base radius is not zero, the area can not be zero. Can you help clarifying it?

Thanks for help out.

Manhtriet.

Spatial Employee
Mohit
Posts: 8

Re: Creating a cone with top radius is zero

Hi Manhtriet

 

Can you clarify a bit more by supplying the values that give you the Error message?

I tried the following and it works:

 

api_solid_cylinder_cone(
			SPAposition(0,0,0)	// Position at the bottom
			SPAposition(0,0,10)	// Position at the top.
			3.0			// major radius at the bottom.
			3.0			// minor radius at the bottom.
			0.0			// major radius at the top.
			NULL			// position in direction of the major axis.
			cone			// Cone returned
			);

 

 

Regards,

Mohit

Contributor
triet
Posts: 28

Re: Creating a cone with top radius is zero

Hello Mohit,

 

The function I used is api_face_cylinder_cone, the function you used is api_solid_cylinder_cone. I have not tried the solid one, I will try it out. If we still can not use api_face_cylinder_cone, then I will use the other function and delete the bottom face as a workaround.

 

Please try api_face_cylinder_cone to verify if you can create the face cone. The third parameter is zero.

 

Thanks for helping out.

 

Manhtriet.

Spatial Employee
Mohit
Posts: 8

Re: Creating a cone with top radius is zero

Hi Manhtriet

 

Sorry, i missed the face API.

 

In api_face_cylinder_cone, the third argument is for base radius. The fourth argument is for top radius.

 

Try the following for making the top radius as zero:

 

api_face_cylinder_cone  	(
		SPAposition(0,0,0),	// center
		SPAvector(0,0,10),	// normal
		4.0,			// bottom
		0.0,			// top
		0,			// start
		360,			// end
		1,			// ratio
		NULL,
		face			// Output face
	) 	

 

 

Regards,

Mohit

 

 

Contributor
triet
Posts: 28

Re: Creating a cone with top radius is zero

Hi Mohit, Sorry for confusing you with that parameter. Let me ask a different question. I was trying to create a cone with the convention as described in the attached file. The axis of the cone is pointing from the apex toward the other base of the cone. The cone is a convex cone which the surface sense is pointing away from the cone axis. My understanding is the base of the cone should be the at the start point of the cone's axis. Is it true with ACIS engine? The sample cone I sent decribed the behaviour of our current geometry engine and here is the data (in meters) that I used: Base center = { 0.076497076, -0.1544795321, 0.1270 } Cone axis = { 0.788701, 0.614658, 0.012143} Base Radius = 0.0 Top Radius = 0.05080 Length = 0.101600 angle=0.463648 Thanks for helping out again. Manhtriet.