Trim not working

Trim with the Line option is not working on a lot of surfaces in Version 7 SR16. See example surface that I can’t trim attached. In quick testing, it seems like the file has to have at least 1 object at or below z0 in order for Trim with Line to work.

trim w line not working.3dm (57.4 KB)

Hi Peter - that one works here so far in our latest - what view are you using to trim?

-Pascal

Doesn’t matter - any view will do.

In case it helps:

Rhino 7 SR16 2022-3-8 (Rhino 7, 7.16.22067.13001, Git hash:master @ aa7902c94c5aa33511e60d30f82b636be43bc85f)
License type: Commercial, build 2022-03-08
License details: Cloud Zoo

Windows 10.0.19044 SR0.0 or greater (Physical RAM: 32Gb)

Computer platform: DESKTOP

Standard graphics configuration.
Primary display and OpenGL: NVIDIA GeForce RTX 3060 (NVidia) Memory: 12GB, Driver date: 4-8-2021 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 462.31
> Accelerated graphics device with 4 adapter port(s)
- Windows Main Display attached to adapter port #0
- Secondary monitor attached to adapter port #1

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 8x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 4-8-2021
Driver Version: 27.21.14.6231
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 12 GB

Rhino plugins that do not ship with Rhino
C:\Users\phcre\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\PetersTools\3.1.3\PetersTools.rhp “PetersTools” 3.1.7989.39042
C:\Users\phcre\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\NVIDIADenoiser\0.4.2\NVIDIADenoiser.Windows.rhp “NVIDIADenoiser.Windows” 0.4.2.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.16.22067.13001
C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7\Plug-ins\RhinoScript.rhp “RhinoScript”
C:\Program Files\Rhino 7\Plug-ins\RPC.rhp “RPC”
C:\Program Files\Rhino 7\Plug-ins\AnimationTools.rhp “AnimationTools”
C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.16.22067.13001
C:\Program Files\Rhino 7\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”
C:\Program Files\Rhino 7\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.16.22067.13001
C:\Program Files\Rhino 7\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 7.16.22067.13001
C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.16.22067.13001
C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.16.22067.13001
C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”

Just to be clear: I’m talking about when you select the Line option from the command line. Trim works as expected if I’m using a line that I’ve already drawn.

It’s working fine for me too:

Command: _Trim
Select cutting objects ( ExtendCuttingLines=No ApparentIntersections=Yes Line ): Line
Start of cutting line
End of cutting line
Select object to trim, select pressing Shift to extend ( ExtendCuttingLines=No ApparentIntersections=Yes )
Splitting… Press Esc to cancel
Creating meshes… Press Esc to cancel
Select object to trim, select pressing Shift to extend. Press Enter when done ( ExtendCuttingLines=No ApparentIntersections=Yes Undo )
Command: _CommandHistory

image

Hm - since the Line option is a screen based thing, I wonder if there is some depth testing glitch - Peter, does the exact file you posted fail for you, or is it in the context of a bunch of other geometry? I’ll try reverting to 7.16 to test, maybe something got fixed, too.

-Pascal

That exact file fails.

I updated my video drivers a few minutes ago and also restarted my pc - no change.

I tried the same file in V8 WIP and it trimmed as expected.

(8.0.22067.16305, 2022-03-08)

It all worked here in 7.16… weird.
Thinking…

-Pascal

Maybe not default settings in the Shaded working display mode?

I tried every display mode that I have without luck. Some are modified and some aren’t.

I wasn’t quite correct about there needing to be something at or below z0.

If I draw a line at any height, trim using that line works, but trim using the Line command line option only works if the line or a point is below 35.5 for some random-seeming reason.

Sorry, I’m going to need better, more specific instructions to follow.

I opened your file and in the large Top view, typed the Trim command, clicked the “line” command line option, clicked two points to slash across your surface, then the top part to trim away.

It worked as expected.

What specifically are you doing differently to get it to fail?

There’s one difference from your steps & mine:
Can you try exactly your steps, but with ExtendCuttingLines=Yes ApparentIntersections=Yes?

@John_Brock or @pascal, are you still unable to repeat this?

Hey Peter, I just ran this every way I can imagine and it works here too.

I had one instance where it did not work but a view change and back (top to front and back) got it working again, it then worked in every other instance I tried. Only view it does not work is perspective, unless you change the cplane to be view based, then it works again.

I’m wondering if clearallmeshes and remaking the render mesh would help?

any chance you could post a screen recording of what you are seeing?

Hi @theoutside,

Assuming I’m not misunderstanding what @phcreates is saying, then I can reproduce the issue:

Creating a line before running Trim and using that to trim in approximately the same place works fine.

Rhino 7 SR17 2022-3-10 (Rhino 7, 7.17.22069.03001, Git hash:master @ 04f6e9ffab44f423581e5ca6c790328fa62b4f08)
License type: Commercial, build 2022-03-10
License details: Cloud Zoo

Windows 10.0.19043 SR0.0 or greater (Physical RAM: 16Gb)

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Hybrid graphics configuration.
Primary display: Intel(R) HD Graphics 520 (Intel) Memory: 1GB, Driver date: 9-26-2018 (M-D-Y).
> Integrated graphics device with 3 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Primary OpenGL: NVIDIA GeForce GPU (NVidia) Memory: 1GB, Driver date: 7-5-2020 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 451.67
> Integrated accelerated graphics device (shares primary device ports)
- Video pass-through to primary display device

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 7-5-2020
Driver Version: 27.21.14.5167
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 1 GB

Rhino plugins that do not ship with Rhino
C:\Program Files\Bongo 3.0 (64-bit)\Rhino6\Bongo.30.rhp “Bongo 3.0”
C:\Users\swiftj\Downloads\Rhino\Plugins\elefront421\ElefrontProperties.rhp “ElefrontProperties” 1.0.0.0
C:\Program Files\Bongo 3.0 (64-bit)\BongoEtoUI.rhp “BongoEtoUI” 1.0.0.0
C:\Program Files\Bongo 3.0 (64-bit)\BongoUI.30.v60.rhp “BongoUI30v40”
C:\Users\swiftj\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\NVIDIADenoiser\0.4.1\NVIDIADenoiser.Windows.rhp “NVIDIADenoiser.Windows” 0.4.1.0
C:\Users\swiftj\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\raytraced-blend-material\1.5.0\RaytracedBlendMaterial.rhp “RaytracedBlendMaterial” 1.5.0.0
C:\Users\swiftj\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\raytraced-materials\0.1.5+v7.4\RaytracedMaterials.rhp “Raytraced Materials” 0.1.5.0
C:\Users\swiftj\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\SubstanceImporter\2.0.0\Substance.Win.rhp “SubstanceImporter” 2.0.0.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.17.22069.3001
C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7\Plug-ins\RPC.rhp “RPC”
C:\Program Files\Rhino 7\Plug-ins\AnimationTools.rhp “AnimationTools”
C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.17.22069.3001
C:\Program Files\Rhino 7\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”
C:\Program Files\Rhino 7\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.17.22069.3001
C:\Program Files\Rhino 7\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.17.22069.3001
C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.17.22069.3001
C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”
C:\Users\swiftj\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\PanelingTools\2021.3.2.446\PanelingTools.rhp “PanelingTools”
C:\Users\swiftj\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\SectionTools\2021.4.30.511\SectionTools.rhp “SectionTools”

HTH
Jeremy

ok, I see that… now open the file change from top to front then back to top and try it… does it still fail?

I had it fail once and only once in the 20 or 30 times I ran it…

if so please run clearallmeshes and then switch to shaded mode to regent the render mesh, then try again… does it still fail?

Yeah, Jeremy is showing exactly what I see. It doesn’t help to clear all meshes or switch views. I’ll make a video when I get a chance…

Yes

Yes