Streamspace Solids API
This is a writeonly API – you can create 3D models. You can’t read properties or modify existing objects - that will apear in a future release.
Sample usage: below.
For AutoCAD / AutoCAD LT 2000, 2000i and 2002
For AutoCAD / AutoCAD LT 2004
AutoCAD and AutoCAD LT are trademarks of Autodesk, Inc.
Sample usage:
Below segments are from the application:
void strm3Dcylinder()
{
AcGePoint3d axisStart, axisEnd;
double radius;
if (!strmGetPoint("\nAxis startpoint: ", axisStart))
return;
if (!strmGetPoint("\nAxis endpoint: ", axisStart, axisEnd))
return;
if (!strmGetDistance(axisStart, "\nRadius: ", radius))
return;
AcDbObjectId res;
if (!strmGenerateCylinder(axisStart, axisEnd, radius, res))
ads_printf( "\nCould not add the cylinder to the database.\n" );
}
void strm3Dextrude()
{
AcDbObjectId eId;
AcGePoint3dArray pts;
AcGeDoubleArray bulges;
AcGeVector3d vEz, vDir;
double dHeight;
if (!strmGetSketch("\nSelect polyline:", eId, pts, bulges, vEz))
return;
vEz.normalize();
if (!strmGetDistance("\nSelect height:", dHeight))
return;
vDir=dHeight*vEz;
AcDbObjectId resultingEntityId;
if (strmExtrudeOperation(pts, bulges, vEz, vDir, resultingEntityId))
{
Handler<AcDbEntity> handler(eId);
AcDbEntity *ent=handler.write();
if (ent)
ent->erase();
}
}
void strm3Dsphere()
{
AcGePoint3d center;
double radius = 0.0;
if (!strmGetPoint("\nCenter of sphere: ", center))
return;
if (!strmGetDistance(center, "\nRadius of sphere: ", radius))
return;
AcDbObjectId res;
if (!strmGenerateSphere(center, radius, res))
ads_printf( "\nCould not add the sphere to the database.\n" );
}
void strm3Dunion()
{
AcDbObjectIdArray arIds;
if (!strmGetEntityIds("\nSelect objects to unite ...", arIds))
return;
if (arIds.length()<2)
ads_printf("\nNeed at least two objects!");
else
{
AcDbObjectId res;
if (!strmApplyBooleanOperation(arIds, AcDb::kBoolUnite, res))
ads_printf( "\nCould not add the new object to the database.\n" );
}
}
The strmGetX are equivalent of your standard objectarx interface functions. They are available in this release.