mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Proper svgfill isolation
This commit is contained in:
@@ -24,5 +24,12 @@ def test_ifcopenshell_import(selenium):
|
|||||||
wall.Name = "Test"
|
wall.Name = "Test"
|
||||||
assert wall.Name == "Test", f"Entity name wasn't changed: {{wall}}"
|
assert wall.Name == "Test", f"Entity name wasn't changed: {{wall}}"
|
||||||
print(wall)
|
print(wall)
|
||||||
|
|
||||||
|
wrapper = ifcopenshell.ifcopenshell_wrapper
|
||||||
|
svg = '<svg xmlns="http://www.w3.org/2000/svg"><g><path d="M 0 0 L 1 0 L 0 1 Z"/></g></svg>'
|
||||||
|
segments = wrapper.svg_to_line_segments(svg, None)
|
||||||
|
polygons = wrapper.line_segments_to_polygons(wrapper.EXACT_PREDICATES, 0.0, segments)
|
||||||
|
assert len(polygons) == 1, f"Unexpected svgfill polygon groups: {{polygons}}"
|
||||||
|
assert len(polygons[0]) == 1, f"Unexpected svgfill polygons: {{polygons}}"
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ endif()
|
|||||||
include_directories(${Boost_INCLUDE_DIRS} ${SVGPP_INCLUDE})
|
include_directories(${Boost_INCLUDE_DIRS} ${SVGPP_INCLUDE})
|
||||||
|
|
||||||
file(GLOB LIB_H_FILES src/*.h)
|
file(GLOB LIB_H_FILES src/*.h)
|
||||||
file(GLOB LIB_CPP_FILES src/svgfill.cpp src/arrange_polygons.cpp src/svgfill_plugin.cpp)
|
set(LIB_CPP_FILES src/svgfill.cpp src/arrange_polygons.cpp src/svgfill_plugin.cpp)
|
||||||
set(LIB_SRC_FILES ${LIB_H_FILES} ${LIB_CPP_FILES})
|
set(LIB_SRC_FILES ${LIB_H_FILES} ${LIB_CPP_FILES})
|
||||||
add_library(svgfill SHARED ${LIB_SRC_FILES})
|
add_library(svgfill SHARED ${LIB_SRC_FILES})
|
||||||
target_compile_definitions(svgfill PRIVATE BOOST_DLL_USE_STD_FS)
|
target_compile_definitions(svgfill PRIVATE BOOST_DLL_USE_STD_FS)
|
||||||
|
|||||||
Reference in New Issue
Block a user