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.

Manipulation of imported CAD files with Java API

Please login with a confirmed email address before reporting spam

I am using the COMSOL Java API to create an acoustics model programmatically. In the model, I want to import a CAD file (specifically a .sldprt or .asm from Solidworks), and then automatically assign impedance boundary conditions to certain surfaces, say an exit nozzle. In Solidworks, I am able to attach a specific label to any surface or volume of interest, but when I try import that geometry into COMSOL, as far as I am aware that information is lost. All the elements of the imported CAD geometry are identified only by a number in a more-or-less arbitrarily ordered list. Is there any way to recover such information upon importing a CAD file using the API?

2 Replies Last Post 15 feb 2016, 08:14 GMT-5
Lorant Olasz COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 12 feb 2016, 11:39 GMT-5
Hi Christopher,

A good way to do this with file import would be to use an appropriate coordinate based selection for the boundary conditions. Check out the ball, box and cylinder selections located on the Geometry tab, and in the user's guide.

If you have LiveLink for SOLIDWORKS you would instead synchronize the geometry using the LiveLink interface and define selections for the boundaries in SOLIDWORKS using the LiveLink.

Best,
Lorant
Hi Christopher, A good way to do this with file import would be to use an appropriate coordinate based selection for the boundary conditions. Check out the ball, box and cylinder selections located on the Geometry tab, and in the user's guide. If you have LiveLink for SOLIDWORKS you would instead synchronize the geometry using the LiveLink interface and define selections for the boundaries in SOLIDWORKS using the LiveLink. Best, Lorant

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 15 feb 2016, 08:14 GMT-5
Thankyou, I think that may help to solve my problem!
Thankyou, I think that may help to solve my problem!

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.