- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi ,
I am trying to find points that are along a wall, or room separation line and then "move" into and out of the room.
I get the midpoint , angle of the wall and and then create two transforms, one for translation and one rotation around the midpoint, I first translate then rotate .
I don't get what I expected - it seems that rotation have no effect . Any ideas would be greatly appreciated .
See drawing and code below (the CreateModelLine does what it says on the box 🙂
Thanks , jonathan
XYZ p1 = new XYZ(0.0, 0.0, 0.0);
XYZ p2 = new XYZ(6.0, 6.0, 0.0);
XYZ midpoint = (p1 + p2) / 2;
double an90 = p1.AngleTo(p2);
ModelLine a = CreateModelLine(doc, p1, p2);
Transform tr1 = Transform.CreateTranslation(new XYZ(0.0, 1.0 ,0.0));
Transform tr2 = Transform.CreateRotationAtPoint(XYZ.BasisZ, an90, midpoint);
XYZ p3 = tr1.OfPoint(midpoint);
XYZ p4 = tr2.OfPoint(p3);
ModelLine b = CreateModelLine(doc, midpoint, p3);
ModelLine c = CreateModelLine(doc, midpoint, p4);
Jonathan Talisman
BIM Developer
BIM Developer
Solved! Go to Solution.
Link copied