Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Mapping faces from a plane onto another plane
noé_perard_gayot
Member Posts: 4 ✭
I'm trying to make a function that "wraps" a plane onto a plane or onto a curved surface. It works for curved surfaces :
const targetWrap is WrapSurface = makeWrapSurface(context, definition.target);
const sketchPlane is Plane = evOwnerSketchPlane(context, { "entity" : definition.faces });
var result is Query = qNothing();
if (!isWrapPlane(context, targetWrap))
{
opWrap(context, id + "map", {
"wrapType" : WrapType.TRIM,
"entities" : definition.faces,
"source" : makeWrapPlane(sketchPlane),
"destination" : targetWrap
});
result = qCreatedBy(id + "map", EntityType.BODY);
}
else
{
const targetPlane is Plane = evPlane(context, { "face" : definition.target });
const moveFaces is Query = qEntityFilter(definition.faces, EntityType.FACE);
const planemap is Transform = transform(sketchPlane, targetPlane);
debug(context, moveFaces, DebugColor.RED);
opMoveFace(context, id + "map", {
"moveFaces" : moveFaces,
"transform" : planemap,
});
result = qCreatedBy(id + "map");
}
The result when extruding the query `result` is somewhat strange (moved from a plane to an offset plane) .
I'm sure there's an obvious solution, but for now I don't have a clue.
Tagged:
0
Comments
-
If your goal is to transform the letters from the cSys of sketchPlane to the cSys of targetPlane, then moveFace() isn't probably what you want. Look at opTransform().
0

