Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA V5 find transparent solid face 4

Status
Not open for further replies.

MBCatia

Industrial
Aug 30, 2019
62
TR
Hello everyone,

I have a problem if anybody knows solution?
I have a solid body(catpart) It has some transparent faces and when I want to check my project with sectioning(product) that part has faces transparent it's inside seems empty not a full body. I am finding transparent faces and I am making that %100 transparent. Seems body inside full anymore.

Is there any way to find easyly where is transparent on my body? (I am looking eveywhere to find) For example catia search command. I tried but I have cound't do it yet.

Best regards.
Mesut
 
Replies continue below

Recommended for you

you can reset a body's properties; right click on the body -> reset Properties -> apply to all children

regards,
LWolf
 
Ok this made it. But colors are gone aslo.
Possible protect colors?

 
How can I do it?
Could you show me please.
I couldn't understand yet.
 
Hi,
If you create a macro you can achieve it. In the below code you should loop for all the bodies.

Sub CATMain()
Dim doc As PartDocument
Set doc = CATIA.ActiveDocument

Dim sel1 As Selection
Set sel1 = doc.Selection
sel1.Clear

Dim part1 As Part
Set part1 = doc.Part

Dim body1 As Body
Set body1 = part1.Bodies.Item("PartBody")
sel1.Add body1

Dim vis1 As VisPropertySet
Set vis1 = sel1.VisProperties

vis1.SetVisibleOpacity 100, 1 'sets transparancy for all the faces including children.
sel1.Clear

End Sub

Thanks
Sri
 
1_ejnfaf.png


İt is not going down. Stopping at first line. What I must do?

Thank you very much.
 
Copy the code in a notepad and save as to ".CATScript" extension and run it or create a vba project and add this code in a module.

Thanks
Sri
 
333_jwoxxl.png


It worked. But it makes full transparan my part. I want it has a face and make it full opacity.

Thank you
 
Look in the automation documentation and change the values for transparency in this code.

Or change the code to let the user to pick what he want and change the transparency.

Or change the code to find everything which is not fully opaque (or what ever search criteria you wish) and modify the code.


Regards
Fernando

- Romania
- EU
 
Thank you for your reply,

In fact I tried some color codes but it didn't work.
for example
vis1.SetVisibleOpacity 255, 1
vis1.SetVisibleOpacity 100, 0
vis1.SetVisibleOpacity 0, 1
vis1.SetVisibleOpacity 25, 1
vis1.SetVisibleOpacity auto, 1

I am not good on codes / macro.

Regards
 
Hi Mesut,

I have a question here. Are you planning user selection of face or In an assembly for all the parts one face should be selected for transparency in macro?

Thanks
Sri
 
Fist of all thank you for your interest to all
In search topic I checked topic and that help me and in some examples that worked thank you.

In fact I want this:
TRANSPARAN_BOOLEAN_OPERASYION_h0zonf.png


I have a part and in catia part you can see a boolean operation there is.
And that remove body has a transparan face and that face making my body bad. And it's inside is becoming empty when I taking sectioning.

I can say that macro have not making my job yet.
It need some last touches.
If we can

Thank you very much.

Macro:
Language="VBSCRIPT"

Sub CATMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = partDocument1.Selection

selection1.Search "CATPrtSearch.MechanicalFeature,all"

Set visPropertySet1 = selection1.VisProperties
visPropertySet1.SetRealColor 255,255,255,1

Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetRealOpacity 255,1

selection1.Clear

selection1.Search "CATAsmSearch.Part,all"

Set visPropertySet1 = selection1.VisProperties
visPropertySet1.SetRealColor 255,255,255,1

Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetRealOpacity 255,1

selection1.Clear

Dim specsAndGeomWindow1 As Window
Set specsAndGeomWindow1 = CATIA.ActiveWindow

Dim viewer3D1 As Viewer
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer

viewer3D1.Reframe

Dim viewpoint3D1 As Viewpoint3D
Set viewpoint3D1 = viewer3D1.Viewpoint3D

End Sub
 
I think we can't success it?
Any idea?

Best regards.
 
Hi

Because you need in this case to search for something else...

Code:
Language="VBSCRIPT"

Sub CATMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = partDocument1.Selection

selection1.Search "Topology.CGMFace,all"

Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetRealOpacity 255,1

selection1.Clear

End Sub


Regards
Fernando

- Romania
- EU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top