Change geometry size without open rhino

Hello ,

I have this model that have a square with some lines, this square have default size of 200x200, and
have some propeties/user text etc that I dont want loose.

This model is save on original file and I want use this model by defaut to create another models
with diferente sizes, but whitout open the rhino.

There is any way to do this C# or python?

EX:
Open .3dm
change by 200x200 to 400x300
create copy

File ex:
ModelBase.3dm (30.0 KB)

Any ideia @dale?

thanks

Hi @MatrixRatrix,

Try opening the file, scaling the objects, and then writing the file.

How to add objects to a existing file 3dm

– Dale

Thank you @dale ,

I think can be a solution, what is the Scale comand?

And another question, there is some way to do this by php?

The ideia is simple, I need create a app independ of rhino to create a part list based on
length width table, and save this .3dm part listo to later open on Rhino.

thank you

Hi @MatrixRatrix,

With RhinoCommon, you’d apply a scale transformation to your objects.

There is no Rhino support for PHP. However, you can use the Rhino3dmIo NuGet package to read and write 3dm files using .NET without having Rhino installed. You can also use our new Rhino3dm toolkits that support CPython and JavaScript.

– Dale

Hi @dale

Can I add selected obj to exist .3dm file?

var objs = get objetcts

var f = File3dm.Read(filename);
f.Objects.AddObject(objs );
f.Write(filename, 6);

Thanks

Well, the File3dmObjectTable class doesn’t have an AddObject method. But it has a number of add-something methods.

https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_FileIO_File3dmObjectTable.htm

– Dale

Thank you @dale

The information this nice and I already see this methods, but for this case in particular dont help me,
the objects already is draw .

I try find one fast way to import/export objects between .3dm to reduce the time, at this time I use
import/save but I need something more speed.

Thank you.