Jump to content

Surface points with scripting: What is "id_type_u" and "id_type_v"?


---
 Share

Recommended Posts

Hello,

I want to create many surface points with scripting, but I have difficulty understanding the code I get from recording the procedure (See below). More specifically, I don't know how to determine the parameters "id_type_u" and "id_type_v." What are these properties And how to pick them?

I look forward to hearing from anyone who can contribute knowledge to my question. Thank you!

Kind regards,
Peter

Code example:

MCAD_ELEMENT=gom.script.primitive.create_surface_point (
    name='PointExample', 
    point={'coordinates': gom.Vec3d (169.2790381, -4.813633883e-15, 33.52974899), 
           'id': 63017, 'id_type': 'face', 'id_type_u': 0.6118229032, 'id_type_v': 0.1588304937, 
           'normal': gom.Vec3d (2.817058536e-17, 1.0, 5.530169587e-17), 
           'respect_marker_thickness': True, 
           'target': gom.app.project.actual_elements['Surface component 1'], 
           'type': 'coded'}) 

 

Link to comment
Share on other sites

Hello Again,

As far as I can see, they are describing the coordinate in the local coordinate system of the mesh element. Can anyone tell how to get this information without having to loop through the entire mesh structure?

Thanks!

Kind regards,
Peter 

Link to comment
Share on other sites

  • 7 months later...

Ive got the same issue - the documentation is very poor! Not what i expect from a software development company!  Did you ever work out how to do create surface point with a script (i want to offset a user defined point by 10mm across a surface)?

Link to comment
Share on other sites

Hey both,

I know the question is mainly about scripting. And Peter, I noticed your post only now.
But I would like to understand in the first attempt why the built-in function does not give the desired results for such purposes. Because the following procedure produces a uniform point pattern even on curved surfaces, as can be seen well on the ship's propeller:

1) A initial point on the area of interest

image.thumb.png.fb21745585f3682bba3f2af2798aa5a2.png

2) Selection of the area of interest and call of the function

image.thumb.png.0e922e605af15235fa0f0d82c2f2efaf.png

3) Set the pattern input as needed

image.thumb.png.317d220b586a301cf9f9a1de37bdbac5.png

As you can see, the points are created only in the selected area. This makes it possible to deal with special scenarios quite nicely. Also, the initial starting point does not have to be centrally located in the selected area. As I said, the point pattern is formed following the selected area.

I hope this helps in the first step, if not then please come back to me - Jens

Link to comment
Share on other sites

 Share

×
×
  • Create New...