Closed chenkasirer closed 3 months ago
Some more info:
This is due to this call to GeomConvert_ApproxCurve()
in BRepEdge.data
convert = GeomConvert_ApproxCurve(self.curve, 1e-3, GeomAbs_Shape.GeomAbs_C1, 1, 5)
Seems there's some issue with the types of the arguments being sent. I initially thought this is due to sending self.curve
which is of type compas_occ.geometry.OCCCurve
whereas Geom_Curve
is expected, but sending the underlying self.curve.occ_curve
doesn't work either.
Generally, I wasn't able to successfully call GeomConvert_ApproxCurve()
which in turn calls _GeomConvert.new_GeomConvert_ApproxCurve(*args)
. Hard to debug further because it's passed to the C binding from there on.
PyCharm seems to thing the issue is the GeomAbs_Shape.GeomAbs_C1
as it indicates that I'm sending an int
rather than the Enum type, but not sure if that's really the issue, and in any case not sure how to do it differently.
the use of GeomConvert_ApproxCurve
was an attempt to always convert to NURBS without any further checks. it seems that this doesn't really work. so we will have to go back to the more elaborate setup of checking curve types and doing specific conversions.
will update...
going to close this, even though not entirely solved yet, since the code has changed quite a bit in the meantime...
I am attempting to serialize the brep created in this example using
compas.data.json_dump
but getting the following error:To Reproduce
Run the following code
Expected behavior
The Brep should be serialized.
Desktop (please complete the following information):