CATIA V6 Plane repitition
CATIA V6 Plane repitition
(OP)
Hi!
I'm looking for a script or macro which allows me to create planes on all points and a curve i have made.
I have a excel file with xyz coordinates which I import into Catia (V6 GSD) creating a geometrical set called "GeometryFromExcel". This geometrical set contains all points and creates a spline through all these points.
I want to create planes on every single point regardless of its name (example: Point.1 or point.50 shouldnt matter). Using the "normal to curve" function of planes.
The amount of points may vary.
Hope you guys can help out!
Cheers
I'm looking for a script or macro which allows me to create planes on all points and a curve i have made.
I have a excel file with xyz coordinates which I import into Catia (V6 GSD) creating a geometrical set called "GeometryFromExcel". This geometrical set contains all points and creates a spline through all these points.
I want to create planes on every single point regardless of its name (example: Point.1 or point.50 shouldnt matter). Using the "normal to curve" function of planes.
The amount of points may vary.
Hope you guys can help out!
Cheers





RE: CATIA V6 Plane repitition
indocti discant et ament meminisse periti
RE: CATIA V6 Plane repitition
RE: CATIA V6 Plane repitition
indocti discant et ament meminisse periti
RE: CATIA V6 Plane repitition
RE: CATIA V6 Plane repitition
I've tried to record my own macro but i do not know how to get it to loop...
As written above, I do have a way to input points and a line using a excel table.. just not the planes yet.
CODE -->
Sub CATMain() Dim editor1 As Editor Set editor1 = CATIA.ActiveEditor Dim part1 As Part Set part1 = editor1.ActiveObject Dim hybridShapeFactory1 As HybridShapeFactory Set hybridShapeFactory1 = part1.HybridShapeFactory Dim hybridBodies1 As HybridBodies Set hybridBodies1 = part1.HybridBodies Dim hybridBody1 As HybridBody Set hybridBody1 = hybridBodies1.Item("GeometryFromExcel") Dim hybridShapes1 As HybridShapes Set hybridShapes1 = hybridBody1.HybridShapes Dim hybridShapeSpline1 As HybridShapeSpline Set hybridShapeSpline1 = hybridShapes1.Item("Spline.1") Dim reference1 As Reference Set reference1 = part1.CreateReferenceFromObject(hybridShapeSpline1) Dim hybridShapePointCoord1 As HybridShapePointCoord Set hybridShapePointCoord1 = hybridShapes1.Item("Point.1") Dim reference2 As Reference Set reference2 = part1.CreateReferenceFromObject(hybridShapePointCoord1) Dim hybridShapePlaneNormal1 As HybridShapePlaneNormal Set hybridShapePlaneNormal1 = hybridShapeFactory1.AddNewPlaneNormal(reference1, reference2) hybridBody1.AppendHybridShape hybridShapePlaneNormal1 part1.InWorkObject = hybridShapePlaneNormal1 part1.Update Dim settingControllers1 As SettingControllers Set settingControllers1 = CATIA.SettingControllers Dim settingRepository1 As SettingRepository Set settingRepository1 = settingControllers1.Item("VPMEditorDisplay") boolean1 = settingRepository1.GetAttr("Mask_LockEditability") End SubRE: CATIA V6 Plane repitition
hybridShapes1.Item("Point.1")
you can loop all element in hybridShapes1 and test if you have a point
CODE --> catvba
that should take all points in that geometrical set
indocti discant et ament meminisse periti
RE: CATIA V6 Plane repitition
CODE -->
Sub CATMain() Dim editor1 As Editor Set editor1 = CATIA.ActiveEditor Dim part1 As Part Set part1 = editor1.ActiveObject Dim hybridShapeFactory1 As HybridShapeFactory Set hybridShapeFactory1 = part1.HybridShapeFactory Dim hybridBodies1 As HybridBodies Set hybridBodies1 = part1.HybridBodies Dim hybridBody1 As HybridBody Set hybridBody1 = hybridBodies1.Item("GeometryFromExcel") Dim hybridShapes1 As HybridShapes Set hybridShapes1 = hybridBody1.HybridShapes Dim hybridShapeSpline1 As HybridShapeSpline Set hybridShapeSpline1 = hybridShapes1.Item("Spline.1") Dim reference1 As Reference Set reference1 = part1.CreateReferenceFromObject(hybridShapeSpline1) Dim hybridShapePointCoord1 As HybridShapePointCoord For Each oShape In hybridShapes1 If TypeName(oShape) = "Point" Then Set hybridShapePointCoord1 = oShape Dim reference2 As Reference Set reference2 = part1.CreateReferenceFromObject(hybridShapePointCoord1) Dim hybridShapePlaneNormal1 As HybridShapePlaneNormal Set hybridShapePlaneNormal1 = hybridShapeFactory1.AddNewPlaneNormal(reference1, reference2) hybridBody1.AppendHybridShape hybridShapePlaneNormal1 part1.InWorkObject = hybridShapePlaneNormal1 part1.Update Dim settingControllers1 As SettingControllers Set settingControllers1 = CATIA.SettingControllers Dim settingRepository1 As SettingRepository Set settingRepository1 = settingControllers1.Item("VPMEditorDisplay") boolean1 = settingRepository1.GetAttr("Mask_LockEditability") End If Next End SubRE: CATIA V6 Plane repitition
insert
CODE -->
before
CODE -->
this will help you find the type of point
once you have it replace
CODE -->
with the proper Type.
do this with a small number of points in your file.
indocti discant et ament meminisse periti