Menu

#7 Profile export capability (SVG, DXF, ...)

open
nobody
None
5
2011-07-31
2011-07-31
No

I would like to see a way to export complete gear profiles from pyGear to other formats. Personally, SVG would be ideal, but DXF is probably more useful for CAD purposes. Exporting with the derivative data to get a smooth interpolated curve would be great for SVG as then you need far fewer points for a nice-looking curve.

I can help with SVG control point fiddling if required. I just don't know how to get the relevant data (co-ords and tangents) out of the OCC _formwire. I couldn't find any information on how do that. It could be that this in already part of pythonOCC and I missed it!

Discussion

  • Joana

    Joana - 2011-08-01

    The problem is, that OpenCascade does not provide an interface for writing DXF- or SVG-files. In order to provide this functionality, an interface has to be written from the scratch or another python module has to be found. I don't know if the DXF-format is free and documented sufficiently.
    It should be possible however, to extract the edges from the _formwire (TopExp_Explorer) and the then the curves from these edges (BRepAdaptor_Curve). The curves are bsplines limited by vertices projected on the curve itsself and all poles, knots and weights as well as derivates are accessible (Geom_BSplineCurve methods).
    The tip chamfer can be a line object however (Geom_Line), but some information like derivatives can be accessed via its methods.

     
  • Joana

    Joana - 2011-08-05

    A piossible solution is to export the gear._formwire to a STEP-file. I tried to import this in Abaqus as a Sketch and it worked just fine.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.