Joel_graff wrote:While the fact that the core functionality is so readily demonstrated in Sketcher is really encouraging, it appears to me that Sketcher is implemented almost entirely in C++. Further, there doesn't appear to be any API documentation, (nor much of an API so far as I can tell). Is there more information on how to interact with Sketcher via Python?
I know little about documentation. However, every time you execute a command in the UI a line is written to the Python console. That is my API documentation (together with looking in the pyImp.cpp files in the source, SketchObjectPyImp.cpp should be a right point to look into sketcher commands).
Joel_graff wrote:Also, one of the things that I noticed in the documentation is that the sketcher objects are intended to generate a 3D object and that the sketcher geometry exists in only the sketcher design stage.
I would not say that is right. Sketches are "wires". You just define them with constraints. They can be used for other purposes not necessarily for 3D.
Joel_graff wrote:With an alignment object, this poses a couple of problems:
1. The alignment object is a real object that must exist in the final model, though it is never more than curvelinear.
2. The alignment object is the superposition of two curvelinear objects in orthogonal planes (horizontal and vertical)
Meeting these requirements seems to be complicated using Sketcher...
Needless to say (it will be apparent anyway) I know nothing about Civil engineering. I will try to fill some of the blanks though:
1. A sketch defines a curve constrained to a plane. If your curves are not constrained to a plane they can not be contained in a Sketch.
2. However, several sketches can provide several curves, each of them constrained to a (potentially different) plane.
3. Additionally, it is possible to create a 3D object/Face out of one or more purposefully created sketches, so as to produce a 3D shape having a wire meeting some constraint and them downgrade the 3D solid, so as to extract that specific wire.
Note: Downgrade tool is present in Draft WB.
Of course, it is always possible to define your objects directly in python. I can imagine a python Feature that uses two sketches to construct such 3D curve (from two orthogonal sketches), by for example adding the endpoint coordinates of segments of both sketches. There may even be some OCC function to help here. Just throwing some food for thought.