Closed ricaun closed 5 months ago
Thank you) makes sense. I didn't want to delay the first release as scaling Solid would take longer, that's the only reason why I added Cage instead of scale. Wait for the future, I'll add it
TODO:
We need to split volumes for tesselation, instead of using original solid. Sometimes faces array is empty (curtain walls)
We need to split volumes for tesselation, instead of using original solid. Sometimes faces array is empty (curtain walls)
Interesting, I didn't know that.
This is the code for the Solid right?https://github.com/jeremytammik/RevitLookup/blob/dev/source/RevitLookup/Core/Visualization/SolidVisualizationServer.cs
This is the code for the Solid right?https://github.com/jeremytammik/RevitLookup/blob/dev/source/RevitLookup/Core/Visualization/SolidVisualizationServer.cs
yeah, right
@ricaun
I added a minimum Expansion so that the rendering does not overlap the current geometry
I need your opinion, to make the scaling a percentage, or to a specific value like Faces? In favour of an inch value goes the scaling of too small details, which even at x2 is hard to see
Scaling is performed from the Solid centroid
branch: https://github.com/jeremytammik/RevitLookup/tree/dev_solid-scaling
also solved the problem with rendering of super thin solids, for comparison how it is displayed using RevitAPI UiDocument.Selection.SetReferences and visualisation
SetReferences:
Visualization:
Neat!
ComputeCentroid
is the center of gravity in the solid, I use the Origin from the BoundingBox to get the middle of the solid to perforce a scale in the middle of the solid. Could use the Min/Max as well.
/// <summary>
/// GetOrigin using bounding box transform origin
/// </summary>
/// <param name="solid"></param>
/// <returns></returns>
public static XYZ GetOrigin(this Solid solid)
{
return solid.GetBoundingBox().Transform.Origin;
}
I need your opinion, to make the scaling a percentage, or to a specific value like Faces? In favour of an inch value goes the scaling of too small details, which even at x2 is hard to see
I guess in the solid would make more sense to be percentage.
I use the Origin from the BoundingBox
The behaviour is the same using Centroid and GetBoundingBox().Transform.Origin
I guess in the solid would make more sense to be percentage.
I can try it, I'll have to test it for a couple of days to see what's more convenient We need to determine what min and max values of scale are optimal and whether we should use a downscaling, probably not.
The behaviour is the same using Centroid and GetBoundingBox().Transform.Origin
Is not the same, if is a irregular solid the centroid gonna be different from the center of the boundbox.
Like this Cone with 1x1x1:
We need to determine what min and max values of scale are optimal and whether we should use a downscaling, probably not.
Maybe 1x to 10x, don't know if more than 10x is necessary,
Scaling by 4x this fireplace loads the cpu a lot and rendering takes 10 sec
Scaling by 4x this fireplace loads the cpu a lot and rendering takes 10 sec
O.o That is generating a lot of triangles per faces, the Triangulate in the face has a parameter, set to 0 just to test. The Mesh gonna be really bad.
Triangulate in the face has a parameter, set to 0 just to test
square for a round face?) no But this option works super fast
Hehehe, zero is too much. 🤣
Basically you can control the resolution of the triangulation, without the value Revit gonna define a value depending of the size of the face. If is a round face and is really big, Revit gonna generate more triangles.
If you set a value the quantity of triangles gonna be fixed maybe, no sure. You could put a slide in the Face to see what the value does in the Triangulate. If you set to 0.1 probably gonna show a little better intend of a square 🤣
Released 2025.0.7. Tessellation kept as it is. In Release build it is not so slow. And slowdowns happen on very complex shaped objects, on normal objects it is extremely fast
First really at all amazing implementation of the visualization. Great job @Nice3point, pretty interesting the way you scale the vertex in model. 👏
One thing I think is missing is a way to scale the Solid, only because you can scale Face, Mesh, Line... And is easier to visualize if you can scale in front of the original geometry.