Skip to content

How do I move a face? #20

@skbizport

Description

@skbizport

Tried using code like following, but does not seem to work. Any suggestions appreciated.

//Added moveFace method on Solid
NAN_METHOD(Solid::moveFace) 
{
    NanScope();

    Solid* pThis = ObjectWrap::Unwrap<Solid>(args.This());
    Face* pf = NULL;

    if(!extractArg(args[0],pf)) {
      NanThrowError("invalid arguments moveFace : expecting <FACE>");    
      NanReturnUndefined();
    }

    gp_Trsf transformation;
    double x=0,y=0,z=0;

    ReadPoint(args[1],&x,&y,&z);    
    transformation.SetTranslation(gp_Vec(x,y,z));

    //This does not work
    //Event BRepTools_ReShape does not work.   
    pf->face().Move(transformation);  
    NanReturnUndefined();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions