Commit Graph
980 Commits
Author SHA1 Message Date
pca006132 324ff3f065 push to pypi 2023-10-30 17:57:34 +08:00
Chun Kit LAM 0856539bfc fix ubuntu build (#582) 2023-10-30 17:56:09 +08:00
Emmett Lalish 621835683f Earclip (#564)
* earclip compiles

* some tests passing

* 46 tests passing

* refactor

* cleanup

* new cost

* cleanup

* fixed TouchingHole

* more fixes

* only 5 tests failing

* fixed short sides

* fixed Sponge2

* better cost

* improved keyholing

* Moved Rect to public

* added top/bottom check

* fixed bBox

* Polygon tests pass

* fixed Sponge3a

* another fix, another test

* keyhole refactor

* Added ClipDegenerates

* Refactor FindStarts

* fixed bugs

* fixed Sponge4

* refactor clipped

* another bug, another test

* another bug, another test

* Sponge4 passing

* all tests passing

* removed old triangulator

* fix isfinite

* debug checks

* remove 2-manifold check

* added comments

* fixed missing point bug

* another test, another fix

* two tests added and fixed

* fix build

* fixed CoplanarProp

* fixed seg fault

* reenable 2-manifold check

* refactor for polygon area

* factored out loop

* tests passing

* another test, another fix

* another test, another fix

* fixed dedupe segfault

* ignore duplicated verts

* re-enabled turn180

* re-enabled duplicate tests

* another test, another fix

* refactor keyholing

* more precise area computation

* disabled a test

* added test

* another test, another test

* fixed bridge bound

* fewer short edges

* replaced intersection sorting with InsideEdge

* another test, another fix

* allow a few degenerates in Sponge4
2023-10-25 08:16:03 -07:00
Chun Kit LAM bec8164120 fix osx 10.13 error (#577)
* fix osx 10.13 error

* errors regarding std::optional

* format
2023-10-15 09:12:51 -07:00
Sebastien Loriot 062399c1c7 Fix perf test (#575)
do translate the sphere
2023-10-11 02:08:46 +08:00
Chun Kit LAM d51ee709c2 optimized connected component computation (#569)
* use union find for graph connected components

* update readme

* remove graphlite dep
2023-10-05 23:42:57 +08:00
Chun Kit LAM 206871ac11 dependency update (#559)
* dependency update

* revert BUILD_SHARED_LIBS changes

* test

* .

* don't try weird stuff with windows

* update

* update CI
2023-09-15 00:42:12 +08:00
Johnathon Selstad 2055b9c412 [FEAT] Add Status() to the Python Bindings (#558)
* Add Status() to the Python Bindings

This will help consumers of the Python bindings diagnose why their input meshes are not translating into manifolds properly...

* Make clang-format happier

* Use its suggestions verbatim
2023-09-12 08:24:30 -07:00
Chun Kit LAM 5e103931f1 added deterministic option (#550)
* added deterministic option

* fix formatting

* address some comments

* use kahan summation

* revert DoesOverlap changes

* remove old code

* formatting
2023-09-05 14:12:34 +08:00
Chun Kit LAM 77051ead35 misc (#548)
* use stl unique

* use stl sort
2023-09-02 15:03:22 +08:00
Eric Vin 83b78f8356 Python Bindings: Change tri_verts type from float to int (#546)
Change tri_verts type from float to int
2023-08-31 01:03:10 +08:00
Chun Kit LAM 6c6193c25b fix ndarray creation (#543) (#544) 2023-08-31 00:09:07 +08:00
Chun Kit LAM e79d343bec fix openscad build (#539)
* fix openscad build

* update clipper2

* conditional compile with pstl

* try NOMINMAX for MSVC

* detect win32

* use struct instead of lambda

* fix non-tbb build

* try to add mxe to CI

* disable pybind for mxe
2023-08-29 03:05:22 +08:00
Chun Kit LAM 1d6a89ac87 fix undefined behavior for SparseIndices (#540) 2023-08-28 13:47:21 +08:00
Chun Kit LAM 8651bf8bd5 nanobind (#537)
* python stuff

* do not choose musllinux_1_2

* skip musl build

musllinux_1_1 is too old

* try musllinux_1_2

* pep-0632

* fix

* update

* fix CI

* skip emulated tests on mac

* use build frontend

* use scikit-build-core

* re-enable action

* minor changes

speed up compilation a bit

* use nanobind

* don't use SABIModule for older python versions

* fix build error

* fix find and replace error

* Revert "re-enable action"

This reverts commit b3ede2a707743def16ded29bfb8e2b9a1c37f596.
2023-08-28 13:41:34 +08:00
Chun Kit LAM 1514c15184 fix decimator (#534) 2023-08-24 13:00:09 +08:00
Chun Kit LAM cc83e1b7aa misc (#533)
* use better policies

* removed redundant copy

* added condensed_matter test

* disable normal check for CondensedMatter16

* disable overlap checking as well
2023-08-24 02:09:51 +08:00
pca006132 111350f1ef fix memory leak for vec (#532)
* fix memory leak for vec

* removing reminiscence of CUDA

* formatting
2023-08-16 23:28:26 +08:00
pca006132 b4f583fcae refactor (#531)
* added bound check for vec_dh

* fix cmakefile

* refactored VecDH

* renamed VecDH into Vec

* better packaging

* formatting

* include <algorithm>

* fix windows

* documentation and copyright fixes

* use shorter names and implicit conversions

* formatting

* minimum circular segments = 3
2023-08-16 12:08:10 +08:00
Emmett Lalish 8011fb6072 Triangulator: shift on merge (#528)
* allow shift on merge

* fixed more tests with proper uncertainty

* fixed another test
2023-08-13 22:00:15 -07:00
pca006132 9290d420b0 performance tuning and disabling deprecated backends (#525)
* use single vector SparseIndices

* faster binary search

* tracy

* disable cuda and omp backends

* formatting

* find data races

* remove some cuda stuff

* rename indices to vertices

* fix

* better SparseIndices API

* minor fixes

* parallel boolean

* optimize csg_tree

* relax Samples.GyroidModule

* small fixes

* vec_dh refactor

* fix compiler errors

* disable some gcc warnings

* only apply new warning flags for GCC
2023-08-12 14:22:28 +08:00
Emmett Lalish fca66380f5 3mf node export (#517)
* added 3mf hierarchy support, not tested yet

* 3mf nodes work with updated exporter

* updated 3mfexport version
2023-08-07 22:35:50 -07:00
pca006132 8497e44915 parallel some more (#522)
* parallel some more

* use std::mutex

* fix compilation error

* check if max concurrency > 1

* use task_group

* disable face reordering

* preserve face order

* comments

* fix cuda build

* fix meshid not found situation

* use explicit stack and scratch buffer

this avoids potential stack overflow and reduces allocation calls

* faster collider

* please cuda

* missing commit

* remove collider optimization

* dedup face_op.cpp

* dedup boolean_result.cpp

* remove ambiguous comment

* include array
2023-08-08 01:26:09 +08:00
pca006132 a7eac92087 third_party dependencies (#523)
* use system gtest if possible

* optional tracy support

* fix meshid not found situation

* try fix CI

* fix ubuntu build

* disable windows tbb build first

* update tbb config

* format

* fix cmake BUILD_SHARED_LIBS

we should make the library type implicit, so users can decide whether or
not to build shared libraries.

* revert public.h changes

* remove version requirement for gtest

* update tracy instructions

no need to use sudo,
and we need some debug flags for good stack capture

* fix js build
2023-08-08 01:12:59 +08:00
pca006132 15399474fa more triangulator check (#516)
* add minimize_testcase helper

* added testcases from #502

* minor cleanup

* Update polygon.cpp

* Update face_op.cpp
2023-08-06 14:57:07 +08:00
pca006132 2d513446f7 fixed for_each_host and for_each_n_host (#519) 2023-08-04 16:50:38 +08:00
Emmett Lalish abff7e8ed3 triangulator fix (#509)
* added tests

* revert param changes

* fixed Precision3 and Hole

* revert test change
2023-07-30 23:42:30 -07:00
Emmett Lalish 7c454dc7a4 tighten CCW (#508) 2023-07-29 22:37:52 -07:00
Emmett Lalishandpca006132 ffdd97d4d3 adding python set_properties (#504)
* adding test of properties

* python set_properties

* fixed sponge example

---------

Co-authored-by: pca006132 <john.lck40@gmail.com>
2023-07-29 22:10:28 -07:00
Emmett Lalishandpca006132 7facd0ecc0 Make save dropdown menu (#505)
* fix include

* made new dropdown

* mobile ui

* cleanup

---------

Co-authored-by: pca006132 <john.lck40@gmail.com>
2023-07-28 12:23:57 -07:00
pca006132 59760b3369 added basic 3mf export (#500)
* added basic 3mf export

* updated worker test

* fixes

* formatting

* fix
2023-07-27 08:34:51 -07:00
Stéphane GINIER 5f9b484b6c Preventing crash with self intersection (#501)
* Prevent infinite recursion

* Add test for self intersection
2023-07-26 21:43:55 -07:00
pca006132 18edefc6c4 some more optimizations (#503)
* simple speedup from stl algorithms

* fix build

* std::list allocator optimization

* added documentation

* fix weird formatting issues

* try fixing MacOS build

it seems that Apple Clang 14 does not support pstl

* fix again

* fix macos build

* fix apple

* clean up using macro

* fix apple?

* small fix...

* fix apple (again...)
2023-07-25 02:33:15 +08:00
Emmett Lalishandpca006132 93e06a2de8 Update python mesh (#492)
* updated python mesh

* updated python meshgl

* clean up array related stuff

* fix hsplit

* fix according to comments

* make to_mesh accept MeshGL

* fixes

---------

Co-authored-by: pca006132 <john.lck40@gmail.com>
2023-07-24 12:08:00 +08:00
Geoff deRosenroll 047159e2c4 Add hull bindings (c, wasm/js, and python) (#497)
* Add C bindings to hull methods

* Add hull python bindings

* WIP adding JS bindings to hull methods

* Add flexible static hull for manifold

* Add hull_points to manifold class

* Remove compose binding

* Cleanup translate/rotate signature overloads
2023-07-20 09:25:27 -07:00
pca006132 a8626f907c please gcc (#496)
* please gcc

* added documentation for mallocManaged
2023-07-19 10:58:28 +08:00
Geoff deRosenroll 2f22b92352 3d Convex Hull via Akuukka QuickHull (#489)
Add convex hull methods to Manifold using newly vendored https://github.com/akuukka/quickhull
2023-07-17 17:09:59 -07:00
Stéphane GINIER a3d7991563 Optimize sort_by_key (SortFaces/SortVerts) (#494)
* Optimize sort_by_key (SortFaces/SortVerts)

Remap boxes separately

* Fix build validation
2023-07-17 10:36:26 +08:00
Stéphane GINIER 2aef6e4728 Optimise SortEntry memory footprint (#493) 2023-07-15 22:21:26 +08:00
pca006132 c167a48d36 optimization in #483 (#491)
* remove extra prefetch

this is in the hot path and causes performance issues

* implemented optimization proposed by @stephomi in #483

* formatting

* fix cuda build

* combine the loop
2023-07-15 19:01:32 +08:00
Peter Harman da3f323113 (C bindings) Pass additional data to level set SDF function (#427)
Allows a developer to pass some context to the level set function in the C FFI bindings, such as a pointer to an object in the host language, so that parallel calls can be threadsafe.
2023-07-13 12:50:40 -07:00
Emmett Lalish 8b7bf4231b updated python doc strings (#488)
* updated doc strings

* pymanifold -> manifold3d
2023-07-13 11:34:31 -07:00
Stéphane GINIER ac2cfd857f Replace map with unordered_map (#484)
Replace map usage with vector
2023-07-13 07:15:08 -07:00
pca006132 285bb0754b fix nixos js build (#473)
* fix nix js build

* fix js CrossSection::rotate binding

* add wasm hull operation
2023-07-12 12:03:19 +08:00
Geoff deRosenroll ba5fead6d5 Add 2d hull operation (#486)
This adds a 2d convex hull operation to CrossSection (ported from OCADml, which I ported based on BOSL2).
2023-07-10 23:43:47 -07:00
Emmett Lalish 96c57c0591 Fix Merge manifoldness issues (#481)
* test passes

* fixed merge properly

* fixed relation

* fixed pinched verts

* added WASM debug instructions
2023-07-07 09:40:10 -07:00
Emmett Lalish 4b65ff3afe Fix operations with different numbers of properties (#480)
* added tests and fixed a bug

* more testing, fixed compose
2023-07-06 13:12:33 -07:00
Geoff deRosenroll 709021d9d2 Remove RectClip API + Rect::AsCrossSection fix (#478)
Following discussion on #455, this removes RectClip from our API, as it does not provide the same guarantees that Clipper2's regular boolean clipping operations give us (that make sure that CrossSections can be extruded successfully).

Also, this fixes AsCrossSection which was returning empty CrossSections due to incorrect winding followed by a Positive fill rule union operation. Now it is working as advertised, while skipping over the needless clipping by implementing it as a CrossSection constructor (building a PathsD directly).
2023-07-05 10:41:03 -07:00
John Collins 6cec951aed Partial Revolve (#455)
* handle verts on revolve axis

* Tests working

* Const declares, test cycle start vert

* clang-format

* clang-format test code

* fix header declaration

* WASM bindings

* format bindings.js

* clang format

* Address comments
2023-07-04 15:52:48 -07:00
Emmett Lalish dd3445ddb1 fixed WASM segfault (#474) 2023-06-30 08:55:02 -07:00