Thu, 10/16/2014 - 06:00
Hey all,
I have a closed wire made from a 2d bspline
(airfoil_wire as generated here http://pythonocc.wordpress.com/2013/04/01/using-external-airfoil-data-to...)
and I do the following to it in pythonocc:
inner_translator = BRepOffsetAPI_MakeOffset()
inner_translator.AddWire(airfoil_wire)
inner_translator.Perform(-0.01)
inner_wire = topods.Wire(inner_translator.Shape())
#################
step_writer = STEPControl_Writer()
Interface_Static_SetCVal("write.step.schema", "AP203")
step_writer.Transfer(inner_wire, STEPControl_AsIs)
status = step_writer.Write("box2.stp")
###############
I end up with this result:
*******************************************************************
****** Statistics on Transfer (Write) ******
*******************************************************************
****** Transfer Mode = 0 I.E. As Is ******
****** Transferring Shape, ShapeType = 5 ******
*** Exception Raised with no Result
No matter what I do, I can't get around this error. If I export the airfoil wire I get not such error. Is there anything that looks wrong here? I've tried fixing the wire with the following but I've had no luck :(.
def fix_wire(wire):
face = BRepBuilderAPI_MakeFace(wire).Face()
fixer = ShapeFix_Wire(wire, face, 0.001)
fixer.FixReorder()
fixer.FixConnected()
fixer.FixClosed()
return fixer.WireAPIMake()
Thu, 10/16/2014 - 06:01
PS, I have attached the files I am using if anyone would like to try.
Wed, 02/01/2017 - 03:09
Did you ever find a solution for this? I seem to be experiencing the same issue...