Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以设置三阶贝塞尔曲线的控制点吗 #4269

Open
wantingjun opened this issue Apr 19, 2024 · 2 comments
Open

可以设置三阶贝塞尔曲线的控制点吗 #4269

wantingjun opened this issue Apr 19, 2024 · 2 comments

Comments

@wantingjun
Copy link

问题描述

X6使用smooth设置为三阶贝塞尔曲线时,只提供了vertices的途经点,是否有设置控制点的接口?能否通过设置三阶贝塞尔曲线的2个控制点确定贝塞尔曲线呢

重现链接

https://codesandbox.io/p/sandbox/summer-resonance-r7mts8?file=%2Findex.html&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clv64585i0006356i8g7tzq82%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clv64585i0002356i2ay6a6h8%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clv64585i0003356ialcf9saq%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clv64585i0005356i7aglkojl%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clv64585i0002356i2ay6a6h8%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clv64585h0001356iyx9ezk2g%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Findex.html%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522clv64585i0002356i2ay6a6h8%2522%252C%2522activeTabId%2522%253A%2522clv64585h0001356iyx9ezk2g%2522%257D%252C%2522clv64585i0005356i7aglkojl%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clv64585i0004356iotn9bnmh%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clv64585i0005356i7aglkojl%2522%252C%2522activeTabId%2522%253A%2522clv64585i0004356iotn9bnmh%2522%257D%252C%2522clv64585i0003356ialcf9saq%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clv64585i0003356ialcf9saq%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

重现步骤

  1. 只能设置vertices,vertices在曲线上
  2. 拖动起点和终点,曲线一定会经过vertices
  3. 没有设置控制点的接口

预期行为

有类似G6中cubic的controlPoints的参数,通过设置控制点,确定贝塞尔曲线
g6.antv.vision/manual/middle/elements/edges/built-in/cubic

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.11.1 ...]

屏幕截图或视频(可选)

e8d4c9bd3f614938598880126a9ebd2

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Apr 19, 2024

👋 @wantingjun

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@light-years-run
Copy link

light-years-run commented Apr 25, 2024

x6 的edge smooth 是根据路径点计算出的三次贝塞尔线 ,只有实际点,没有控制点,只能自己开发节点工具,实现的三次贝塞尔线绘制,并且控制点可调整
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants