I have a doubt. I want to put some blocks on some points of a curve. They have to be placed perpendicular to the tangent at that curve … or in the direction of the normal (I think it’s the same). I know there is something with CurveNormalAtParameter…or CurveTangentAtParameter. But I don’t know how the code would have to be, to get the right angle and/or the Normal to place it.
Can somebody help me. Thank you.
Use Curve.CoordinateSystemAtParameter and then BlockReference.ByCoordinateSystem
The curve could be a polycurve. And the parameters would be a list of points … It is correct, no?
I’m actually testing this. .but something is failing me …
Thanks for your answer _
No. A parameter is a value between 0 (curve start) and 1 (curve end). So if you have points, use Curve.ParameterAtPoint to get the parameters.
Also the “block” input on BlockReference.ByCoordinateSystem should be Model Space unless you are trying to insert these block references into another block. If that is the case, then you’ll need to get the insertion points in coordinates that are relative to the block coordinate system, not the world coordinate system.
Thank you, I am clear.
the arch where the blocks are placed is effectively a block (although in the future, it will be a polyline of a subassembly). And along an entire chain of blocks (arches) that series of blocks should be placed. I don’t quite understand your solution. The axes at these points of a curve do not change their orientation … and their placement would always be vertical, when in fact they must change their orientation along the curve, perpendicular to the tangent …
Always, thanks for your time! …
Your issue is Curve.CoordinateSystemAtParameter requires Parameter as input but you’re connecting Points:
Hope the below image is clear for you:
Thanks, it’s understandable, but in my case, it doesn’t work for me. keep putting them vertically,. I have also tried the option to get the coordinate system by X, but it doesn’t work for me either … I’m testing it with the first polyline of a list (although in the future it will be with all of them). I don’t know if you can see where my mistake is … Thank you for your time in answering me …
Could you drop here relevant dwg file?
It s to big… 19 Mb
It is the Dyn
04_bis.dyn (115.5 KB)
@ramallafre Send dwg file through wetransfer.
Dyn file will not help need dwg as well.
@ramallafre Are you trying to get this result?
Yes IT is, good Job, but with all polilinea curves