Showing results for 
Search instead for 
Did you mean: 

txsolid sizing


Is there somewhere specifically someone can point me towards to retrieve information about a TxSolid Object?


for example, I have a TxSolid that was initially created by TxSphereCreation Data. 


Id like at a later time be able to determine the radius of the sphere, but all i know is that it is a TxSolid, and not necessarily a Sphere.


if not, then does anyone have a formula for the matrix to retrieve the same information? Im decompiling dlls to try to find out but i figured i should ask first.



Re: txsolid sizing

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Mookiejones,


You can get the Approximation property of the TxSolid and analyze the points and primitives. 

The API returns data object that contains a buffer of points and a buffer of primitive indices.

Use the primitive indices to get the list of polylines that compose this approximation as the approximation is not a single polyline primitive that contain all the points in the buffer.


Best Regards,


Re: txsolid sizing


Thats what i thought.. 


is there any chance you have any sample code to start with?

Re: txsolid sizing

Take a look this code, it calculate radius of txsolid sphere:

TxSolid solid = solids[0] as TxSolid;
TxVector point = solid.Approximation.Points[0]; // The point is measure from sphere origin not absolute, so you must transform it to current solid position
//TransformVector(ref point, solid.AbsoluteLocation);
TxVector radiusVt = point - solid.GeometricCenter.Translation;
double r = Math.Round(Math.Sqrt(radiusVt.X * radiusVt.X + radiusVt.Y * radiusVt.Y + radiusVt.Z * radiusVt.Z), 3);