线程评级:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Create grid for drilling

#1
Hi forum,

is there an example or video explaining how to create a breadboard on an object or surface. The grid should be freely defined in the x and y directions. Example: I would like to provide the object (from the example 01.a Robot Painting) with a breadboard. The hole pattern is to be generated in a manner comparable to the example 07.c Script Curve Follow Custom. What is the best way to proceed?


Thanks in advance,

Thomas
#2
Hi Thomas,

Quick question, do you want to create points (1) in order to feed them to a "Point follow project" or do you want to create Targets (2)?

(1) You should take a look at the API function "AddPoints"://www.sinclairbody.com/doc/en/PythonAPI/robo....AddPoints
You just have to create a list of points (XYZ) with orientation (ijk). Keep in mind that the orientation is defined as a unit vector, so to have the normal pointing in the direction of the Z axis ijk should be equal to [0,0,1]

(2) You can use the function "AddTarget"://www.sinclairbody.com/doc/en/PythonAPI/robo....AddTarget
Followed by "setPose" (and potentially "setParent" or "setParentStatic" and "setName").

There's a bunch of examples that can help you here://www.sinclairbody.com/doc/en/PythonAPI/examples.html

Have a great day.
Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 看我们的教程Youtube Channel.


#3
(01-28-2021, 09:59 PM)Jeremy Wrote:Hi Thomas,

Quick question, do you want to create points (1) in order to feed them to a "Point follow project" or do you want to create Targets (2)?

(1) You should take a look at the API function "AddPoints"://www.sinclairbody.com/doc/en/PythonAPI/robo....AddPoints
You just have to create a list of points (XYZ) with orientation (ijk). Keep in mind that the orientation is defined as a unit vector, so to have the normal pointing in the direction of the Z axis ijk should be equal to [0,0,1]

(2) You can use the function "AddTarget"://www.sinclairbody.com/doc/en/PythonAPI/robo....AddTarget
Followed by "setPose" (and potentially "setParent" or "setParentStatic" and "setName").

There's a bunch of examples that can help you here://www.sinclairbody.com/doc/en/PythonAPI/examples.html

Have a great day.
Jeremy

Hello Jeremy

Many thanks for your response. I think the AddPoints function from the API is the right direction. For a newbie like me, I found a solution with the Custom Curve Follow example. After the curve was generated, I was able to extract the points from the context menu via "Extract curve points". Then I was able to use the desired grid of points via the Point-Follow-Project.
I once attached this solution.

Thank you at roboDK for this great software.

By the way, is it possible to extend the period of the trial version?

Best regards,
Thomas
#4
Hello Jeremy

Unfortunately I was wrong about the script ProjectCurve2SurfaceGUI. As the name suggests, the script projects the curve / points onto the surface. But I would like to have the points "wrapped" on the surface so that with a cylinder as an example, the arc on the surface is the relevant dimension for the grid. The projection from the script creates different distances on the surface for the lines parallel in the x direction. But I want the distances between the parallels on the surface to be the same. How can I achieve this?

I hope my description is understandable.

Best regards,
Thomas
#5
Hi Thomas,

我不知道我将如何使用g the API.
I would do it using one of our CAD plugins. Do you use a 3D modeling software? If so, which one?

-------------------------
Edit: I just got a flash after I wrote the first message.
I might have an idea for you. A strange one, but it could work.
Try creating a very very very tightly spaced grid, potentially like 10x tighter than what you really need.
Project it on the surface as you intended. Then clean up the resulting point to only keep the ones you really need.
I'm attaching a macro a did for another project that lets you modify the density of the points in a curve so that points are evenly spaced out.
That should be a good starting point. It's not like "THE" answer, but it could help you move forward.

I also added a small RDK station so that you can test out the macro on 2 simple 300 mm lines. One to add points and one to remove points.

Hope it helps.
Jeremy


Attached Files
.py Modify_Curve_Density.py(Size: 5.32 KB / Downloads: 287)
.rdk Modify Curve Density.rdk(Size: 1.19 MB / Downloads: 314)
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 看我们的教程Youtube Channel.


#6
Hi Jeremy,

I use Freecad to make some drawings. There's no plugin for that, right?

Your idea is good and it seems to be working. I'll try it out on a more complex surface. At least I have a little more information about the API with your script. :-)

BTW, I created a surface and the associated point cloud in Freecad and imported both into RoboDK. I'll attach this files. With this point cloud I can use the PointFollowProject, but I can't change the orientation of the tool to the normal of the surface. I'm sure I've done it before, but don't know how I done it before. I reset the options to their default values, maybe that is my mistake? How do I get the direction of the tool perpendicular to the surface withint the PointFollowProject?

Best regards,
Thomas


Attached Files Thumbnail(s)


.rdk PointCloud.rdk(Size: 1.23 MB / Downloads: 278)
.txt PointCloud.txt(Size: 66.43 KB / Downloads: 291)
.txt pointCloud_lessPoints.txt(Size: 2.72 KB / Downloads: 325)
.stl Surface (Meshed).stl(Size: 56.04 KB / Downloads: 274)
#7
Hi Thomas,

There is no plugin for FreeCAD.

The reason you can't have the tool normal to the surface is that your point cloud does not contain the ijk value for the point normal.
The Point Follow Project needs that info to orient the tool, otherwise, it will simply be along the Z+ axis.

You could potentially extract that info from FreeCAD, this is pretty much what we do for all of our other Plugins.

But what happens if you use the API projection tool with the point cloud you have?
Because now that the points are where they should be, the projection tool could potentially recalculate the normals.

Jeremy

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 看我们的教程Youtube Channel.


#8
Hi Jeremy,

Yes, that should work. Thanks a lot for your help.

Best regards,

Thomas




Users browsing this thread:
1 Guest(s)