BoundingBox and Outline

Hi, would you have documentation regarding returning a MinPoint and MaxPoint from a BoundingBox or Outline

Is there a relationship with the quadrants or more a positioning in relation to the centroid

Whatever the input, if we ask for a boundingbox at time t we get the same thing for the min and the max?

I thank you in advance
Sincerely
christian.stan

Are you making the objects in the same run? Is this Revit API or Dynamo? Is the bounding box in world coordinates or relative to the view?

1 Like

hi and thank you for responding, the elements are already created, I try to rely on them to try to find a pseudo left or right or up and down to be sure to place other elements with a start and an end for the moment I start from the center and shift with the direction vector in one direction or another

I would say in global coordinates

Sincerely
christian.stan

Can you post a code sample for how you are gathering the bounding boxes?

1 Like

I’m trying to find a way to know how to identify the begin and end of a curve based on the min of the box
there must be something to do with the angle I think, it’s not obvious to me at the moment


cordially
christian.stan

So… there is no way to know which point is the start and which point is the end of a curve by the bounding box. You can find the ‘maximum’ and ‘minimum’ by greatest XY, but the point at the maximum might be the start or the end of the curve… Why not use StartPoint and EndPoint?

2 Likes

would using the exterior facing direction of the wall help to figure out what you want?

1 Like

using start and end for a horizontal wall which seems identical to the rest, I would have one material with text well oriented left right and the other not it will be on the opposite face as I use a coordinatesystem then I place material in relative coordinates with respect to it.
edit:
here is an illustration starting from the start and min of the BoundingBox
2 groups of 2 walls (one defined LR and one defined RL)



python script:

import sys
import clr

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitAPI")
import Autodesk 
from Autodesk.Revit.DB import Element,Transaction,ElementTransformUtils

elts=UnwrapElement(IN[0])
planes=IN[1]

doc=elts[0].Document
t=Transaction(doc,"Mirror Elements")
t.Start()
a=[ElementTransformUtils.MirrorElement(doc,e.Id,p.ToPlane()) for e,p in zip(elts,planes)]
t.Commit()
OUT = 0

Sincerely
christian.stan

hi, that wouldn’t change anything for a shear wall Sincerely
christian.stan

I’ll try to look into storing the coordinates I put you as a solution on this aspect
Sincerely
christian.stan