AutoCAD won't do a p3dSolid->transformBy(mat) if mat doesn't scale uniform.
Does anyone have an idea how to write a function that does non-uniform scaling of AcDb3dSolids?
This should be possible becaus an AcDb3dSolid can be bounded by NURBS-curves and -surfaces. These can be non-uniformly transformed.
It think this aproach should work:
1. use the BREP-API to extract NURBS-Data of the boundaries
2. create AcDbNurbSurface Entities using this data.
3. transform the AcDbNurbSurfaces with mat. (If transformBy() won't work just transform the NURBS-controlpoints)
4. create a new Solid with AcDb3dSolid::createSculptedSolid(nurbsSurfaces)
This might be very slow and / or not very stable (according to my exyperiences with createSculptedSolid()).
Has anyone tried this before?
Is there a better solution?
Cheers
--Thomas
I'm still a biginner in programming.. But I found that the magic solution for any none uniform scaling, is to convert the object to block, scale it as i wish, then explode it.. programmatically this would require some after cleaning.. (deleting the unnecessary block dif., picking the new resulting entity...)