Home
Reply
Contributor
Posts: 6
0

Import Sphere and Cylinder from STEP

I am trying to import analytical surfaces like Cylinder, Sphere and Cone from a STEP file. I am importing a file that contains exactly one cylinder and one sphere. STEP file stores these analytical geometries with two faces. Hence my STEP file contains, for the sphere, two hemispherical faces; and for the cylinder, two half-cylindrical faces.

I am using following code to import:

SPAIConverter converter;
		{
//filename and _DocumentType stored elsewhere
			SPAIDocument source(fileName.c_str());
			source.SetType(_DocumentType.c_str()); 
			
			SPAIAcisDocument dst;
			SPAIUnit requestedUnit(SPAIUnitMillimeter);
			dst.SetUnit(requestedUnit);
					

			SPAIOptions options;
			GetOptions(options); //My method to retrieve units
			converter.SetOptions(options);

			if (converter.IsValid())
			{
				result = converter.Convert(source, dst);
			}
ENTITY_LIST* list = 0;
			dst.GetEntities(list);
			dst.DetachEntities();
		}

 As output, I get 3 entities, all of them of type "BODY":

first BODY contains two domains (two SHELLs) each one containing one hemispherical face.

Other two bodies contain only one domain each. And each SHELL has one face (which is half-cylinder).

 

Am I missing something here? May I know what combination of input options do I need to pass in order to get the expected behavior?

I am attaching the my STEP file here for reference.

 

And by the way, I have created this STEP file using ACIS interop export functionality.