everybody, please help me more.
I tried wmayer's method, and I got a surface of the first set of points.
In that set, the knots have some mults at the end point, but fewer than order+1, because I used A12.1 in page 577 in
in my test, if the mults happen at end point, if it's order+1, it works very well, if the mults of the end point is fewer than order+1, it also works fine
to insert knot of the extension target, then mirror the inserted knots and corresponding control points at the end plane.
In my own test code, the curve/surface points can be computed, because I developed that code by unclamped algorithm. But I can't convert it to a CAD curve/surface. As we all know, OpenCASCADE/FreeCAD have a lot of CAD functions, if I want to use those function, I have to import the data to OpenCASCADE/FreeCAD, I don't want to develop a new CAD system especially by JavaScript
[-target, -0.5*target, -0.25*target, 0, 0, 0, 0, k1, k2...1, 1, 1, 1, 1+0.25*target, 1 + 0.5*target, 1+target]
I keep the original control points and add extra points at the end of curve, so k1, k2, ...kn are the save as previous.
3 extra points are append and prepend in the array, because I need to keep 2nd order continuity which means curvature continuity.
some of internal knot repeat.
if the repeat happens at some position not the end, there would be problem, an exception
here is the control points and knots, please help me to try that, you can simply use this data to replace the data in the third reply of this thread, the exception can be raised
Code: Select all
[[[9.068757563189992, -2.6944957245128247, 17.490567855962535, 1], [8.93826943501047, -1.4555105066569196, 16.551231793471505, 1], [8.903305891202592, -0.5990170393119777, 15.735865559207014, 1], [8.893076120383126, -0.08738668080722323, 15.110594625103968, 1], [8.85917492092599, 1.6081432717300113, 13.038462704861793, 1], [9.088668280701501, 2.9624500761025057, 8.05556849032455, 1], [13.395147585080677, 7.041202828732808, 2.064628861818192, 1], [18.42599564039713, 13.725410449092601, -0.10904875905113254, 1], [19.80591507076088, 19.342946012850597, -0.3576913996663066, 1], [20.021262750768603, 22.341471235911392, -0.389206865375026, 1], [20.081573452138517, 23.181244198739183, -0.3980331496462297, 1], [20.112056326905346, 24.44282131479675, -0.399619215788922, 1], [20.027070707421146, 26.114396156084428, -0.36238554956480096, 1]], [[9.554691634598832, -2.883381617409447, 17.3081651437757, 1], [9.434026645353617, -1.5891038136867082, 16.452021580661345, 1], [9.401307711001477, -0.6796829894101543, 15.674941127178476, 1], [9.389237047388155, -0.123379394701022, 15.060969486660772, 1], [9.349235176187234, 1.7201965226664746, 13.026283137030267, 1], [9.504326776874015, 3.180809940544943, 8.154850422854125, 1], [13.71112712680983, 7.071922891237927, 2.224182645847926, 1], [18.613472088365718, 13.66942234334463, 0.013057202491092545, 1], [19.92605666030484, 19.278812349589483, -0.2161272050641137, 1], [20.10677254361049, 22.264739818843516, -0.21445408774461852, 1], [20.157384194827053, 23.100984629579102, -0.21398551116645761, 1], [20.173466566117312, 24.35662543608946, -0.19897775781156268, 1], [20.070028284901166, 26.01702757227097, -0.13535157389624994, 1]], [[9.915803489549713, -2.98161008654386, 17.192682830104943, 1], [9.801534219074009, -1.6614856607494113, 16.38365688587836, 1], [9.77022720171123, -0.723856652140193, 15.629637445130513, 1], [9.757106825341074, -0.1419635570768772, 15.024179687567434, 1], [9.71362623285009, 1.7864153114833141, 13.017708128795224, 1], [9.825125640152711, 3.325971314102241, 8.228791575296022, 1], [13.943695900826066, 7.107574438840525, 2.3454389429665734, 1], [18.747825938644773, 13.647313761392988, 0.11678709750972752, 1], [20.013152453330665, 19.236166662682955, -0.09988417233606635, 1], [20.169780368039692, 22.207705340083916, -0.08462890648598906, 1], [20.213645894660967, 23.039920397034848, -0.08035648626316771, 1], [20.219709308030573, 24.288863688144346, -0.058837896649712285, 1], [20.1036098131345, 25.938206146503383, 0.014898390964687595, 1]], [[10.153846461257803, -3.0118182457126306, 17.133245317109715, 1], [10.043085205164441, -1.6849290140708024, 16.34298706267264, 1], [10.012513604330385, -0.7376654127188789, 15.599719162147556, 1], [9.99893597014986, -0.14587482594081236, 15, 1], [9.953940036943408, 1.8153040776024303, 13.012546, 1], [10.044422647886826, 3.4122296492883084, 8.277596, 1], [14.094563022808646, 7.143717404548399, 2.427847737174211, 1], [18.8318309328357, 13.650531895743912, 0.19690755308181007, 1], [20.06874512515554, 19.212290323710793, -0.01399697076283558, 1], [20.211240533548427, 22.169929095399674, 0, 1], [20.251148082224407, 22.998251316995052, 0.0039200195875364096, 1], [20.251354511988726, 24.240791304478428, 0.02440605087850957, 1], [20.128029755740208, 25.880511180480603, 0.09618623196298172, 1]], [[10.715069278161772, -3.0821803821633993, 16.995559656802264, 1], [10.61263290970905, -1.7400721735949443, 16.247802866381882, 1], [10.583810875217662, -0.770225668464383, 15.529173587847769, 1], [10.569155053667432, -0.15509737084435324, 14.942985700522797, 1], [10.520586035030464, 1.883422110908222, 13.000374, 1], [10.561512260336833, 3.615621795733029, 8.392674, 1], [14.45029893750934, 7.228940419325408, 2.62216288948566, 1], [19.02990983203672, 13.658120069707275, 0.38582693574532617, 1], [20.19982941775947, 19.15599130260965, 0.1885200641698277, 1], [20.30900119675373, 22.080854903620118, 0.1995500481701333, 1], [20.339576063224126, 22.89999804545452, 0.20263912751908894, 1], [20.325993984876188, 24.127421543130247, 0.22069237948900883, 1], [20.18570711656094, 25.744419119294065, 0.2878667707053176, 1]], [[12.137154710171684, -2.8143721913698805, 16.831586168852205, 1], [12.090508906180155, -1.5495205542278456, 16.046425658220272, 1], [12.086800293252542, -0.6377511592161078, 15.340438023110964, 1], [12.080056354192225, -0.059755657538711586, 14.791989015651577, 1], [12.057707112235063, 1.8557066859975366, 12.974443, 1], [11.933305185359648, 3.975281724048325, 8.673814, 1], [15.3082064772923, 7.624687379600255, 3.1455850617688315, 1], [19.37431472068055, 13.929706757034074, 0.9457335577523813, 1], [20.431969920642167, 19.10595922283073, 0.7207913919251576, 1], [20.573544225237903, 21.83626427349529, 0.7280384452196381, 1], [20.61319380774476, 22.60091895913431, 0.7300680694395952, 1], [20.624200178736114, 23.75031968010881, 0.7478143075850376, 1], [20.536714542662523, 25.2735670207947, 0.8155451853330927, 1]], [[14.479222674173496, -2.827309167410598, 16.33325117681234, 1], [14.476892784638942, -1.582246465633871, 15.662451251326782, 1], [14.489333219125799, -0.6635688402946606, 15.04217399113688, 1], [14.487275165337845, -0.06385715804113179, 14.551254306807028, 1], [14.480454827601031, 1.9235720537809313, 12.924359, 1], [14.248213828067437, 4.244200425861611, 9.129797, 1], [16.75096586934408, 8.051448354581666, 3.9610032761021405, 1], [20.057965361625392, 14.161066473792669, 1.7871886138158974, 1], [20.845385690978247, 18.985794576116085, 1.5706914182832277, 1], [20.932354294073644, 21.492222377420617, 1.570609926175237, 1], [20.956710894756117, 22.19417755346109, 1.5705871033327117, 1], [20.955239386721868, 23.25192434095696, 1.5838725706653396, 1], [20.871353386535286, 24.65906203502376, 1.643575006303928, 1]], [[17.093541464703122, -2.5089608137300483, 16.006337529670837, 1], [17.181239781869987, -1.4016018210875516, 15.28819153496406, 1], [17.234262778848375, -0.5932309155181043, 14.699728109619276, 1], [17.247647703039462, -0.0689260552184985, 14.275224250518303, 1], [17.2920050002584, 1.6686068728447736, 12.868429293751374, 1], [16.898035656679237, 4.482854588794428, 9.640086429627052, 1], [18.341594352637085, 8.691156664361761, 4.9373963105824465, 1], [20.75679229218072, 14.531684628370385, 2.7923453226395663, 1], [21.227643362854163, 18.939505311892784, 2.5458793816560132, 1], [21.24543888701271, 21.18225739950589, 2.536715123186111, 1], [21.25042273705098, 21.81036702853898, 2.5341485626555533, 1], [21.231126001147373, 22.760592922003234, 2.544331518689196, 1], [21.145543460982985, 24.031916263603634, 2.600090342310477, 1]], [[18.920392954152447, -2.702406015180803, 15.59430621275493, 1], [19.04243399382607, -1.5289747324705094, 14.986962154566099, 1], [19.105162694236178, -0.6516131873322063, 14.46971763628216, 1], [19.11780615945611, -0.06851640703589716, 14.088205813300071, 1], [19.15970628056484, 1.86385144367135, 12.823885367180173, 1], [18.59844405447844, 4.9697369859564775, 9.974781370512387, 1], [19.342350578774802, 9.221773507445143, 5.5913265392967695, 1], [21.148714998747696, 14.862250240082751, 3.458637780205138, 1], [21.435120022950155, 18.953404465956762, 3.2074948626717026, 1], [21.443996875199762, 20.980352702732763, 3.1912796534496644, 1], [21.44648294417024, 21.548023874282368, 3.1867383895688275, 1], [21.433741819959476, 22.413304146124826, 3.1932638675619693, 1], [21.375969784981002, 23.582827864330998, 3.2429152362895586, 1]], [[19.801195425276696, -2.7735224347570058, 15.405544885135802, 1], [19.92787107954879, -1.5764227632252497, 14.843470039070993, 1], [19.989423425430385, -0.6734791560153905, 14.359213926171739, 1], [19.99988175629054, -0.06877306446664189, 14, 1], [20.03454039789024, 1.935207492314755, 12.80957421492216, 1], [19.429808608926177, 5.171486881684919, 10.137477168220672, 1], [19.87768181273596, 9.497351163990675, 5.968979, 1], [21.329795057383624, 15.047729923812062, 3.820045796436579, 1], [21.52156998516339, 18.980179975016434, 3.5197224435891643, 1], [21.527920082270395, 20.893746838022597, 3.5, 1], [21.529698503149024, 21.429664195581275, 3.4944764930574204, 1], [21.52141988955102, 22.25092482775538, 3.502007252168012, 1], [21.480218478496738, 23.368744067248798, 3.5558631429170746, 1]], [[20.041737734584974, -2.7930285959291217, 15.354520898279466, 1], [20.169706894886687, -1.5894172265141815, 14.804414648830921, 1], [20.23094704931422, -0.6794515438075754, 14.329031361712007, 1], [20.2408085408592, -0.06884316690428656, 13.975907798543668, 1], [20.273489272198262, 1.954697412930263, 12.80566532104802, 1], [19.65688437162301, 5.226592083369846, 10.181915281626553, 1], [20.023900156538122, 9.572621400383966, 6.072129561435096, 1], [21.379254578124506, 15.098391141471959, 3.9187594118913798, 1], [21.545182600110298, 18.987493336054975, 3.605003101385451, 1], [21.550842548896586, 20.870091640458707, 3.584322705097186, 1], [21.552427685458106, 21.39733588164268, 3.5785309120084086, 1], [21.54536451708056, 22.2065824377231, 3.5863286336789777, 1], [21.50867842454652, 23.310307273174786, 3.6413091357610017, 1]], [[20.40594618484721, -2.820708044763034, 15.276080633921255, 1], [20.537515994368214, -1.6078386713016324, 14.744356105357634, 1], [20.599121486387116, -0.6879355619583517, 14.282747851015452, 1], [20.608416011627085, -0.06900364338821018, 13.939148132416937, 1], [20.639217831098936, 1.9821209411339835, 12.800467432800612, 1], [20.001747314891986, 5.306115876062689, 10.249295766542291, 1], [20.237637536163817, 9.681782358766492, 6.22583259808834, 1], [21.449514976805517, 15.174335348746034, 4.065492415269333, 1], [21.57992999614285, 19.001080918442565, 3.735420274134082, 1], [21.584945284175742, 20.834730455741422, 3.7140289073227772, 1], [21.586349875759108, 21.34826600744622, 3.7080379984093184, 1], [21.58112725988918, 22.138895914067902, 3.716388102455463, 1], [21.55106281078853, 23.221327983587734, 3.7731076228529776, 1]], [[20.896553251824667, -2.8606298497253055, 15.166710043124404, 1], [21.03504791144836, -1.6343837078693666, 14.661694804783242, 1], [21.09817213104513, -0.7001533175394733, 14.219665647907943, 1], [21.10708183062173, -0.06923961778824746, 13.889283407596817, 1], [21.13660834766498, 2.021592283822501, 12.794405093747384, 1], [20.466330084363364, 5.412524159275467, 10.34002586650881, 1], [20.513618119919396, 9.823504617693153, 6.429354999881389, 1], [21.536320780802807, 15.276773598392356, 4.259072421756299, 1], [21.624535064611447, 19.023680869073925, 3.9130318011532386, 1], [21.629799999440408, 20.78788466327774, 3.8916246805843233, 1], [21.63127450760409, 21.2819711014696, 3.885629359642044, 1], [21.628813920304687, 22.046709193885192, 3.8948560170113535, 1], [21.607826618267254, 23.10031426673233, 3.953827745987022, 1]]]
you can see the repeats of the knots inside the vector (not at the head of tail)
experts, please help me.