Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to scale a solid?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
2189 Views, 2 Replies

How to scale a solid?

Hello everyone,

 

I want to scale a solid with origin as its center, but I can't find any way to do it.

 

I try this: (have a Solid named solid)

 

Transform transform = Transform.CreateTranslation(new XYZ(0, 0, 0)).ScaleBasis(1.1);
Solid sclSolid = SolidUtils.CreateTransformed(solid, transform);

 

But it's scaled from the basis (0,0,0).

 

Please help, thank you!

2 REPLIES 2
Message 2 of 3
jeremytammik
in reply to: Anonymous

You can achieve what you need by concatenating several transforms, e.g., to translate the solid from the origin to its centre, then to scale, then to translate it back again.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3
Anonymous
in reply to: jeremytammik

Thank you Jeremy,

 

I think it might be the only way :).

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

Post to forums  

Autodesk Customer Advisory Groups


Rail Community