Author Topic: Profile Combine plugin  (Read 5236 times)

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 239
    • View Profile
Profile Combine plugin
« on: August 15, 2018, 03:43:16 am »
This is a new plugin that is intended create a new Surface object from two Surface objects by applying a mathematical operator on them (+, -, x, /) in the Z-Axis direction.  An STL file is also created and saved for the combined surface.

Comments and suggestions welcome.

Geoff

I am attaching a new version (1.0.2, vers 1.0.1 did not fix the problem), to fix a problem with the Delaunay triangulation when one surface is completely flat.

I am attaching a new version (1.0.3), see notes later in this thread
« Last Edit: March 29, 2020, 06:19:25 am by GeoffreyGRoy »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Combine plugin
« Reply #1 on: December 17, 2018, 02:52:36 am »
Hello Geoff

I'm playing (and translating) with the plugin, but I think that I don't understand all  :-[

I'm trying to add/substract a shape (surface 6) that look like a bowl from a flat ellipse (surface 2) ; the goal is to obtain a "print" of the bowl in the ellipse. The resulting objet must only keep the ellipse contour and remove the extra material of the bowl.

But no luck I can't understand how to do ; and I get an error message if one of the "include all" is unchecked.

I attach the file and screen shot

++
David



Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Combine plugin
« Reply #2 on: December 17, 2018, 03:02:29 am »
Ah ah ! ... It works if the ellipse is not totally flat.

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Combine plugin
« Reply #3 on: December 17, 2018, 03:21:35 am »
The results with a 3D cube (closed, done with the extrude solid CB tools) and a bowl done with Eddy's Revolved extrude plugin.

Works, but only the top of the cube remain in the resulting objects ; but maybe it's a normal thing ? ... I assume that this plugin is not exactly the same that a Boolean operation like on 3Dsmax ?

nice job  ;D

It's difficult for me to imagine what can be done with the * and / operations  ;D  do you have any examples ?

++
David
« Last Edit: December 17, 2018, 03:28:41 am by dh42 »

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2498
    • View Profile
Re: Profile Combine plugin
« Reply #4 on: December 17, 2018, 08:18:13 am »
First time I see this plugin but I feel I may be needing it soon :)

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 239
    • View Profile
Re: Profile Combine plugin
« Reply #5 on: December 18, 2018, 04:03:22 am »
Dear David

The error reported comes from the Delaunay Triangulation.  It seems that if you have an absolutely flat surface then the algorithm fails. Providing the surface has a (very small) Z-difference then it seem to be OK. I will see if I can fix this. Also, it will not triangulate vertical surfaces - hence the missing sides on the cube.  This is a restriction on the algorithm.  It is not intended to be an any way similar to a Boolean operation.

I am attaching an example using the mult(X) operation.  I am not sure it is particularly useful, but one never knows.  In essence one surface it set up to represent the multiplier with a range 0 to some (smallish) value.  Large values are likely to cause chaos.  The attached image shows the multiplier defined as a pyramid shape with a range 0 to 10.

Geoff

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 239
    • View Profile
Re: Profile Combine plugin
« Reply #6 on: December 18, 2018, 04:44:35 am »
I have posted a new version that should fix the flat surface problem.

Geoff

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Combine plugin
« Reply #7 on: December 18, 2018, 22:30:39 pm »
Hello

I redo a test with a flat surface and V 1.01 and ... same result ...  ??? (same with - and +)

If I slightly rotate the oval around Y axis (0.1°) that works ...

test file attached, and picture to see settings.

++
David

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 239
    • View Profile
Re: Profile Combine plugin
« Reply #8 on: December 19, 2018, 07:07:51 am »
Dear David

I have tried out the CB model (Sans titre.cb) that you attached, but I cannot reproduce the problem.  I have used the same settings that you had but it seems to work for me, see attachment.  Had you already rotated the oval?  If so, could you please post the original file for me to test.

thanks

Geoff
« Last Edit: December 19, 2018, 07:10:43 am by GeoffreyGRoy »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4847
    • View Profile
Re: Profile Combine plugin
« Reply #9 on: December 19, 2018, 08:48:11 am »
Geoff,

The file David attached has one surface already rotated.
I've redrawn the surfaces and these ones never had any rotation applied, you can see it failed.
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Combine plugin
« Reply #10 on: December 19, 2018, 16:35:26 pm »
Hello

Quote
Had you already rotated the oval?  If so, could you please post the original file for me to test.

Oops ! ... yes I attached the wrong file ; the oval is already rotated 0.1° on Y axis.

Eddy's file is the right file to test (I get the error with his file)

tested on CB V1.0 (Is it compatible with 0.98 ?)

++
David
« Last Edit: December 19, 2018, 16:38:42 pm by dh42 »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4847
    • View Profile
Re: Profile Combine plugin
« Reply #11 on: December 19, 2018, 16:50:43 pm »
Quote

tested on CB V1.0 (Is it compatible with 0.98 ?)

++
David

No, wrong version of .NET by the look of it.
Made in England

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 239
    • View Profile
Re: Profile Combine plugin
« Reply #12 on: December 20, 2018, 07:27:34 am »
Dear David

The bug is more devious that I thought - I will work on it.

Geoff

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 239
    • View Profile
Re: Profile Combine plugin
« Reply #13 on: December 21, 2018, 00:40:48 am »
Dear David

I think I have now fixed the problem - it was related to having a completely flat surface, as suspected, but please try out this new version (1.0.2) and let me know if the problem has gone away.

Also, I think the plugin will only work for CB 1.0

thanks for the patience

Geoff
« Last Edit: December 22, 2018, 04:25:59 am by GeoffreyGRoy »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Profile Combine plugin
« Reply #14 on: January 26, 2019, 01:25:24 am »