Jump to content

Recommended Posts

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

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

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.

 

Cheers

Ceyhan

Share this post


Link to post
Share on other sites

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?

post-990-0-62796200-1527673476_thumb.jpg

Share this post


Link to post
Share on other sites

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.

 

Cheers

Ceyhan

Share this post


Link to post
Share on other sites

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 ControlPoints

Bad SpeedPT - 2D BSplineCurve Warning: zero-length derivative at interior multiple knot

Bad 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

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.

 

Cheers

Ceyhan

Share this post


Link to post
Share on other sites

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

 

post-990-0-96434800-1528452436_thumb.jpg

Share this post


Link to post
Share on other sites

Hi Kerstin,

 

If the geometry is not confidential you can send the project to erdem@friendship-systems.com

So that I can give a look, try to find a workaround and figure out the problem.

 

Cheers

Ceyhan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...