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
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
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
-J
RE: Catia Plane and Body Intersect
CATIA_Portable_Script_Center_v2.0
http://www.eng-tips.com/viewthread.cfm?qid=298847
Regards,
Derek