-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with work planes #152
Comments
Yes, this is exactly the same as #135. And you already know the work-around: using the Java methods of the Comsol API directly. I've closed the other issue as it wasn't very clearly phrased, so I'll leave this one open. It's ultimately a feature request. I, for one, am not planning to implement this. But if someone else wants to give it a shot, and the solution doesn't like double the lines of code in |
I might take a stab at it sometime... do you know why the problem occurs? |
So the There is a reason why there are many such classes in Java. They all expose different features. Like a study node exposes different methods ("behavior") than a geometry node. However, most (not: all) nodes that have sub-features ("children" in the model tree) expose a method named Namely, all the nodes that "have children", but don't expose a method named On that note, since the case-switching already happens in four different places, it should probably be "factored out" at some point, if we're taking this further. Though it should also be said that this abstraction was never meant to reach feature parity with the Comsol API. MPh promises to cover "common scripting tasks", as stated in the introduction. So if the code becomes "too complex" (very subjective measure), I will be hesitant to include it. Just because I'll be the one stuck maintaining it. Then again, I'm obviously open to an elegant solution that makes the library more useful. |
This is related to (probably exactly the same as) #135.
I want to create a work plane, create some 2D geometry in here, and then extrude it.
So first: create the model and 3d geometry and a work plane:
When creating a work plane in comsol, a 2D geometry is automatically built (see work plane in https://doc.comsol.com/6.1/doc/com.comsol.help.comsol/COMSOL_ProgrammingReferenceManual.pdf). I can access this and for example create an ellipse with
but I don't seem to be able to access it through
wp.create('geom/e1', 'Ellipse')
or anything else I've tried. Neither it nor the ellipse shows up inmph.tree(model)
either.The text was updated successfully, but these errors were encountered: