Creation of Surfaces

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Creation of Surfaces

Post by wmayer »

Help says that it "returns the initial surface" but being assigned to a variable, I don't guess what is the scope.
If no user-defined initial surface is passed to the algorithm it will create one.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Creation of Surfaces

Post by onekk »

wmayer wrote: Sun Aug 07, 2022 3:57 pm
Help says that it "returns the initial surface" but being assigned to a variable, I don't guess what is the scope.
If no user-defined initial surface is passed to the algorithm it will create one.
Sorry I have amended the post:

https://forum.freecadweb.org/viewtopic. ... 27#p615827

including some more advancement but I obtain strange results.

Sorry for this bothering, but I wonder how to obtain this sort of solids, with some surface defined from points.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Creation of Surfaces

Post by wmayer »

Sorry for this bothering, but I wonder how to obtain this sort of solids, with some surface defined from points.
That's a weakness of the GeomPlate algorithm that it starts to swing when there are too many (point) constraints. I don't think it's supposed to fit well a point cloud.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Creation of Surfaces

Post by onekk »

wmayer wrote: Sun Aug 07, 2022 4:33 pm...
Thanks for the reply.

Do you have any hints of what is better to use to obtain a surface that fits a point cloud and could be trimmed using the base_curve to obtain a shape similar to a "musical instrument case"?

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Creation of Surfaces

Post by wmayer »

You can give this a try:

Code: Select all

import ReverseEngineering as reen
reen.approxSurface
In the forum there once was the user microelly2 (not active any more) who has written some functionality for this kind of purpose. Check some forum postings about Gordon surface if this is of any help for you.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Creation of Surfaces

Post by onekk »

Many thanks, I will try some solutions and probably post here some results.

Thanks again.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Creation of Surfaces

Post by onekk »

wmayer wrote: Sun Aug 07, 2022 5:05 pm ...
Thanks, I've done some more tests, now I need some experiments to point out things.

In meantime I've found some quirks on the "scarce" documentation obtained with:

Code: Select all

import ReverseEngineering as reen
help(reen.approxSurface)
Help on built-in function approxSurface:

approxSurface(...) method of builtins.tuple instance
approxSurface(Points=,UDegree=3,VDegree=3,NbUPoles=6,NbVPoles=6,Smooth=True,
Weight=0.1,Grad=1.0,Bend=0.0,
Iterations=5,Correction=True,PatchFactor=1.0)
That is not in line with:

https://github.com/FreeCAD/FreeCAD/blob ... eering.cpp

that a line 173 (checked now)

Is reporting different parameters.

Regards

carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply