ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Non-uniform scaling an AcDb3dSolid in AutoCAD 2013 and higher

1 REPLY 1
Reply
Message 1 of 2
tbrammer
520 Views, 1 Reply

Non-uniform scaling an AcDb3dSolid in AutoCAD 2013 and higher

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


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

1 REPLY 1
Message 2 of 2
elshawadfy
in reply to: tbrammer

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...)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost