Giter VIP home page Giter VIP logo

Comments (14)

Nice3point avatar Nice3point commented on September 10, 2024 1

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:
ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024 1

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:

  • Blue: Origin
  • Red: Centroid

image

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,

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024 1

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅
Scaling by 4x this fireplace loads the cpu a lot and rendering takes 10 sec

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024 1

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

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024 1

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 🀣

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

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

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

TODO:

We need to split volumes for tesselation, instead of using original solid. Sometimes faces array is empty (curtain walls)
ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

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

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

This is the code for the Solid right?https://github.com/jeremytammik/RevitLookup/blob/dev/source/RevitLookup/Core/Visualization/SolidVisualizationServer.cs

yeah, right

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

@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

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

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.

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

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.

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

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.

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

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

from revitlookup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.