Page 1 of 1

Piping add-on New feature not working all the time. ***SOLVED***

Posted: Fri Nov 10, 2023 5:23 am
by sln8458
I'm in the process of adding an extra feature to my piping add-on. (NOTE: images / sld's not completed yet)
Check Valves
CV dialog.png
CV dialog.png (104.38 KiB) Viewed 10005 times
.
I have progressed the first valve selection, Plain to the point of inserting the completed valve.
CV completed dialog.png
CV completed dialog.png (54.3 KiB) Viewed 10005 times
The code behind this works fine as I step through when checking, but when I try this addition in normal use it sometimes works and sometimes doesn't.

I get this error:
Command: _filletedge
Current settings: mode = TRIM, radius = 3.9000
Select an edge: [Chain/Loop/Radius]: R
Fillet radius <3.9000>: 3.90000
Select an edge: [Chain/Loop/Radius]: 357.5000,0,0
Select an edge: [Chain/Loop/Radius]:
Press Enter to accept the fillet or [Radius]:
Command:
Command: _filletedge
Current settings: mode = TRIM, radius = 3.9000
Select an edge: [Chain/Loop/Radius]: R
Fillet radius <3.9000>: 3.90000
Select an edge: [Chain/Loop/Radius]: 357.5000,0,222.0000
Select an edge: [Chain/Loop/Radius]:
Press Enter to accept the fillet or [Radius]:
Modeling Operation Error:
blends too complex to reorder.
Unable to fillet the 3dSolid.
error: Function cancelled
Command:
Command: '_PMTHIST

Here is the code (lines 9571/9572 in the attaced file):

Code: Select all

		(command "_filletedge" "R" EXRAD# (strcat (rtos VRAD#) ",0,0" ) "" "" "")
		(command "_filletedge" "R" EXRAD# (strcat (rtos VRAD#) ",0," (rtos FTF#)) "" "" "") 
https://www.dropbox.com/scl/fi/pyenmg61 ... zg0v2&dl=0

Any thoughts pls?

Re: Piping add-on New feature not working all the time.

Posted: Fri Nov 10, 2023 1:07 pm
by SPirou4D
Hi Steve,
One idea to search:
Select an edge: [Chain/Loop/Radius]: 357.5000,0,222.0000
357.5000,0,222.0000 is X,Y,Z ?
Why 222.0000 ? is it the Z ?

Re: Piping add-on New feature not working all the time.

Posted: Sat Nov 11, 2023 1:58 am
by sln8458
Hi Pat,
you had selected the 25" valve ?

That part of the code is applying a 'fillet radius' to the outer edges of a vertical cylinder.
Bottom edge 357.5000,0,0
Top edge 357.5000,0 222.0000
The cylinder is 222 high. (Z)

I have generated the valve body profile via Entmake & revolved that to create the body
However there are 2 areas that then require an infill to be added 180deg appart (12 & 6 Oclock)
In the code that sometimes fails I an creating these infills.

I had a thought overnight, which I will test today.

Re: Piping add-on New feature not working all the time.

Posted: Sat Nov 11, 2023 6:29 am
by sln8458
So I think I have traced the issue,
Screen Zoom, ie if the screen is too far zoomed out the code does not select the individual 'edge' required.
When I am testing the code step by step I am zoomed in close to the origin (0,0,0) so I can actually see what is happening.
When I am testing the final completed code, as it is expected to be used, that is when the issue presents.

Is there a setting I can change to overcome this?

.

Re: Piping add-on New feature not working all the time. ***SOLVED***

Posted: Sun Nov 12, 2023 2:05 am
by sln8458
I think I have found a solution.

I have tried a number of different things, but these three together seem to have resolved the problem.
_osmode 0
pickbox 0

OSNAPCOORD now set to '1' (this could be the only one required)

SteveN