Hi @liujingxin123 I assume its for c3d ? please give your post a categori…and probably many ways to do it, try show what you have tried so far

1 Like

blocks.dwg (5.5 MB)

批量布置块节点包.dyn (169.5 KB)

This is the file .I want to align the block to the feature by two points 。

Can you help me ，align the block，by start and the end point 。

1 Like

Hi @liujingxin123 great your share some material, then its much easyer to get help and help dont think im the man here, but i guess some of the C3D sharks in here can… good luck

What is the insertion point and standard rotation of the block? Is it dynamic or static? 2D or 3D?

Assuming static and 2D, you can try this:

- Get the coordinate system at the station and offset of the first point.
- Draw a 180 degree arc about that coordinate system.
- Intersect the arc with the original curve.
- Get the vector between the origin if the coordinate system and the intersection point.
- Get the angle about the global Z axis from the coordinate system’s Y axis to the new vector.
- Rotate the coordinate system about the Z axis by that angle.
- Create a new block instance by the rotated coordinate system.

1 Like