Continue to Site

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!

macro for intersecting a mesh in CATIA V5R19

Status
Not open for further replies.

margntou

Industrial
Nov 11, 2014
16
GR
Hi all,
I have a geometry imported as .stl and I want to intersect it with several planes in order to take the corresponding splines. After importing the file in Digitized shape editor I used the mesh smoothing tool to optimize my geometry. I know that I can use planar sections command and create the splines. The way I prefer is to create the planes that I want and then move to Shape sculpture and use the mesh intersect button from the editing toolbar. My problem is that this command cannot be recorded. What I need is a script that will run the intersect. Does anyone has any ideas of how can I create it?
Thanks a lot
 
Replies continue below

Recommended for you

Hi ferdo and thanks for your response. I have attached 3 pictures. What I have to do is to reconstruct the specific area of a bone from an stl file. In the first pic you can see this area and the main issues. There are several parts of this area that have not been "imprinted". So, in order to reconstruct it I have to extract some basic geometry. The steps that I am thinking are: Create 10 planes every 2mm and intersect them with the model. I take these splines, create new points and create new closed splines. This process needs to be automated. I have already automate the part were I create the planes, the points and the new splines but I cannot automate the intersection between this meshed model with the planes. Manually I have used not the planar sections but the "mesh intersect" button from "Editing" toolbar in Shape Sculptor. When I am trying to record this command of course I take nothing. In the other two pics you will see the planes and the manually achieved splines. The reason why I am trying to do this process with the stl is because the "Automatic surface" button in QSR Workbench is not working due to complicated geometry and several other issues. I can manually use the "Mesh cleaner" but I cannot automate this tool also.

I really hope the pics will help.
 
 http://files.engineering.com/getfile.aspx?folder=4c7405c6-df21-4180-abc8-6221a8f5c1dc&file=1.jpg
I tried the "CATIA.StartCommand ('Mesh Intersect')" as you mentioned, and I have the window. Now I will need to select all the planes and the mesh. For example if I want to create a plane I will use ........... Set reference1 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePlaneOffset1 = hybridShapeFactory1.AddNewPlaneOffset(reference1, 2.000000, False)
............................
hybridBody1.AppendHybridShape hybridShapePlaneOffset1
..............................
Any ideas of what should I use here? How can I define the Item for the mesh?
 
Hi ferdo, I hope for the best. I managed to select all the planes and the mesh. Now I just have to fix my sendkeys cause I am programming in Python and that is all. The "CATIA.StartCommand ('Mesh Intersect')" really helped me cause now I know that I can use it in order to program more commands. Thanks a lot for you time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top