Creating Points on CATIA surfaces
Creating Points on CATIA surfaces
(OP)
CATIA V5 R18. Does anyone know how to create multiple points on multiple surfaces quickly? I need to be able to create 50-500 points and extract them into a text file. I have found a few threads that reference extracting XYZ of points, but I can't create them quickly. Is there a script I could run or a macro?





RE: Creating Points on CATIA surfaces
indocti discant et ament meminisse periti
RE: Creating Points on CATIA surfaces
indocti discant et ament meminisse periti
RE: Creating Points on CATIA surfaces
RE: Creating Points on CATIA surfaces
That doesn't tell much of anything. Those are just the place holders for any real licensing that you may have. Many workbenches fall under those categories.
There are infinite ways to "easily" create multiple points on multiple surfaces. What does your geometry look like? Are your surfaces able to be joined? What exactly is your license configuration? (Go to Tools->Options->General->Licensing, and see what is checked)
-----------------------------------------------------------
Catia Design|Catia Design News|Catia V5 blog
RE: Creating Points on CATIA surfaces
RE: Creating Points on CATIA surfaces
Create a series of planes along the U and V directions, and use them to create intersect curves. From there, intersect the curves and you have points....
-----------------------------------------------------------
Catia Design|Catia Design News|Catia V5 blog
RE: Creating Points on CATIA surfaces
Copy-Paste in a CATScript next code and run it (you can modify according to your needs - this code will create 20 planes along Z and Y axis at 30 mm distance, starting from 0,0,0 point)
Language="VBSCRIPT"
Sub CATMain()
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim hybridBody1 As HybridBody
Set hybridBody1 = hybridBodies1.Add()
Dim hybridShapeFactory1 As Factory
Set hybridShapeFactory1 = part1.HybridShapeFactory
Dim axisSystems1 As AxisSystems
Set axisSystems1 = part1.AxisSystems
Dim axisSystem1 As AxisSystem
Set axisSystem1 = axisSystems1.Item("Absolute Axis System")
For j = 30 to 600 step 30 'added
Dim reference1 As Reference
Set reference1 = part1.CreateReferenceFromBRepName("RSur:(Face:(Brp:(AxisSystem.1;1);None:();Cf11:());WithPermanentBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)", axisSystem1)
Dim hybridShapePlaneOffset1 As HybridShapePlaneOffset
Set hybridShapePlaneOffset1 = hybridShapeFactory1.AddNewPlaneOffset(reference1, j, False)
hybridBody1.AppendHybridShape hybridShapePlaneOffset1
part1.InWorkObject = hybridShapePlaneOffset1
Next
For j = 30 to 600 step 30 'added
Dim reference2 As Reference
Set reference2 = part1.CreateReferenceFromBRepName("RSur:(Face:(Brp:(AxisSystem.1;3);None:();Cf11:());WithPermanentBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)", axisSystem1)
Dim hybridShapePlaneOffset2 As HybridShapePlaneOffset
Set hybridShapePlaneOffset2 = hybridShapeFactory1.AddNewPlaneOffset(reference2, j, False)
hybridBody1.AppendHybridShape hybridShapePlaneOffset2
part1.InWorkObject = hybridShapePlaneOffset2
Next
part1.Update
' --- Screen "Fit all"
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
viewer3D1.Reframe
Set viewpoint3D1 = viewer3D1.Viewpoint3D
End Sub
Regards
Fernando
RE: Creating Points on CATIA surfaces
Regards
Fernando
RE: Creating Points on CATIA surfaces
Set axisSystem1 = axisSystems1.Item("Absolute Axis System")
see attached error message.
Any idea why?
RE: Creating Points on CATIA surfaces
Because you delete the reference...so planeoffset can't be created....see attachment...
Dim reference1 As Reference
Set reference1 = part1.CreateReferenceFromBRepName("RSur:(Face:(Brp:(AxisSystem.1;1);None:();Cf11:());WithPermanentBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)", axisSystem1)
Dim hybridShapePlaneOffset1 As HybridShapePlaneOffset
Set hybridShapePlaneOffset1 = hybridShapeFactory1.AddNewPlaneOffset(reference1, j, False)
Regards
Fernando
RE: Creating Points on CATIA surfaces
I was able to successfully create the planes in a new CATpart, but not in an existing CATpart in which I must create a new axis.
see attachment...
RE: Creating Points on CATIA surfaces
Regards
Fernando
RE: Creating Points on CATIA surfaces
indocti discant et ament meminisse periti
RE: Creating Points on CATIA surfaces
do this using your GSD lic!
To get points:
1. Create planes (click Repeat object after OK)
2. specify number of Instances
3. Intersect the new GeometricalSet with your surface
4. You can now create planes in the other direction and repeat the process or use Points and Planes Repetition.
Extract into text file:
Ask Eric
1. Copy paste points into new catia file
2. run excel script availbale from DS Docs!
Hope this helps!
Peter
P.S. I am sure solid7 has a better way