Hey,
This isn’t a perfect response, but maybe it keeps you moving…
So your family origin is away from the centre… this sits it against the edge of the wall… which makes a lot of sense…
Unfortunately when dynamo is getting the family location, it’s not recognising this move. I don’t know why, I’m sure @Andreas_Dieckmann could tell us
If you put the origin back to the centre, it works correctly, but obviously sits the family partly inside the wall, however you can then transform the point perpendicular to the direction of the curve and by the depth of the family to move it out.
You could probably leave the origin where it is and move the point to compensate but that means doing a bit more work to offset away from the wall, so i’ll let you work that out
As for your other question, you are unlucky that for this particular wall, it’s length just happens not to work for Math.Ceiling.
However, it would work for Math.Floor.
I’m no Maths genius, but I think it is inevitable that if your wall lengths are random and your family length and divisions fixed, sometimes the numbers will fall that way.
I think the easiest way of solving it, is to check whether rounding up causes a problem, and then round down… There are probably other, better ways which you will think of!
Here are my files for you to look at… 01_06_End_FamilyLocation-test.rvt (3.5 MB)
RoomFinishBoundarySegmentDivisions_2019.01.03-test.dyn (122.0 KB)
I also related the division number to the width of the family, it felt like a good thing to do…
Hope that helps,
Mark