Jump to content
Developer Wiki and Function Reference Links ×

Location Relation of Control Geometry and Generated Geometry


Recommended Posts

Hi all,

 

I'm starting with some basic marionette stuff to get a better understanding and I'm running into a little bit of a problem that I can't seem to figure out.

 

I've created a small script which creates a rectangle and uses control geometry to determine the size of the created rectangle.  Once I wrap the script and convert it to an object node with control geometry the object, the control geometry and the generated rectangle become misaligned.  Furthermore, when i adjust the size of the control geometry the origin of the generated rectangle  seems to shift.  Does anyone know why this might be happening?   I've attached a screen shot of the issue below.

 

Thank you,

Derek

 

 

Screen Shot 2024-07-05 at 1.39.14 PM.png

Link to comment
  • Marionette Maven

So there are a lot of things to consider here.
The Control Geometry and the drawing area don't necessarily share the same coordinates (in this case it's not very important, but something worth mentioning). With specific regards to your network, if your CG isn't placed with the bottom left corner at (0,0), then your rectangle will be offset from where the CG is. The Rectangle node draws from the (0,0) location. Since you're using the width and height of your CG, which are positive values, the rectangle will have its lower left point at (0,0) and its upper right at (CG_width, CG_height).
 

Some ways you can resolve this if you don't want to concern yourself with placing the CG at the specific location are using the Align Objects node or using the Get Bounding Box node and the Create Rectangle 2 Pt node.
Edit: An additional method would be to use the Get Bounding Box node and take the values, extract the bottom Y and left X values, combining with a 2D Point node and use it as your input to p, then you can still just use the Width and Height nodes.

 

image.png

  • Like 1
Link to comment

Thank you for your response.  I have a follow-up question:  Is there a way to display and modify the overall bounding box dimensions of the control geometry in the OIP?  I would like to use the reshape tool, but also have the option to enter the exact dimensions manually.  Is that possible, and if so, how can it be done?

 

Thank you again.

Derek

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...