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!

Creating Points on CATIA surfaces 1

Status
Not open for further replies.

wingstress

Aerospace
Aug 20, 2009
3
US
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?
 
Replies continue below

Recommended for you

Mesh your surface, then export mesh as bulk and edit the file. after some trick in word/excel you have XYZ of mesh node.

Eric N.
indocti discant et ament meminisse periti
 
voila

Eric N.
indocti discant et ament meminisse periti
 

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
 
Thanks solid7, I'll be the first to tell you that I'm not experienced with CATIA (I use NX more often). I have an MD2 license along with an FTA license. My files are solid bodies that I translate into NX5. My customer requires that I verify the translation. By creating points on the CATIA body, I can export them to a txt file then I can bring the text file into NX5 and run a Point-to-body script to measure the distance from each point to the translated body. If they all come out as zero deviation, then I know the translation is good. I have everything in this process written except how to create points quickly in CATIA and to export them to a txt file. Right now I'm creating each point manually and it sucks! I attached a picture of what the MD2 license includes. Thanks in advance for any help...
 
 http://files.engineering.com/getfile.aspx?folder=bdb9c720-0f90-41f1-b02b-4d95a437a3c8&file=MD2.jpg
Coming to support solid7 suggestion....

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
 
Hi,

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
 
 http://files.engineering.com/getfile.aspx?folder=462bd422-cf94-45bd-b164-135edd396b55&file=planes_at_equal_distance_CATScript.zip
I know you cannot do it, so copy-paste the geometrical set from the new part in your CATPart.

Regards
Fernando
 
plane system in GSD works well to create plane...

download.aspx


Eric N.
indocti discant et ament meminisse periti
 
hello wingstress!

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 :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top