https://github.com/erictuvesson/csg
Create geometry objects from boolean operations.
https://github.com/erictuvesson/csg
cross-platform csg csharp dotnet geometry stl
Last synced: about 1 year ago
JSON representation
Create geometry objects from boolean operations.
- Host: GitHub
- URL: https://github.com/erictuvesson/csg
- Owner: erictuvesson
- License: mit
- Created: 2018-04-28T16:31:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-03T01:55:26.000Z (over 4 years ago)
- Last Synced: 2025-02-06T06:47:17.057Z (about 1 year ago)
- Topics: cross-platform, csg, csharp, dotnet, geometry, stl
- Language: C#
- Homepage:
- Size: 4.43 MB
- Stars: 18
- Watchers: 2
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: MIT-LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Constructive solid geometry (CSG)
[](https://www.nuget.org/packages/CSGeometry/) [](https://www.codacy.com/app/eric-tuvesson/CSG?utm_source=github.com&utm_medium=referral&utm_content=erictuvesson/CSG&utm_campaign=Badge_Grade)
Create geometry objects from boolean operations.
## Sample
```csharp
var shape1 = new Cube(position: new Vector3(0, 0, 0), size: new Vector3(0.50f, 0.50f, 0.50f));
var shape2 = new Cube(position: new Vector3(1, 1, 0), size: new Vector3(0.50f, 0.50f, 0.50f));
var result = shape1.Intersect(shape2);
// result.Vertices => Vertex[];
// result.Indices => ushort[];
// then you have the vertices and indices in result.
```
## Contributing
Contributions are always welcome.
## License
The project is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).