Transform Points and Faces to View Coordinatesystem for dimensioning

Hello Dynamo Friends :slight_smile:

I can dimension a column by getting faces, vertices, points and then taking some points by their index.


To make this work for other columns i have to get the points i need by their location and not just by index. So let´s start with the PlanView, i have to make a rectangle out of the column for the dimensioning line location.

To getting started i want to get the corner points of the column, but I´m even struggling with that:

Getting the points from faces will give me the points multiple times and i can´t get the unique points. I also tried to filter them by the minimum z-value but that also failed

So my first questions are:

  • How to get the unique corner points of the column, so only 8 points.
  • What is a good way to get the location of the faces, so i can compare them with the view direction and tell which one is the front face and right face. Should i get faces that are normal to the dimensioning line?

Happy about any help, kind regards :slight_smile:

1 Like

I now started by making an Element.CoordinateSystem and intersect with a plane. I now get my points for the rectangle and can dimension a column. But again, this works for some columns, but trying it at other ones will not work because the order of faces/lines is different. if there just would be a way to get faces by their names (left, right, front, back)

Edit:

It works now by checking for parallel vectors! Just have to find a method to filter the right lines:


Edit:

Tryed to use line direction, also works for some columns and not for others…i think i have to compare the points with the view direction…


I would like to transform the lines/points to the coordinatesystem of the column so i can then filter the lines that have x=positive, y=positive or something like this.

But my transformation gives me strange values…all startpoints are x-positive and y-z-negative…?!

So no one can tell me what I´m doing wrong at transforming points? :open_mouth:

Problem explained again:

Point values i would expect:

Points i get are all positive:

Turns out i just didn´t understand this whole transform from coordinatesystem to other coordinatesystem thing.

So this is how to always get the bottom and right dimension-line in view:

Now i just have to do the same filtering on the references.

Edit:

Reference filtering works, but there is still some mistake in there i can´t find.
I get this different results if the view has been rotated:

And thats what my transforming and filtering should prevent…

Edit:

The Coordinatesystem for the view was wrong, it works now like this:

2 Likes

can you send package list. i would be very useful