Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounded object looks choppy in the svg #4067

Open
theoryshaw opened this issue Dec 1, 2023 · 2 comments
Open

Rounded object looks choppy in the svg #4067

theoryshaw opened this issue Dec 1, 2023 · 2 comments

Comments

@theoryshaw
Copy link
Member

theoryshaw commented Dec 1, 2023

Rounded object looks choppy in the svg

file: https://hub.openingdesign.com/OpeningDesign/Restaurant_Sun_Prairie/src/commit/0325096c1a023171206d76072fe9edd2b9eb1fcc/Models/BlenderBIM/Restaurant_Sun_Prairie.ifc

image

image

@theoryshaw theoryshaw changed the title Rounded objects look choppy in the svg Rounded object look choppy in the svg Dec 1, 2023
@theoryshaw theoryshaw changed the title Rounded object look choppy in the svg Rounded object looks choppy in the svg Dec 1, 2023
@aothms
Copy link
Member

aothms commented Dec 1, 2023

So two things to play with:

https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/draw.py#L121 and more importantly setUseHlrPoly(False).

By default we use Polygonal HLR because anyway both svgfill nor shapely can deal with curved SVG elements (I guess...).

The other thing to try is:

s = ifcopenshell.geom.settings()
s.set_deflection_tolerance(0.0001)

@theoryshaw
Copy link
Member Author

Thanks @aothms

Reporting back.

When using setUseHlrPoly(False) the following is svg is output. Neither 'Calculate Shapely Surfaces' or 'Calculate SVGFills Surfaces' is enabled.

image

...

Dumb question, where do I add the following?

s = ifcopenshell.geom.settings()
s.set_deflection_tolerance(0.0001)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants