Yes, that's exactly what I'm looking for. Thanks
On Wed, Feb 10, 2010 at 3:13 PM, Andy Haywood <a...@andyh.fsworld.co.uk>wrote: > Hi, > > On 10/02/2010 17:41, Srecko wrote: > > Pythonocc might be the thing I've been looking for for a long time. > > > > Let me give you a simple example of what I'm after. > > Lets say my company sells simple metal rings with 3 parameters: OD > > (outside dia), ID (inside dia) and thickness. If I have a web > > application (written in Django) and a form with those three params, is > > it possible to use submitted form, generate model on the server, make > > it a STEP file and email it to the user. Visualization (GUI) is not > > required. Then user(customer) could take that file and use it in their > > SolidWorks, Inventor etc. project as a part. > > > > I've done something similar with pythonocc in the past as part of a > research project. A video of the application (to create some basic > geometry ready for some stretch-forming analysis) is here: > > http://www.ruledriven.com/StretchFormGeometry/ > > It doesn't use Django, but most of the Python web frameworks work in the > same basic way. The main thing to watch out for is the OCC environment > variables, but usually if you have OCC installed then it isn't a problem. > > In this example I generate a VRML model that is displayed in the > browser, but it would be pretty similar code to generate a STEP model. A > simple starter for 10 would be something like: > > from OCC import * > wr = STEPControl.STEPControl_Writer() > box = BRepPrimAPI.BRepPrimAPI_MakeBox(100, 100, 100) > wr.Transfer(box.Shape(), STEPControl.STEPControl_AsIs) > wr.Write("c:/test.step") > > I've not tested this in a recent version of pythonocc, so it may need a > few tweaks to get it working. > > Andy > > > > _______________________________________________ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users >
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users