This commit is contained in:
Andrej730
2025-09-29 09:58:16 +05:00
parent e228095391
commit 923e8423f9
6 changed files with 26 additions and 21 deletions
+17 -13
View File
@@ -358,7 +358,7 @@ yacc = "yacc" # Used during swig building process, installed with `bison` on De
missing_commands: "list[str]" = [] missing_commands: "list[str]" = []
required_commands = [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc, xz] required_commands = [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc, xz]
if "wasm" in flags: if "wasm" in flags:
required_commands.remove(yacc) # yacc not needed for wasm builds required_commands.remove(yacc) # yacc not needed for wasm builds
for cmd in required_commands: for cmd in required_commands:
if which(cmd) is None: if which(cmd) is None:
missing_commands.append(cmd) missing_commands.append(cmd)
@@ -932,7 +932,7 @@ if "libxml2" in targets:
if MAC_CROSS_COMPILE_INTEL: if MAC_CROSS_COMPILE_INTEL:
OLD_CC = os.environ.get("CC") OLD_CC = os.environ.get("CC")
os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC
build_tool_args=[ build_tool_args = [
"--without-python", "--without-python",
ENABLE_FLAG, ENABLE_FLAG,
DISABLE_FLAG, DISABLE_FLAG,
@@ -1258,21 +1258,25 @@ if "cgal" in targets:
cmake_args_prefix_path.append(f"{DEPS_DIR}/install/gmp-{GMP_VERSION}") cmake_args_prefix_path.append(f"{DEPS_DIR}/install/gmp-{GMP_VERSION}")
cmake_args_prefix_path.append(f"{DEPS_DIR}/install/mpfr-{MPFR_VERSION}") cmake_args_prefix_path.append(f"{DEPS_DIR}/install/mpfr-{MPFR_VERSION}")
if "wasm" in flags: if "wasm" in flags:
cmake_args.extend([ cmake_args.extend(
f"-DCGAL_INCLUDE_DIR={DEPS_DIR}/install/cgal-{CGAL_VERSION}/include", [
f"-DGMP_INCLUDE_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/include", f"-DCGAL_INCLUDE_DIR={DEPS_DIR}/install/cgal-{CGAL_VERSION}/include",
f"-DGMP_LIBRARY_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/lib", f"-DGMP_INCLUDE_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/include",
f"-DMPFR_INCLUDE_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/include", f"-DGMP_LIBRARY_DIR={DEPS_DIR}/install/gmp-{GMP_VERSION}/lib",
f"-DMPFR_LIBRARY_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/lib", f"-DMPFR_INCLUDE_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/include",
]) f"-DMPFR_LIBRARY_DIR={DEPS_DIR}/install/mpfr-{MPFR_VERSION}/lib",
]
)
if "occ" in targets and USE_OCCT: if "occ" in targets and USE_OCCT:
cmake_args_prefix_path.append(f"{DEPS_DIR}/install/occt-{OCCT_VERSION}") cmake_args_prefix_path.append(f"{DEPS_DIR}/install/occt-{OCCT_VERSION}")
if "wasm" in flags: if "wasm" in flags:
cmake_args.extend([ cmake_args.extend(
f"-DOCC_INCLUDE_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/include/opencascade", [
f"-DOCC_LIBRARY_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/lib", f"-DOCC_INCLUDE_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/include/opencascade",
]) f"-DOCC_LIBRARY_DIR={DEPS_DIR}/install/occt-{OCCT_VERSION}/lib",
]
)
elif "occ" in targets: elif "occ" in targets:
# We don't support find_package for OCE. # We don't support find_package for OCE.
+1 -2
View File
@@ -486,7 +486,7 @@ class Project(bonsai.core.tool.Project):
@classmethod @classmethod
def get_clipping_planes_normals(cls): def get_clipping_planes_normals(cls):
normals =[] normals = []
for clipping_plane in tool.Project.get_project_props().clipping_planes: for clipping_plane in tool.Project.get_project_props().clipping_planes:
plane = clipping_plane.obj plane = clipping_plane.obj
if not plane or not plane.data: if not plane or not plane.data:
@@ -502,4 +502,3 @@ class Project(bonsai.core.tool.Project):
d2 = v3 - v2 d2 = v3 - v2
normals.append((v1, d1.cross(d2).normalized())) normals.append((v1, d1.cross(d2).normalized()))
return normals return normals
+1 -3
View File
@@ -165,7 +165,6 @@ class Raycast(bonsai.core.tool.Raycast):
return False return False
return True return True
@classmethod @classmethod
def get_viewport_ray_data( def get_viewport_ray_data(
cls, context: bpy.types.Context, event: bpy.types.Event, mouse_pos: tuple[int, int] = None cls, context: bpy.types.Context, event: bpy.types.Event, mouse_pos: tuple[int, int] = None
@@ -455,7 +454,7 @@ class Raycast(bonsai.core.tool.Raycast):
if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d): if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d):
if tool.Raycast.object_is_visible_in_clipping_plane(obj): if tool.Raycast.object_is_visible_in_clipping_plane(obj):
objs_to_raycast.append(obj) objs_to_raycast.append(obj)
return objs_to_raycast return objs_to_raycast
@classmethod @classmethod
@@ -544,4 +543,3 @@ class Raycast(bonsai.core.tool.Raycast):
if lens < 50: if lens < 50:
snap_threshold *= value snap_threshold *= value
return snap_threshold return snap_threshold
+5 -1
View File
@@ -491,7 +491,11 @@ class Snap(bonsai.core.tool.Snap):
"distance": 10, # High value so it has low priority "distance": 10, # High value so it has low priority
} }
detected_snaps.append(snap_point) detected_snaps.append(snap_point)
detected_snaps = [snap for snap in detected_snaps if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane")] detected_snaps = [
snap
for snap in detected_snaps
if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane")
]
return detected_snaps return detected_snaps
@classmethod @classmethod
@@ -185,7 +185,7 @@ def open(
return sqlite(path) return sqlite(path)
if should_stream: if should_stream:
return stream(path) return stream(path)
if readonly: # Temporary conditional see #7131. Remove once newer builds don't segfault on Linux. if readonly: # Temporary conditional see #7131. Remove once newer builds don't segfault on Linux.
f = ifcopenshell_wrapper.open(str(path.absolute()), readonly) f = ifcopenshell_wrapper.open(str(path.absolute()), readonly)
else: else:
f = ifcopenshell_wrapper.open(str(path.absolute())) f = ifcopenshell_wrapper.open(str(path.absolute()))
+1 -1
View File
@@ -442,7 +442,7 @@ class Html(Json):
def report(self) -> None: def report(self) -> None:
super().report() super().report()
for spec in self.results["specifications"]: for spec in self.results["specifications"]:
print('checking', spec["cardinality"]) print("checking", spec["cardinality"])
if spec["cardinality"] == "optional" and spec["total_checks"] == 0: if spec["cardinality"] == "optional" and spec["total_checks"] == 0:
spec["is_skipped"] = True spec["is_skipped"] = True
spec["is_prohibited"] = spec["cardinality"] == "prohibited" spec["is_prohibited"] = spec["cardinality"] == "prohibited"