Ms. Kerstin Lorry 0 Report post Posted May 18, 2018 Hello,is there any way to get the result of the BRep Option "CheckValidity"? In my example, I'm merging two Metasurfaces into a BRep with a fillet and then creating 100 Design-variants. There are some Designs where the merge failed completely and some where there are missing surfaces. I'm searching for a overview which Designs have a problem with the validity check. A simple "there are information" or "no information" written to a parameter would help me. The text shown when hovering over the BRep with information would be even better or other ways to test the geometry. Cheers,Kerstin Share this post Link to post Share on other sites
Mr. Paulo Macedo 0 Report post Posted May 18, 2018 Hi Kerstin,If I understood your problem correctly, you can have this in a normal parameter.Create a parameter and use an IF statement to return a value accordingly to the Brep.IF(<Brepname>.isValid(), 1, 0) It will return a 1 if the Brep is valid, 0 if not. You can customize it to your needs. You could then create a 3D label (->visualization-> 3D Label), set the text you desire and the position on screen.Then set a printscreen to be ran on your design variants. I hope that this will help you.Cheers,Paulo Share this post Link to post Share on other sites
Ceyhan Erdem 14 Report post Posted May 22, 2018 Hi Kerstin, Besides Paulo's explanation, I would strongly suggest you to create a constraint for your optimization. Let's say you have created the parameter; IF(<Brepname>.isValid(), 1, 0) then you can create an equality constraint that will be assigned to, let's say your Sobol, and you can use it for the visualization of your failed/valid designs. If failed then no further steps will be taken and it will pass to the next design. Do you obtain a lot of failed designs? Maybe you share some pictures of your geometry.Maybe we should focus on decreasing the number of failed designs. CheersCeyhan Share this post Link to post Share on other sites
Ms. Kerstin Lorry 0 Report post Posted May 30, 2018 Thank you both for your answers. I did create a parameter and a equality constraint and run a design assembler, but the parameter always returns 0 for design 0000 and 1 for all designs following, regardless of the validity of the design. I even turned on the automatic update on the parameter. I attached a screenshot of design 0004 which is clearly not valid, but still returns 1 for the parameter named valid. Any suggestions where I made a mistake? Share this post Link to post Share on other sites
Ceyhan Erdem 14 Report post Posted May 30, 2018 Hi Kerstin, Assuming that your Brep is desired to be a closed volume; You can create a certain parameter which calculates the number of open edges within the Brep. <Brepname>.getNumberOfOpenEdges() is the command. For the parameter that calculates the number of open edges, you would like to have it equal to zero. So you have to create an equality constraint or you can create another parameter that calculates the volume of the Brep, which would reveal if it is closed or not. <Brepname>.getVolume() is the command for that For the parameter that calculates the volume, you would like to have it greater than zero. So you have to create an inequality constraint. Please let me know if this solves your problem. CheersCeyhan Share this post Link to post Share on other sites
Ms. Kerstin Lorry 0 Report post Posted June 5, 2018 In my example I have open edges, it is a tube with one inlet and two outlets without wall thickness. But I found out, that apart from design 000 the parameters get calculated correctly. The function "isValid" is just checking if a BRep is generated and not if the function "Check Validity" returns any errors. Any ideas how to check a tube with open edges for geometry errors? Warnings or errors that get suggested by "Check Validity" are:Bad repeated CPts - BSplineCurve has Internal Coincident ControlPointsBad SpeedPT - 2D BSplineCurve Warning: zero-length derivative at interior multiple knotBad SpeedPT - 2D BSplineCurve Warning: Interior 1st Deriv too slow, less than AvgSpeed/10000 (often an almost kink or almost singular point - never good practice)UVEdge/UVEdge Gap - too large U Dir gap between loop edge endPoints that are not a singularity It would help me, to get these warnings into a parameter just like "isValid" or "openEdges". Share this post Link to post Share on other sites
Ceyhan Erdem 14 Report post Posted June 5, 2018 Hi Kerstin, As you have mentioned, the function "isValid" only checks whether the BRep is created or not. Right now, on the current release version, we have no implemented command for the user to calculate the number of warnings or the type of warnings that can be used in a parameter. However, on the next release version, the user will be able to have both the number of warnings and the list of warnings from which one can check for specific warnings. For your geometry you can still have two BReps, one to export and one for validation. I would recommend you to create a BRep from the geometry that you would like to export and add the command "close planar holes". Afterwards you can use it to calculate volume or check for number of openEdges. CheersCeyhan Share this post Link to post Share on other sites
Ms. Kerstin Lorry 0 Report post Posted June 8, 2018 Thank you Ceyhan. To close the planar holes sounded like a good idea, but it also does not work as I hoped it would. Attached is a image of my Design 010 with all constraints fullfilled. I don't see a closed volume in the 3DView, but in the parameters it gets reported with a rather big volume of 2,6e+10mm². The other designs have only 8,6e+5mm². Also a problem poses Design 007, where the filleting failed, but it is correctly passed, as it is a closed volume with no open edges. Any ideas how to filter designs without fillets? Still puzzling me is Startdesign 000. It is reported with a volume of minus 1, Number of open edges minus 1 and isValid=0 (failed) and when I look at it in the 3DView there is indeed no Brep created. If I create a part with the parameters manually, there is a Brep created without any errors. I used the DesignAssembler. Any suggestions why this happens? Cheers, Kerstin Share this post Link to post Share on other sites
Ceyhan Erdem 14 Report post Posted June 9, 2018 Hi Kerstin, If the geometry is not confidential you can send the project to erdem@friendship-systems.comSo that I can give a look, try to find a workaround and figure out the problem. CheersCeyhan Share this post Link to post Share on other sites