CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Special Topics > Mesh Generation & Pre-Processing

Salome Shaper: TUI Recover Operation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By otaolafr

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2020, 19:34
Default Salome Shaper: TUI Recover Operation
  #1
New Member
 
Carl Reilly
Join Date: Aug 2010
Posts: 26
Rep Power: 16
carl_r is on a distinguished road
Hi,
I am trying to use the TUI to script some automated geometry creation in Shaper.

I have imported two cubes (.step), then drawn some cylinders on one surface of the cube. We'll call this the "internal geometry". This geometry is then placed inside a large cube. I then do a cut operation to subtract the internal geometry from the large cube. The cut process consumes the internal geometry.

In order to recover the internal geometry I use the Recover feature (model.addRecover) however I can't get it to work. It executes with no error, but does not recover the part. When i view the result in the GUI i see the action listed in the object tree, but is i select edit, i find that the geometry to recover check boxes are not checked.

Am I using the wrong geometry definition?
Has anyone else managed to successfully use the recover command with the TUI.

I've attached my script and files which should be relatively easy to follow.
Note the .TXT needs removing from the .py and .STEP files.

I'm struggling to find any help in the documentation. Also I can't seem to gain access to the Salome Forum, as I've not had a response to my email requesting an user name.
Attached Images
File Type: jpg recoverMenu - parts unchecked after script.jpg (29.7 KB, 7 views)
File Type: jpg Object Browser - Recover error.jpg (44.5 KB, 5 views)
File Type: jpg Geometry Post Cut - 3 cyclinders and 2 cubes to be recovered.jpg (63.5 KB, 8 views)
Attached Files
File Type: txt Script_Manual_Example_py.TXT (5.8 KB, 7 views)
File Type: txt Assem_Cubes.STEP.TXT (32.1 KB, 3 views)
carl_r is offline   Reply With Quote

Old   December 7, 2020, 10:20
Default
  #2
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
Quote:
Originally Posted by carl_r View Post
Hi,
I am trying to use the TUI to script some automated geometry creation in Shaper.

I have imported two cubes (.step), then drawn some cylinders on one surface of the cube. We'll call this the "internal geometry". This geometry is then placed inside a large cube. I then do a cut operation to subtract the internal geometry from the large cube. The cut process consumes the internal geometry.

In order to recover the internal geometry I use the Recover feature (model.addRecover) however I can't get it to work. It executes with no error, but does not recover the part. When i view the result in the GUI i see the action listed in the object tree, but is i select edit, i find that the geometry to recover check boxes are not checked.

Am I using the wrong geometry definition?
Has anyone else managed to successfully use the recover command with the TUI.

I've attached my script and files which should be relatively easy to follow.
Note the .TXT needs removing from the .py and .STEP files.

I'm struggling to find any help in the documentation. Also I can't seem to gain access to the Salome Forum, as I've not had a response to my email requesting an user name.
hello carl_r,
sorry to bother you,
I was an GEOMETRY user, and I was trying to learn SHAPER, I work only in TUI but I am having a lot of problems with SHAPER TUI, I feel like I am missing documentation, as even after a read everything i could I still dont figure some things.
I though that you might be able to help me as I can imagine that as an OF user you found yourself with the same issues.
I was trying to create groups automatically that are in a precise location.
3 in total:
the two first groups are faces that are placed in a two different planes and the third is all the other faces.

in GEOMETRY I was doing this without problem using:
Code:
Plane_1 = geompy.MakePlane(Vertex_0B, OZ, D*10)
geomObj_1 = geompy.GetInPlace(fluid, Plane_1, True)
Plane_2 = geompy.MakePlane(Vertex_0A, OZ, D*10)
geomObj_2 = geompy.GetInPlace(fluid, Plane_2, True)
geomObj_3 = geompy.SubShapeAll(fluid, geompy.ShapeType["FACE"])
Group_1 = geompy.CreateGroup(fluid, geompy.ShapeType["FACE"])
geompy.UnionList(Group_1, [geomObj_1])
Group_2 = geompy.CreateGroup(fluid, geompy.ShapeType["FACE"])
geompy.UnionList(Group_2, [geomObj_2])
Group_3 = geompy.CreateGroup(fluid, geompy.ShapeType["FACE"])
geompy.UnionList(Group_3, geomObj_3)
geompy.DifferenceList(Group_3, [geomObj_1, geomObj_2])
but in SHAPER I can not get the "filters" to work:
Code:
filt_2=		model.addFilter(name = "OnPlane", args = [Plane_4.result()]);
filt_1=		model.addFilter(name = "BelongsTo", args = [Cylinder_1.result()]);
faces=		model.filters(Part_1_doc, [filt_1, filt_2])
model.do()
Group_1 = 	model.addGroup(Part_1_doc, "Faces",  [faces])
I have a problem with the model.filters function, as it is like it is not being executed, as when i load the script in salome, It shows the group_1 with a problem and when I enter there is nothing selected but when I click in select by filters, the filters that I wanted are already created and I need to click in "select" and then apply x2 (without changing anything else) and the group is created correctly.
best regards,
Juanca02 likes this.
otaolafr is offline   Reply With Quote

Old   September 27, 2023, 12:08
Default
  #3
New Member
 
Juan Camilo
Join Date: Sep 2023
Posts: 1
Rep Power: 0
Juanca02 is on a distinguished road
Hello Franco.
Sorry to bother you, I'm struggling with the same problem with shaper. Could you solved it?


Best regards
Juanca02 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
loading issue libraries:libsimpleFunctionObjects.so libsimpleSwakFunctionObjects.so immortality OpenFOAM Pre-Processing 15 April 7, 2024 13:35
[Salome] SALOME and Partition operation problems kandelabr OpenFOAM Meshing & Mesh Conversion 8 April 28, 2021 21:40
Salome Error Importing .step to Shaper > Geom > Mesh carl_r Mesh Generation & Pre-Processing 1 May 8, 2020 00:03
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 07:47
Incompatible dimensions for operation ruben23 OpenFOAM Running, Solving & CFD 2 June 12, 2015 05:14


All times are GMT -4. The time now is 02:38.