Closed SantaTitular closed 1 year ago
Just to add aditional information, this is the macro I attain from just doing the operation in CST (2022)
Hello Tomas, Thank you for your email. Using the pick command is tricky. I suggest doing it manually first, together with your extrude command and then check the CST History for the exact commands that appear there. Then translate these commands in your code using the invoke function. That's always the best solution for every troubleshooting. Alternatively use another strategy for creating the geometry you want to create. Thanks Simos
On Tue, 14 Feb 2023 at 02:53, Tomás Soares da Costa < @.***> wrote:
Just to add aditional information, this is the macro I attain from just doing the operation in CST (2022) [image: image] https://user-images.githubusercontent.com/68435474/218618109-675404ff-1523-4c81-8ef7-b73e440f1fc3.png
— Reply to this email directly, view it on GitHub https://github.com/simos421/CST-MATLAB-API/issues/17#issuecomment-1428988109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAISOPVFJPHLXVTVWJEVT3WXLQPZANCNFSM6AAAAAAU267VSI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Simos,
Thank you for the fast reply, apologies if you received an email with a previous response but I put the wrong images. I do agree with you that the best way to work with you method is trying in CST and then translating into MATLAB. I did manage to do the work around with Extrude Curve but the pick method seems very useful hence I'm trying to get it to work.
Pick method: CST Macros
MATLAB equivalent
Am I doing something wrong or do you know more in depth how to get the pick command to work, i.e., if I should propagate it into someplace?
What if instead of extrude you draw the geometry you want and either add it to or subtract it from the surface you want?
On Tue, 14 Feb 2023 at 12:46, Tomás Soares da Costa < @.***> wrote:
Hi Simos,
Thank you for the fast reply, apologies if you received an email with a previous response but I put the wrong images. I do agree with you that the best way to work with you method is trying in CST and then translating into MATLAB. I did manage to do the work around with Extrude Curve but the pick method seems very useful hence I'm trying to get it to work.
Pick method: CST Macros [image: image] https://user-images.githubusercontent.com/68435474/218726524-8dad2eca-cf6b-47c4-815d-63b39efd3596.png [image: image] https://user-images.githubusercontent.com/68435474/218726588-7950d1e5-ff3c-4fa0-8fda-897362c33157.png
MATLAB equivalent [image: image] https://user-images.githubusercontent.com/68435474/218728379-f359ad4f-3233-4765-8a0f-8f865308e87e.png [image: image] https://user-images.githubusercontent.com/68435474/218728939-363826a3-c7a9-44fe-8631-9bcefd46bbfa.png
Am I doing something wrong or do you know more in depth how to get the pick command to work, i.e., if I should propagate it into someplace?
— Reply to this email directly, view it on GitHub https://github.com/simos421/CST-MATLAB-API/issues/17#issuecomment-1429606870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAISOIGDGNXSADNWBHHTX3WXNWCDANCNFSM6AAAAAAU267VSI . You are receiving this because you commented.Message ID: @.***>
Hi Simos,
Apologies for the late reply, I actually got it to work. My goal was to generate the 3d surface from MATLAB in CST, this a workaround to that (for a 1D version). However, since I only know how to create and import .STL, I'll take the opportunity to ask you if you happen to know a way to draw the surface dynamically in MATLAB? For instance, connecting the points consecutively using polygon3D so that when you cover, you actually get the surface, i.e., draw the surface the surface like you said.
Regarding the initial question, I managed to solved it with Pick. In case you happen to need in future situations:
In case you happen to know a easy way to generate the surface or the answer to the Note, lemme know!
Best, Tomás
Also, do you happen to know which parameter it is so that, when I delete, I do not get stuck in the window
The MATLAB macro is simply the following:
Apologies for continuously asking but this last one would be particularly helpful!
Hi Tomas,
It never got stuck on that window for me, I chose the first option and it was just deleting the stored data.
Are you trying to draw a complex geometry? If it's just made out of basic shapes you can use the Cstbrick.m, Cstcylinder.m and CstSphere.m to draw it and then go with CstAdd.m and CstSubtract.m to do the adjustments. No need for Picks, use geometry coordinates. If you want to make a more gaussian style shape, I remember seeing in a youtube video that there was a functionality in CST that draws a geometry by using the function that describes it. Not sure how to do it, it should be interesting thought to have such an .m function in the API thanks Simos
On Tue, 14 Feb 2023 at 18:52, Tomás Soares da Costa < @.***> wrote:
Also, do you happen to know which parameter it is so that, when I delete, I do not get stuck in the window [image: image] https://user-images.githubusercontent.com/68435474/218817696-d1570051-a944-4fc2-974c-2771355c2252.png
The MATLAB macro is simply the following: [image: image] https://user-images.githubusercontent.com/68435474/218817844-6c44fcfc-723f-40fa-aeff-db5650b0d4a3.png
Apologies for continuously asking but this last one would be particularly helpful!
— Reply to this email directly, view it on GitHub https://github.com/simos421/CST-MATLAB-API/issues/17#issuecomment-1430146308, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAISOMWA2WMQE6F6VYH4O3WXPA7HANCNFSM6AAAAAAU267VSI . You are receiving this because you commented.Message ID: @.***>
Hi Simos,
Regarding the delete/results may be incomplete window (Maybe this is helpful for someone afterwards):
I tried to find more information and read other existing code, for instance the link , and it seems it is a new "feature" of recent versions of CST. As it is said in the discussion, alot of people encounter it, as end up stuck in the window like me. Anyways, besides the workaround suggested in the forum (use invoke('DeleteResults') before building new geometry), I found that you can also utilize invoke('Rebuild') to clear any existing geometries. The latter only requires that you re-do the solver parameters.
Regarding the complex geometry:
Yes! I have a rather complex surface (gaussian style as you said) that I generate in Matlab and I'm trying to figure how what is the best solution to "import it" in CST. I already tried building with bricks, cylinders, and spheres, but it is unfeasible and very very challenging. I also agree that it would be very interesting to have an .m function like that in the API, I'll try to find a video and think about one, we can try merging with your current API if you're still interested. If you happen to discover or find a way lemme know!
Best, Tomás
Hi,
First of, thank you so much for these examples, it is very straighfoward and simple to follow! Was doing some more configurations that I need and, I'm trying to extrude a curve (or face but I cannot seem to pick the face even though I call the following: invoke(obj.mws,'Pick','PickFaceFromId', ['component', num2str(1),':','face', num2str(1)],'1');).
Anyways, I invoke the Extrude curve but, apparently, it does not recognize the "Thickness" and other parameters of the 'CoverCurve' (commented in the figure). Is this a problem with versions or something? I really cannot grasp what I'm missing
Best, Tomás