Replies: 1 comment 1 reply
-
@hrgdavor Small incremental changes like adding mat4.inverse is always fine. Nice proposal with some nice ideas. I’ll think for awhile and post some additional thoughts later. :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is open for discussion
is linked with issue: #856
is missing mat4.inverse
is open for proposal for alternate syntax for compact string format of connector options
'TBSW'
->{dir:'top', side:['bottom','south','west']}
'TBSW'
->{dir:'top', side:['bottom','front','left']}
'TT'
->{dir:'top', side:['top']}
first thoughts
What I think we need
getConnector
method to geometry to calculate a connectors, later on,getConnector
method calculates a connectors based on some logic that makes sense for that geometryA connector decorator is useful, because different geometries have different logical places where connectors could be and how to calculate their position.
After that we need a pattern to use and combine the connectors
getConnector
method from each geometry and apps parameters to itinitial concept
For this concept, a connector is just a transform matrix that
My preferred shortcut for connecting models that I already use in jscad scripts that I will use in these examples:
if we have a cone that has the bottom of the cone at xyz=0 and top of the cone right above it
when we move it to a connector on a cube it should
connect
must combine transform of the cube with transform of the connectorexample
Code using connectors that would be equal to creating a cuboid with size: [10,10,10]
Although it looks similar it gets better when you start moving things
The magic happens when you add cone to the East face of the cube
Add a sphere on top of the cone
As you can notice I did not use a
sphereConnector
but a regular sphere in the last example.It should be possible to call
connect
without a connector-option for second geometrygetConnector
method, but could also be a simplecylinder
,coboid
etc.initial implementation
looks like it kinda works for the examples above, but it needs
mat4.inverse
that is not yet available.Beta Was this translation helpful? Give feedback.
All reactions