×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Catia Plane and Body Intersect

Catia Plane and Body Intersect

Catia Plane and Body Intersect

(OP)
Hello all,

I am writing a program that will create a cross section view using a plane that I create and the body of the catia assembly. I have thr program that creates the planes, but I am not sure how to code the intersection.

Can someone point me in the right direction?

Thanks

-J

RE: Catia Plane and Body Intersect

I recorded a macro a vbscript to see.

This sets the in work object as Geometric Set.1
Uses a plane called Plane.Section
Cuts through PartBody

It should serve as a starting point.



Language="VBSCRIPT"

Sub CATMain()

Set partDocument1 = CATIA.ActiveDocument

Set part1 = partDocument1.Part

Set hybridShapeFactory1 = part1.HybridShapeFactory

Set bodies1 = part1.Bodies

Set body1 = bodies1.Item("PartBody")

Set reference1 = part1.CreateReferenceFromObject(body1)

Set hybridBodies1 = part1.HybridBodies

Set hybridBody1 = hybridBodies1.Item("Geometrical Set.1")

Set hybridShapes1 = hybridBody1.HybridShapes

Set hybridShapePlaneOffset1 = hybridShapes1.Item("Plane.Section")

Set reference2 = part1.CreateReferenceFromObject(hybridShapePlaneOffset1)

Set hybridShapeIntersection1 = hybridShapeFactory1.AddNewIntersection(reference1, reference2)

hybridShapeIntersection1.PointType = 0

hybridBody1.AppendHybridShape hybridShapeIntersection1

part1.InWorkObject = hybridShapeIntersection1

part1.Update

End Sub
 

RE: Catia Plane and Body Intersect

(OP)
Great thanks, I didn't even think to record a macro, In the past every time I have done that it doesnt actually catch anything unless I maximize a window or something like that.


-J

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources