compas
compas copied to clipboard
Geometry brep
WIP: added initial implementation of a compas.geometry.BRep
with a Rhino backend in compas_rhino.geometry.brep
.
- Copied over the interface for BRep from
compas_occ
intocompas.geometry.BRep
and generalized. - Started implementing the package
compas_rhino.geometry.brep
with wrapping types for brep, edge, vertex and loop. - Implemented the serializing part of
data
(in some also the setter but not tested)
I could serialize a simple box brep with:
from pprint import pprint
from compas.geometry import Box
from compas.geometry import BRep
from compas.data import json_dumps
box = Box.from_width_height_depth(5., 5., 10.)
brep = BRep.from_box(box)
pprint(json_dumps(brep))
Opening this draft PR to start a conversation about the approach.
What type of change is this?
- [x] New feature in a backwards-compatible manner.
Checklist
Put an x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
- [ ] I added a line to the
CHANGELOG.md
file in theUnreleased
section under the most fitting heading (e.g.Added
,Changed
,Removed
). - [ ] I ran all tests on my computer and it's all green (i.e.
invoke test
). - [ ] I ran lint on my computer and there are no errors (i.e.
invoke lint
). - [ ] I added new functions/classes and made them available on a second-level import, e.g.
compas.datastructures.Mesh
. - [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)