Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Livelink for Matlab: transferring geometries between models

Please login with a confirmed email address before reporting spam

I've been using mphimage2geom to derive geometries from a segmented image (using a seperate map for each segment), with hopes of creating a model with a geometry for each segment. Unfortunately, I've yet to find a work around for the fact that mphimage2geom outputs the geometry into it's own model object.

Is there a way to transfer a geometry from one model into a component of another model?


2 Replies Last Post 14 ott 2021, 05:40 GMT-4
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 13 ott 2021, 07:18 GMT-4

Hi William

You can perhaps use the 'geom' property on mphimage2geom and supply a pre-existing geomtry as argument.

You can alternatively copy geometric entities from one geometry to another using the copy method. E.g. in the attached model you can move the Circle c1 from geom2 to geom1 using this command: model.geom('geom1').feature.copy('c1_new', 'geom2/c1');

-------------------
Lars Gregersen
Comsol Denmark
Hi William You can perhaps use the 'geom' property on mphimage2geom and supply a pre-existing geomtry as argument. You can alternatively copy geometric entities from one geometry to another using the copy method. E.g. in the attached model you can move the Circle c1 from geom2 to geom1 using this command: model.geom('geom1').feature.copy('c1_new', 'geom2/c1');


Please login with a confirmed email address before reporting spam

Posted: 3 years ago 14 ott 2021, 05:40 GMT-4

Hi William

You can perhaps use the 'geom' property on mphimage2geom and supply a pre-existing geomtry as argument.

Hi, thank you very much for the help, the 'geom' property was exactly what I needed

>Hi William > >You can perhaps use the 'geom' property on mphimage2geom and supply a pre-existing geomtry as argument. Hi, thank you very much for the help, the 'geom' property was exactly what I needed

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.