question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V2: Remove 'center' on primitives

See original GitHub issue

Expected Behavior

V2 primitives are centered at [0,0,0] by default. Therefore, the functionality to ‘center’ an object at another position can now be acheived via the center() function. In addition, the center() function also allows centering by axis (X Y Z).

let a = primitives.cube({size: [5,5,5]}) // centered at 0,0,0
let b = transforms.center({at: [5,5,5]}, primitives.cube({size: [5,5,5]})) // centered at 5,5,5

Actual Behavior

let a = primitives.cube({size: [5,5,5], center: [5,5,5]}) // centered at 5,5,5 WRONG

Steps to Reproduce the Problem

  1. As described above

Specifications

  • Version: V2
  • Platform: All
  • Environment: ALL

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
garrlkercommented, Feb 4, 2020

I’ve got all of the tests fixed except for 2.

  • The rounded cuboid tests are having an odd error I haven’t figured out yet.
  • And the expand tests are getting a geometry with a different length.

I’m spinning my wheels on them, so I could use that help 😃

All other tests were using center plain as day and I’ve fixed those. I also added a check to the center function.

The primitives were allowing a 2 value array for it’s center param and that worked just fine, but when a 2 value array was passed into the center function the tests were hanging/failing.

The check just pads the input with 0’s until the array has a length of 3.

1reaction
garrlkercommented, Jan 23, 2020

Thank you, but I think I’ve just about got it 😃

I’ve removed the center param from all of the primitives that used it.

Now I’m fixing the modeling tests that broke.

Read more comments on GitHub >

github_iconTop Results From Across the Web

removeprim VEX function - SideFX
A handle to the geometry to write to. Currently the only valid value is 0 or geoself, which means the current geometry in...
Read more >
How to delete a 2D Primitive in processing? - Stack Overflow
Deleting an object not drawing it. Add a variable that indicates whether an object needs to be drawn. Change the status of the...
Read more >
Delete boundary primitives : r/Houdini - Reddit
I'm trying to delete the boundary primitives of grid object after using convert line node, Is there any chance of achieving this using...
Read more >
Delete SOP | Part 2 | Node Reference on Vimeo
The Delete SOP deletes input geometry by group, entity number, bounding volume, primitive /point/edge normals, and/or degeneracy.
Read more >
Removing all primitives - Google Groups
Trying to remove all primitives using the removeAll() function always results in the following error ... at <anonymous>:2:15 at Object.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found