I wanted to drop a recent tutorial made by Joko Engineering (aka @Celica_Supra) that is relevant:
[SOLVED] Looking for ideas to create a surface design on an elipsoid
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: [SOLVED] Looking for ideas to create a surface design on an elipsoid
Cool thread.
I wanted to drop a recent tutorial made by Joko Engineering (aka @Celica_Supra) that is relevant:
I wanted to drop a recent tutorial made by Joko Engineering (aka @Celica_Supra) that is relevant:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: [SOLVED] Looking for ideas to create a surface design on an elipsoid
hi
here little macro for follow the surface to the ovoid
EDIT: 7/7/2020 22h02 little correction code
mario
here little macro for follow the surface to the ovoid
Code: Select all
##https://forum.freecadweb.org/viewtopic.php?f=3&t=47340
##Looking for ideas to create a surface design on an elipsoid
##07/07/2020
##Mario52
#
import Draft, Part
# select First the object to work (here oeuf (ellipse))
# select the object to clone (must be created in the y axis)
# run the macro
####
# PS: if only one object is selected, only the AXIS is created
####
#### configuration begin ####
ValueLenght = -300.0 # value lenght of bject (and length of axis if is negatif " - " reverse the axis)
beginStep = 0 # must be smaller of valueNumberCopy
#
valueNumberCopy = 300 # number of copy (begin from beginStep to valueNumberCopy)
# then beginStep=20 valueNumberCopy=60 number objects: 60-20=40
# valueNumberCopy cannot exceed ValueLenght
#
valueStep = 1 # step of step (min 1) ex: valueStep=10 then 10, 20, 30, 40, .....
# the object make a little rotation at each step !!! domage
#### configuration end ####
valueNumberCopy = valueNumberCopy + beginStep
if valueNumberCopy > int(abs(ValueLenght)):
valueNumberCopy = int(abs(ValueLenght))
selectedEdge0 = FreeCADGui.Selection.getSelectionEx()[0].SubObjects[0] # select one element
SubElementName = FreeCADGui.Selection.getSelectionEx()[0].SubElementNames[0]
sel = FreeCADGui.Selection.getSelection()
selectedEdge = selectedEdge0
objectBase = sel[0]
try:
objectToCopy = sel[1]
except Exception:
None
plr = plDirection = FreeCAD.Placement()
comptV = 0
comptC = 0
for i in range(beginStep, int(abs(valueNumberCopy)), valueStep):
comptV += 1
try:
########## section direction
yL = App.Vector(float(i), float(0), float(0))
uv = selectedEdge.Surface.parameter(yL)
nv = selectedEdge.normalAt(uv[0], uv[1])
direction = yL.sub(nv + yL)
r = App.Rotation(App.Vector(0,0,1),direction)
plDirection.Rotation.Q = r.Q
plDirection.Base = yL
plr = plDirection
########## section direction
########## section axis
points=[FreeCAD.Vector(0.0,0.0,(ValueLenght * 2.0)) ,FreeCAD.Vector(0.0,0.0,0.0)]
# points=[FreeCAD.Vector(0.0, 0.0, 0.0) ,FreeCAD.Vector(0.0, 0.0, (ValueLenght * 2.0))]
centerX = Draft.makeWire(points,closed=False,face=False,support=None)
centerX.Placement = plr
centerX.Label = "Axis_" + SubElementName
########## section axis
########## section clone
try:
if len(sel) == 2:
objectClone = Draft.clone(objectToCopy) #
objectClone.Placement = plr
except Exception:
None
########## section clone
comptC += 1
except Exception:
print("ouf creation ",comptV)
None
print(comptC," to ", comptV," objects created")
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: [SOLVED] Looking for ideas to create a surface design on an elipsoid
Thank you, Mario.
I'm new to Macros so it looks like you're giving me a skeleton routine that I can modify to draw hex onto my ovoid?
I like the idea because working with the current model, which does look the way I hoped it would, is a nightmare. Every action is followed by a 15 minute pause. If I could simplify the model and reduce the feature collisions, I could get to the next phase a lot more easily.
I'm new to Macros so it looks like you're giving me a skeleton routine that I can modify to draw hex onto my ovoid?
I like the idea because working with the current model, which does look the way I hoped it would, is a nightmare. Every action is followed by a 15 minute pause. If I could simplify the model and reduce the feature collisions, I could get to the next phase a lot more easily.
Re: [SOLVED] Looking for ideas to create a surface design on an elipsoid
hi
I think the long time for execute your project is the many (beaucoup) number of object and creation of many surface
the macro help you just for follow the surface (normale, axis perpendicular of point position of the surface )
you can post your file (sketch and hexagon) for the real dimension (just for see)
mario
I think the long time for execute your project is the many (beaucoup) number of object and creation of many surface
the macro help you just for follow the surface (normale, axis perpendicular of point position of the surface )
you can post your file (sketch and hexagon) for the real dimension (just for see)
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: [SOLVED] Looking for ideas to create a surface design on an elipsoid
here an honey comb challenge:
https://forum.freecadweb.org/viewtopic. ... &hilit=nid
...
need time to thinking about a irrugular array..
https://forum.freecadweb.org/viewtopic. ... &hilit=nid
...
need time to thinking about a irrugular array..
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: [SOLVED] Looking for ideas to create a surface design on an elipsoid
Very impressive.
I think if I was contemplating making such an object, I would consider making/programming it in OpenSCAD.
I would have thought it was easier to do in OpenSCAD and also to test out variations etc.
Depending on what the final objective is, it could stay as just OpenSCAD or try importing into FreeCAD.
I think if I was contemplating making such an object, I would consider making/programming it in OpenSCAD.
I would have thought it was easier to do in OpenSCAD and also to test out variations etc.
Depending on what the final objective is, it could stay as just OpenSCAD or try importing into FreeCAD.
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: [SOLVED] Looking for ideas to create a surface design on an elipsoid
15 minute pause - That is why I would have tried using OpenSCAD, think it is much better suited for creation of such objects.TomB19 wrote: ↑Wed Jul 08, 2020 9:49 pm Thank you, Mario.
I'm new to Macros so it looks like you're giving me a skeleton routine that I can modify to draw hex onto my ovoid?
I like the idea because working with the current model, which does look the way I hoped it would, is a nightmare. Every action is followed by a 15 minute pause. If I could simplify the model and reduce the feature collisions, I could get to the next phase a lot more easily.