Did you tried anything. Should be Stright forward. Use place family by points(FamilyInstance.ByPoint) and rotate by the vector (FamilyInstance.SetRotation) the line you want. Happy to help you struck Anyware.
Hi Vijay,
I am actually using the (FamilyInstance.ByPoint).
The desk family (M_Desk:1525 x 762mm) is located above and below the line but the tree family (M_RPC - Tree - Dedicious: Japanese Cherry - 4.5 Meters) is located just on the line. What could be the reason for this? What is the difference between those two families?
Also is there a simple method to set the family (e.g. a desk) perpendicular to the line instead of (FamilyInstance.SetRotation)?
You are right: I have a 3D curve. So Sovitek’s method fits well. However, does “Curve.NormalAtParameter” work in 3D? I get the following warning. What to do to get the “normal” if the curve is 3-dimensional?
Curve.NormalAtParameter operation failed
Curve is not planar: Cannot get Curve normal
Curve.CoordinateSystemAtParameter might help in such cases - you can pull the Z axis at any point and get an approximation of the normal, but it might flip and rotate in odd ways.
Since I am a beginner in Dynamo, unfortunately I do not get what you mean by pulling the Z axis. Can you please give more explanation on this? So far I have this: DivideLine.dyn (29.2 KB)
The nodes from your curve should be:
Curve.CoordinateSystemAtParameter > CoordinateSystem.ZAxis
For each parameter given the Z axis will be aligned to be ‘normal’ to the curve at that location. So if the curve is shaped like a n, you’ll get a Z axis to the left at the start, vertical at the middle, and to the right at the end.
Not really - do you have a sample dataset to use the graph above on? Building a .rvt that might look like what you’re using is likely 3/4 of the time to help produce something,
Sorry - was tied up when I got the ‘Revit’ question back and am looking at this now. Am I going to find large coordinates in your DWG when I link it into Revit? As that will make things not accurate in terms of display 100% of the time.
EDIT: The DWG has extents which are 382 miles away from the internal origin (or six English Channel crossings, or 1.4 grand canyon lengths, or 1/20 of the earth’s diameter). Your visual accuracy will not be consistent as a result. Move to the origin and you’ll likely get better results.
Dear Jacob,
I am trying to implement your suggestions.
The first 5 points appears to be correct.
However, when the curvature changes the instances skew unexpectedly.
What could be the reason for this?
Is it not necessary to control the rotation at each point separately?
Best regards,