Message 1 of 4
creating a Path from a Sketch that was projected on a surface always fail (C++)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to create a Path from the sketch resulting of a call to projectToSurface.
auto fret_profile = component->sketches()->add(component->yZConstructionPlane());
auto profile = fret_profile->projectToSurface(faces, curves, AlongVectorSurfaceProjectType, component->zConstructionAxis())[0];
auto path = Path::create(profile, connectedChainedCurves);
auto input = component->features()->sweepFeatures()->createInput(fret_wire_profile, path, NewBodyFeatureOperation);
however the Path is always null and a call to getLastError gives me the following string:
InterValidationError :
Utils::getObjectPath(obj.get(), objPath, nullptr, contextPath)
Please note that doing it in the application does work right away (I can create the sweep from the sketches my script creates).
I've tried many things to fix this and programatically create a valid Path from my projected sketch but came empty handed. The sketch I try to create the Path with is purple which I guess is because it's the product of the projectToSurface call.
Is there anything I can do to fix this?
Thanks!